xfs: fix getfsmap reporting past the last rt extent
authorDarrick J. Wong <djwong@kernel.org>
Fri, 30 Jun 2023 00:39:44 +0000 (17:39 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Sun, 2 Jul 2023 16:26:18 +0000 (09:26 -0700)
commitd898137d789cac9ebe5eed9957e4cf25122ca524
treedd24a50873f75e1eb3afb504304a212f790b03df
parent7975aba19cba4eba7ff60410f9294c90edc96dcf
xfs: fix getfsmap reporting past the last rt extent

The realtime section ends at the last rt extent.  If the user configures
the rt geometry with an extent size that is not an integer factor of the
number of rt blocks, it's possible for there to be rt blocks past the
end of the last rt extent.  These tail blocks cannot ever be allocated
and will cause corruption reports if the last extent coincides with the
end of an rt bitmap block, so do not report consider them for the
GETFSMAP output.

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