diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 11:15:46 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-10-22 16:40:53 -0700 |
commit | 1b587d1ad9932039dc6fe36f21840e471ed677d4 (patch) | |
tree | e56583ebf33e6430410e5918ab7a6ebeb29a2f23 /fs/xfs/libxfs/xfs_btree_staging.c | |
parent | 3407d844c3e0fc4cf922b262f1beadf4efea81ce (diff) |
xfs: support storing records in the inode core root
Add the necessary flags and code so that we can support storing leaf
records in the inode root block of a btree. This hasn't been necessary
before, but the realtime rmapbt will need to be able to do this.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree_staging.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_btree_staging.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_btree_staging.c b/fs/xfs/libxfs/xfs_btree_staging.c index 6565439d7a46..697da25ec25f 100644 --- a/fs/xfs/libxfs/xfs_btree_staging.c +++ b/fs/xfs/libxfs/xfs_btree_staging.c @@ -686,7 +686,9 @@ xfs_btree_bload_compute_geometry( * * Note that bmap btrees forbid records in the root. */ - if (level != 0 && nr_this_level <= avg_per_block) { + if ((level != 0 || + (cur->bc_flags & XFS_BTREE_IROOT_RECORDS)) && + nr_this_level <= avg_per_block) { nr_blocks++; break; } |