diff options
author | Christoph Hellwig <hch@lst.de> | 2019-11-08 14:57:51 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-10 16:54:20 -0800 |
commit | 478c7835cb8ee28e73e732642866995f8555df7e (patch) | |
tree | 66f49ed8598c5bd29727a108996abf56f4c82c6a /fs/xfs/libxfs/xfs_dir2.c | |
parent | 545910bcc875377160b7b669e790865602a006f3 (diff) | |
download | linux-478c7835cb8ee28e73e732642866995f8555df7e.tar.gz linux-478c7835cb8ee28e73e732642866995f8555df7e.tar.bz2 linux-478c7835cb8ee28e73e732642866995f8555df7e.zip |
xfs: move the max dir2 leaf entries count to struct xfs_da_geometry
Move the max leaf entries count 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.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2.c b/fs/xfs/libxfs/xfs_dir2.c index 6e7a4e9ced5e..8093afb389a1 100644 --- a/fs/xfs/libxfs/xfs_dir2.c +++ b/fs/xfs/libxfs/xfs_dir2.c @@ -129,6 +129,8 @@ xfs_da_mount( dageo->node_hdr_size = sizeof(struct xfs_da_node_hdr); dageo->leaf_hdr_size = sizeof(struct xfs_dir2_leaf_hdr); } + dageo->leaf_max_ents = (dageo->blksize - dageo->leaf_hdr_size) / + sizeof(struct xfs_dir2_leaf_entry); /* * Now we've set up the block conversion variables, we can calculate the |