From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: cem@kernel.org, stable@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 05/12] xfs: update quota flags on secondary supers when metadir enabled
Date: Mon, 12 Oct 2026 09:30:50 -0700 [thread overview]
Message-ID: <20261012163050.GD2705364@frogsfrogsfrogs> (raw)
In-Reply-To: <aszd-kWFK1cCJ2oR@infradead.org>
On Mon, Oct 12, 2026 at 06:17:46AM -0700, Christoph Hellwig wrote:
> On Sun, Oct 11, 2026 at 11:00:09PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > xfs/085 exposes an interesting bug when metadir is enabled, quotas are
> > enabled via mount option, and the primary superblock crc fails
> > validation:
>
> The code looks ok, but I think the Sashiko complaints about non-metadir
> fses at least are valid.
Yep, I'll fix that.
> Handling the errors seems fine, but maybe the
> comments shouldn't mislead it that the update is purely opportunistic?
Yeah. As written this patch makes secondary sb update failures block
mount, but on second thought I decided that since the secondaries only
come into play for xfs_repair, and only if the primary gets clobbered,
this all can get backed down to a warning:
/*
* For metadir filesystems, quota flag state persists across mounts, so
* update secondary superblocks in case xfs_repair ever has to recover
* the primary from a secondary. growfs also updates backup supers so
* lock against that. Note that the secondary backups are
* opportunistic, so we log but do not return write errors.
*/
void
__xfs_qm_update_secondary_metadir_sb(
struct xfs_mount *mp,
const char *func)
{
int error;
if (!xfs_has_metadir(mp))
return;
mutex_lock(&mp->m_growlock);
error = xfs_update_secondary_sbs(mp);
mutex_unlock(&mp->m_growlock);
if (error)
xfs_alert(mp, "%s: Secondary super update failed, err=%d!",
func, error);
}
And this sole helper can get called from the three places that need it.
--D
next prev parent reply other threads:[~2026-10-12 16:30 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 5:55 [PATCHSET 2/2] xfs: LLM-inspired bug fixes, part 23 Darrick J. Wong
2026-10-12 5:59 ` [PATCH 01/12] xfs: don't set a metadata directory's parent to sb_rootino Darrick J. Wong
2026-10-12 13:13 ` Christoph Hellwig
2026-10-12 5:59 ` [PATCH 02/12] xfs: don't rescan ifree and icount when frozen Darrick J. Wong
2026-10-12 13:13 ` Christoph Hellwig
2026-10-12 5:59 ` [PATCH 03/12] xfs: rescan the AGs if incore delalloc counter is negative Darrick J. Wong
2026-10-12 13:16 ` Christoph Hellwig
2026-10-12 16:14 ` Darrick J. Wong
2026-10-12 5:59 ` [PATCH 04/12] xfs: don't try to repair rtsummary if the summary file isn't computed Darrick J. Wong
2026-10-12 13:16 ` Christoph Hellwig
2026-10-12 6:00 ` [PATCH 05/12] xfs: update quota flags on secondary supers when metadir enabled Darrick J. Wong
2026-10-12 13:17 ` Christoph Hellwig
2026-10-12 16:30 ` Darrick J. Wong [this message]
2026-10-12 6:00 ` [PATCH 06/12] xfs: refactor directory data block walking loops in scrub Darrick J. Wong
2026-10-12 13:18 ` Christoph Hellwig
2026-10-12 6:00 ` [PATCH 07/12] xfs: improve dirent bounds checking in scrub and repair Darrick J. Wong
2026-10-12 13:18 ` Christoph Hellwig
2026-10-12 6:00 ` [PATCH 08/12] xfs: drop unnecessary sa parameter from the xrep_ag init functions Darrick J. Wong
2026-10-12 13:18 ` Christoph Hellwig
2026-10-12 6:01 ` [PATCH 09/12] xfs: drop unnecessary sr parameter from xrep_rtgroup " Darrick J. Wong
2026-10-12 13:19 ` Christoph Hellwig
2026-10-12 6:01 ` [PATCH 10/12] xfs: drop unnecessary sa parameter from xchk_ag " Darrick J. Wong
2026-10-12 13:19 ` Christoph Hellwig
2026-10-12 6:01 ` [PATCH 11/12] xfs: drop unnecessary sr parameter from xchk_rtgroup " Darrick J. Wong
2026-10-12 13:19 ` Christoph Hellwig
2026-10-12 6:01 ` [PATCH 12/12] xfs: refactor inode forkoff to byte conversions Darrick J. Wong
2026-10-12 13:19 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2026-10-13 6:05 [PATCHSET v2 2/2] xfs: LLM-inspired bug fixes, part 23 Darrick J. Wong
2026-10-13 6:09 ` [PATCH 05/12] xfs: update quota flags on secondary supers when metadir enabled Darrick J. Wong
2026-10-13 11:48 ` Christoph Hellwig
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=20261012163050.GD2705364@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@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