public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] mdrestore: fix restore_v2() superblock length check
@ 2025-12-09 20:26 Pavel Reichl
  2025-12-09 20:27 ` [PATCH 1/1] " Pavel Reichl
  0 siblings, 1 reply; 7+ messages in thread
From: Pavel Reichl @ 2025-12-09 20:26 UTC (permalink / raw)
  To: linux-xfs; +Cc: chandanbabu, sandeen, zlang, aalbersh

Hi all,

On s390x (big-endian), running xfstests -g metadump currently fails
6 out of 9 tests. The failure is triggered by the superblock
extent-length validation in restore_v2(). The code rejects
xme_len == 1, but a length of 1 is the correct and expected value,
since the superblock fits within a single 512-byte sector.

On big-endian systems, this length decodes to 1 and the check aborts
the restore. On little-endian systems, the same on-disk bytes are
interpreted as 16777216, so the faulty logic never triggers there.

The patch removes the incorrect rejection of a valid extent length of
1 and applies proper logic so that the superblock extent length is
validated consistently across all architectures.

The outline of the fix was discussed with Chandan (thanks).

Pavel Reichl (1):
  mdrestore: fix restore_v2() superblock length check

 mdrestore/xfs_mdrestore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-12-10 22:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-09 20:26 [PATCH 0/1] mdrestore: fix restore_v2() superblock length check Pavel Reichl
2025-12-09 20:27 ` [PATCH 1/1] " Pavel Reichl
2025-12-09 20:50   ` Darrick J. Wong
2025-12-10  5:28     ` Christoph Hellwig
2025-12-10  6:00       ` Christoph Hellwig
2025-12-10  6:20         ` Darrick J. Wong
2025-12-10 22:53         ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox