]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: fix the xattr scrub to detect freemap/entries array collisions
authorDarrick J. Wong <djwong@kernel.org>
Fri, 23 Jan 2026 17:27:33 +0000 (09:27 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 23 Jan 2026 17:27:33 +0000 (09:27 -0800)
commit6fed8270448c246e706921c177e9633013dd3fcf
treee42c5983aa34a46795b13fa71d11a9a2577950e9
parent27a0c41f33d8d31558d334b07eb58701aab0b3dd
xfs: fix the xattr scrub to detect freemap/entries array collisions

In the previous patches, we observed that it's possible for there to be
freemap entries with zero size but a nonzero base.  This isn't an
inconsistency per se, but older kernels can get confused by this and
corrupt the block, leading to corruption.

If we see this, flag the xattr structure for optimization so that it
gets rebuilt.

Cc: <stable@vger.kernel.org> # v4.15
Fixes: 13791d3b833428 ("xfs: scrub extended attribute leaf space")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/attr.c