diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-04-11 19:00:15 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-04-11 19:00:15 -0700 |
commit | efc0845f5d3e253f7f46a60b66a94c3164d76ee3 (patch) | |
tree | f1c6b081e9a06a86e586f20815d54ca2c13ab1be /fs/xfs/libxfs/xfs_ialloc.h | |
parent | bc0f3b55467e1b5833bebae011a07e72a35afc2e (diff) | |
download | linux-efc0845f5d3e253f7f46a60b66a94c3164d76ee3.tar.gz linux-efc0845f5d3e253f7f46a60b66a94c3164d76ee3.tar.bz2 linux-efc0845f5d3e253f7f46a60b66a94c3164d76ee3.zip |
xfs: convert xfs_ialloc_has_inodes_at_extent to return keyfill scan results
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_ialloc.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.h b/fs/xfs/libxfs/xfs_ialloc.h index 90b0e5079338..fe824bb04a09 100644 --- a/fs/xfs/libxfs/xfs_ialloc.h +++ b/fs/xfs/libxfs/xfs_ialloc.h @@ -96,9 +96,8 @@ void xfs_inobt_btrec_to_irec(struct xfs_mount *mp, xfs_failaddr_t xfs_inobt_check_irec(struct xfs_btree_cur *cur, const struct xfs_inobt_rec_incore *irec); int xfs_ialloc_has_inodes_at_extent(struct xfs_btree_cur *cur, - xfs_agblock_t bno, xfs_extlen_t len, bool *exists); -int xfs_ialloc_has_inode_record(struct xfs_btree_cur *cur, xfs_agino_t low, - xfs_agino_t high, bool *exists); + xfs_agblock_t bno, xfs_extlen_t len, + enum xbtree_recpacking *outcome); int xfs_ialloc_count_inodes(struct xfs_btree_cur *cur, xfs_agino_t *count, xfs_agino_t *freecount); int xfs_inobt_insert_rec(struct xfs_btree_cur *cur, uint16_t holemask, |