xfs: ensure that single-owner file blocks are not owned by others
authorDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 02:00:16 +0000 (19:00 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 02:00:16 +0000 (19:00 -0700)
commit30f8ee5e7e0ccce396dff209c6cbce49d0d7e167
treea6a2c06c4502828eeb522bf31667067a5b55407c
parent69115f775f6e8e972a40aa6aa1523bcb0b252b1c
xfs: ensure that single-owner file blocks are not owned by others

For any file fork mapping that can only have a single owner, make sure
that there are no other rmap owners for that mapping.  This patch
requires the more detailed checking provided by xfs_rmap_count_owners so
that we can know how many rmap records for a given range of space had a
matching owner, how many had a non-matching owner, and how many
conflicted with the records that have a matching owner.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/bmap.c