]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: add a xfs_btree_init_ptr_from_cur
authorChristoph Hellwig <hch@lst.de>
Mon, 22 Apr 2024 17:01:01 +0000 (10:01 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:38 +0000 (11:37 -0700)
commit579ae419f531ab403bf81daa57e636d5d27f53cf
tree5b3e82d14ee5a240148e3b8267376777af786a60
parent054feadaae5b7fbe91c7acbbb17ebb4a068c6c44
xfs: add a xfs_btree_init_ptr_from_cur

Source kernel commit: f9c18129e57df7b33f4257340840525816481da6

Inode-rooted btrees don't need to initialize the root pointer in the
->init_ptr_from_cur method as the root is found by the
xfs_btree_get_iroot method later.  Make ->init_ptr_from_cur option
for inode rooted btrees by providing a helper that does the right
thing for the given btree type and also documents the semantics.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_bmap_btree.c
libxfs/xfs_btree.c
libxfs/xfs_btree.h
libxfs/xfs_btree_staging.c