From: Pavel Reichl <preichl@redhat.com>
To: linux-xfs@vger.kernel.org
Cc: djwong@kernel.org, chandanbabu@kernel.org, aalbersh@redhat.com
Subject: [PATCH v2 0/1] mdrestore: fix restore_v2() superblock length check
Date: Tue, 9 Dec 2025 23:58:51 +0100 [thread overview]
Message-ID: <20251209225852.1536714-1-preichl@redhat.com> (raw)
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).
v2:
- xme.xme_len is an ondisk value so use be32_to_cpu() instead of
cpu_to_be32()
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
next reply other threads:[~2025-12-09 22:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 22:58 Pavel Reichl [this message]
2025-12-09 22:58 ` [PATCH v2 1/1] mdrestore: fix restore_v2() superblock length check Pavel Reichl
2025-12-10 0:07 ` Darrick J. Wong
2025-12-10 5:28 ` Christoph Hellwig
2025-12-10 7:07 ` Chandan Babu R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251209225852.1536714-1-preichl@redhat.com \
--to=preichl@redhat.com \
--cc=aalbersh@redhat.com \
--cc=chandanbabu@kernel.org \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox