• Darrick J. Wong's avatar
    xfs: replace xfs_btree_has_record with a general keyspace scanner · 6abc7aef
    Darrick J. Wong authored
    The current implementation of xfs_btree_has_record returns true if it
    finds /any/ record within the given range.  Unfortunately, that's not
    sufficient for scrub.  We want to be able to tell if a range of keyspace
    for a btree is devoid of records, is totally mapped to records, or is
    somewhere in between.  By forcing this to be a boolean, we conflated
    sparseness and fullness, which caused scrub to return incorrect results.
    Fix the API so that we can tell the caller which of those three is the
    current state.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
    6abc7aef
xfs_refcount.h 4.45 KB