summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_da_btree.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-08 14:57:48 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-10 16:54:19 -0800
commit51908ca75feb5b2dd4f0d0146f9c92775520812c (patch)
treece6b1643f143a690fad0de73fa878ee21626f4cc /fs/xfs/libxfs/xfs_da_btree.h
parente1c8af1e02c7893f2d056aa44c4daf59fe0881ed (diff)
downloadlinux-51908ca75feb5b2dd4f0d0146f9c92775520812c.tar.gz
xfs: add a btree entries pointer to struct xfs_da3_icnode_hdr
All but two callers of the ->node_tree_p dir operation already have a xfs_da3_icnode_hdr from a previous call to xfs_da3_node_hdr_from_disk at hand. Add a pointer to the btree entries to struct xfs_da3_icnode_hdr to clean up this pattern. The two remaining callers now expand the whole header as well, but that isn't very expensive and not in a super hot path anyway. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_da_btree.h')
-rw-r--r--fs/xfs/libxfs/xfs_da_btree.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_da_btree.h b/fs/xfs/libxfs/xfs_da_btree.h
index 932f3ba6a813..4955c1fb8b0d 100644
--- a/fs/xfs/libxfs/xfs_da_btree.h
+++ b/fs/xfs/libxfs/xfs_da_btree.h
@@ -135,6 +135,12 @@ struct xfs_da3_icnode_hdr {
uint16_t magic;
uint16_t count;
uint16_t level;
+
+ /*
+ * Pointer to the on-disk format entries, which are behind the
+ * variable size (v4 vs v5) header in the on-disk block.
+ */
+ struct xfs_da_node_entry *btree;
};
/*