diff options
author | 2019-11-08 14:58:05 -0800 | |
---|---|---|
committer | 2019-11-10 16:54:21 -0800 | |
commit | a84f3d5cb04f7dff1bf6904f0a05bc8df16137fb (patch) | |
tree | 99c8b71991efef1a63ad8102ad6d2d80795673bb /fs/xfs/libxfs/xfs_dir2_priv.h | |
parent | xfs: make the xfs_dir3_icfree_hdr available to xfs_dir2_node_addname_int (diff) | |
download | linux-a84f3d5cb04f7dff1bf6904f0a05bc8df16137fb.tar.gz linux-a84f3d5cb04f7dff1bf6904f0a05bc8df16137fb.tar.bz2 linux-a84f3d5cb04f7dff1bf6904f0a05bc8df16137fb.zip |
xfs: add a bests pointer to struct xfs_dir3_icfree_hdr
All but two callers of the ->free_bests_p dir operation already have a
struct xfs_dir3_icfree_hdr from a previous call to
xfs_dir2_free_hdr_from_disk at hand. Add a pointer to the bests to
struct xfs_dir3_icfree_hdr to clean up this pattern. To optimize this
pattern, pass the struct xfs_dir3_icfree_hdr to xfs_dir2_free_log_bests
instead of recalculating the pointer there.
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_dir2_priv.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2_priv.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_priv.h b/fs/xfs/libxfs/xfs_dir2_priv.h index 2c3370a3c010..9128f7aae0be 100644 --- a/fs/xfs/libxfs/xfs_dir2_priv.h +++ b/fs/xfs/libxfs/xfs_dir2_priv.h @@ -31,6 +31,12 @@ struct xfs_dir3_icfree_hdr { uint32_t firstdb; uint32_t nvalid; uint32_t nused; + + /* + * Pointer to the on-disk format entries, which are behind the + * variable size (v4 vs v5) header in the on-disk block. + */ + __be16 *bests; }; /* xfs_dir2.c */ |