]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: reset rootdir extent size hint after growfsrt
authorDarrick J. Wong <djwong@kernel.org>
Wed, 11 Jun 2025 21:01:27 +0000 (14:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:20 +0000 (11:07 +0100)
commit7cdd0cf04251086e820d10e99d9e1f3e8530c808
treedca2f757feb0db006c895c8db2e3cf95419a821d
parentfcb0e9a4d32ade1c0c97b7147dd6da0a32ad0240
xfs: reset rootdir extent size hint after growfsrt

[ Upstream commit a24cae8fc1f13f6f6929351309f248fd2e9351ce ]

If growfsrt is run on a filesystem that doesn't have a rt volume, it's
possible to change the rt extent size.  If the root directory was
previously set up with an inherited extent size hint and rtinherit, it's
possible that the hint is no longer a multiple of the rt extent size.
Although the verifiers don't complain about this, xfs_repair will, so if
we detect this situation, log the root directory to clean it up.  This
is still racy, but it's better than nothing.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
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_rtalloc.c