]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: fold xfs_bmbt_init_common into xfs_bmbt_init_cursor
authorChristoph Hellwig <hch@lst.de>
Mon, 22 Apr 2024 17:01:04 +0000 (10:01 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:38 +0000 (11:37 -0700)
commitec6bbb1e83534e7a32ceae070cc2d99d3264bba1
treec78ca72d92d72a2b5c99e7125ef5d3477570f3f3
parent1ea0233c7a62f9e8411a1ef6ed7a32b6c866a6b7
xfs: fold xfs_bmbt_init_common into xfs_bmbt_init_cursor

Source kernel commit: 802f91f7b1d535ac975e2d696bf5b5dea82816e7

Make the levels initialization in xfs_bmbt_init_cursor conditional
and merge the two helpers.

This requires the fakeroot case to now pass a -1 whichfork directly
into xfs_bmbt_init_cursor, and some special casing for that, but
at least this scheme to deal with the fake btree root is handled and
documented in once place now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: tidy up a multline ternary]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_bmap_btree.c