]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: convert xfs_ialloc_has_inodes_at_extent to return keyfill scan results
authorDarrick J. Wong <djwong@kernel.org>
Wed, 31 May 2023 09:11:21 +0000 (11:11 +0200)
committerCarlos Maiolino <cem@kernel.org>
Fri, 9 Jun 2023 08:27:50 +0000 (10:27 +0200)
commitfc78c405dbea6604bdce4f45f959f48dc5ef7b0f
tree34fe1aede737b176b2a6e1a8629ab79de6e88870
parent54644f25138472d4b8ec26ac80fe47d05ff252ac
xfs: convert xfs_ialloc_has_inodes_at_extent to return keyfill scan results

Source kernel commit: efc0845f5d3e253f7f46a60b66a94c3164d76ee3

Convert the xfs_ialloc_has_inodes_at_extent function to return keyfill
scan results because for a given range of inode numbers, we might have
no indexed inodes at all; the entire region might be allocated ondisk
inodes; or there might be a mix of the two.

Unfortunately, sparse inodes adds to the complexity, because each inode
record can have holes, which means that we cannot use the generic btree
_scan_keyfill function because we must look for holes in individual
records to decide the result.  On the plus side, online fsck can now
detect sub-chunk discrepancies in the inobt.

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_ialloc.c
libxfs/xfs_ialloc.h