xfs: make rtbitmap ILOCKing consistent when scanning the rt bitmap file
authorDarrick J. Wong <djwong@kernel.org>
Mon, 7 Nov 2022 01:03:18 +0000 (17:03 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 16 Nov 2022 23:25:03 +0000 (15:25 -0800)
commit5f369dc5b4eb2becbdfd08924dcaf00e391f4ea1
treee9967a40ae0d9107ea97d8f51160562008590732
parent9e13975bb0620c2bfa1a4d2943e7eb8514f7708e
xfs: make rtbitmap ILOCKing consistent when scanning the rt bitmap file

xfs_rtalloc_query_range scans the realtime bitmap file in order of
increasing file offset, so this caller can take ILOCK_SHARED on the rt
bitmap inode instead of ILOCK_EXCL.  This isn't going to yield any
practical benefits at mount time, but we'd like to make the locking
usage consistent around xfs_rtalloc_query_all calls.  Make all the
places we do this use the same xfs_ilock lockflags for consistency.

Fixes: 4c934c7dd60c ("xfs: report realtime space information via the rtbitmap")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_fsmap.c
fs/xfs/xfs_rtalloc.c