]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: fix getfsmap reporting past the last rt extent
authorDarrick J. Wong <djwong@kernel.org>
Wed, 11 Jun 2025 21:01:07 +0000 (14:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:18 +0000 (11:07 +0100)
commit24d503729f82b0383e5aa65d8acc1c9373c0975c
tree107ff3a260b032a606d58a3236e408ba9d36a29b
parent15da730a85681f209d5b406b2adcb17360a0b65e
xfs: fix getfsmap reporting past the last rt extent

[ Upstream commit d898137d789cac9ebe5eed9957e4cf25122ca524 ]

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>
Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
Acked-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/xfs_fsmap.c