]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: move the zero records logic into xfs_bmap_broot_space_calc
authorDarrick J. Wong <djwong@kernel.org>
Wed, 29 May 2024 04:11:28 +0000 (21:11 -0700)
committerChristoph Hellwig <hch@lst.de>
Mon, 12 Aug 2024 07:35:28 +0000 (09:35 +0200)
commit54e66c6c0093a56164dcb44c16fc55af6e923f8b
treec295d23cf386121e28406a1541b50dd9581a27d0
parent8f62df6138faad407fb9822dfcbe3320866da30c
xfs: move the zero records logic into xfs_bmap_broot_space_calc

The bmap btree cannot ever have zero records in an incore btree block.
If the number of records drops to zero, that means we're converting the
fork to extents format and are trying to remove the tree.  This logic
won't hold for the future realtime rmap btree, so move the logic into
the bmbt code.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/libxfs/xfs_bmap_btree.h
fs/xfs/libxfs/xfs_inode_fork.c