]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: standardize ondisk to incore conversion for free space btrees
authorDarrick J. Wong <djwong@kernel.org>
Tue, 30 May 2023 11:13:55 +0000 (13:13 +0200)
committerCarlos Maiolino <cem@kernel.org>
Fri, 9 Jun 2023 08:27:50 +0000 (10:27 +0200)
commitc7005aef10dce9d9f237ad3ef73d38224b131c46
treebc740a7b054af145f1e88058ddfe9869cb974af9
parent7cb26322f749ab93cd20588c58aab22a379d76e0
xfs: standardize ondisk to incore conversion for free space btrees

Source kernel commit: 35e3b9a11740b53387e7af151768c13700f80696

Create a xfs_alloc_btrec_to_irec function to convert an ondisk record to
an incore record, and a xfs_alloc_check_irec function to detect
corruption.  Replace all the open-coded logic with calls to the new
helpers and bubble up corruption reports.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
libxfs/xfs_alloc.c
libxfs/xfs_alloc.h