diff options
author | Christoph Hellwig <hch@lst.de> | 2019-11-08 15:05:38 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-10 16:54:24 -0800 |
commit | d73e1cee8add0d18d5401b81db2351b9e8af899a (patch) | |
tree | 39a4acff9e46ddeb6a4350b08036335268309485 /fs/xfs/libxfs/xfs_dir2_block.c | |
parent | 7e8ae7bd1c5d806316e6b6403ac2dd0be7a1f82b (diff) | |
download | linux-d73e1cee8add0d18d5401b81db2351b9e8af899a.tar.gz linux-d73e1cee8add0d18d5401b81db2351b9e8af899a.tar.bz2 linux-d73e1cee8add0d18d5401b81db2351b9e8af899a.zip |
xfs: move the dir2 data block fixed offsets to struct xfs_da_geometry
Move the data block fixed offsets towards our structure for dir/attr
geometry parameters.
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_block.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2_block.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_block.c b/fs/xfs/libxfs/xfs_dir2_block.c index 35eda4d18cd8..9529a000838f 100644 --- a/fs/xfs/libxfs/xfs_dir2_block.c +++ b/fs/xfs/libxfs/xfs_dir2_block.c @@ -937,7 +937,7 @@ xfs_dir2_leaf_to_block( while (dp->i_d.di_size > args->geo->blksize) { int hdrsz; - hdrsz = dp->d_ops->data_entry_offset; + hdrsz = args->geo->data_entry_offset; bestsp = xfs_dir2_leaf_bests_p(ltp); if (be16_to_cpu(bestsp[be32_to_cpu(ltp->bestcount) - 1]) == args->geo->blksize - hdrsz) { @@ -1045,6 +1045,7 @@ xfs_dir2_sf_to_block( struct xfs_inode *dp = args->dp; struct xfs_mount *mp = dp->i_mount; struct xfs_ifork *ifp = XFS_IFORK_PTR(dp, XFS_DATA_FORK); + struct xfs_da_geometry *geo = args->geo; xfs_dir2_db_t blkno; /* dir-relative block # (0) */ xfs_dir2_data_hdr_t *hdr; /* block header */ xfs_dir2_leaf_entry_t *blp; /* block leaf entries */ @@ -1059,7 +1060,7 @@ xfs_dir2_sf_to_block( int needlog; /* need to log block header */ int needscan; /* need to scan block freespc */ int newoffset; /* offset from current entry */ - unsigned int offset = dp->d_ops->data_entry_offset; + unsigned int offset = geo->data_entry_offset; xfs_dir2_sf_entry_t *sfep; /* sf entry pointer */ xfs_dir2_sf_hdr_t *oldsfp; /* old shortform header */ xfs_dir2_sf_hdr_t *sfp; /* shortform header */ |