diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:15:21 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-10-14 14:17:04 -0700 |
commit | 466243ac4e24f374f2767a50e59c6b85a3f67166 (patch) | |
tree | 5990e3155eb4fb09c7fcae263fad850b1fe9c587 /fs/xfs/libxfs/xfs_btree_staging.c | |
parent | 68c9dbfe5c91c081dbaa27d2b74f8045640ae2ef (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 fc812dacd4a6..c83daceaaece 100644 --- a/fs/xfs/libxfs/xfs_btree_staging.c +++ b/fs/xfs/libxfs/xfs_btree_staging.c @@ -681,7 +681,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; } |