From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrey Albershteyn <aalbersh@redhat.com>,
xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs_mdrestore: fix restoration on filesystems with 4k sectors
Date: Wed, 7 Jan 2026 09:22:25 -0800 [thread overview]
Message-ID: <20260107172225.GD15551@frogsfrogsfrogs> (raw)
In-Reply-To: <aV35OUeSf-g99rbY@infradead.org>
On Tue, Jan 06, 2026 at 10:12:09PM -0800, Christoph Hellwig wrote:
> On Tue, Jan 06, 2026 at 10:48:27AM -0800, Darrick J. Wong wrote:
> > + /*
> > + * The first block must be the primary super, which is at the start of
> > + * the data device, which is device 0.
> > + */
> > + if (xme.xme_addr != 0)
> > + fatal("Invalid superblock disk address 0x%llx\n",
> > + be64_to_cpu(xme.xme_addr));
> >
> > len = BBTOB(be32_to_cpu(xme.xme_len));
> >
> > + /* The primary superblock is always a single filesystem sector. */
> > + if (len < BBTOB(1) || len > 1U << XFS_MAX_SECTORSIZE_LOG)
>
> I'd use XFS_MAX_SECTORSIZE here instead of open coding the shift.
>
> Otherwise looks good.
Fixed, thanks for reading! :)
--D
prev parent reply other threads:[~2026-01-07 17:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 18:48 [PATCH] xfs_mdrestore: fix restoration on filesystems with 4k sectors Darrick J. Wong
2026-01-07 6:12 ` Christoph Hellwig
2026-01-07 17:22 ` Darrick J. Wong [this message]
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=20260107172225.GD15551@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=aalbersh@redhat.com \
--cc=hch@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.