From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>,
Carlos Maiolino <cem@kernel.org>,
linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuangpeng Bai <shuangpeng.kernel@gmail.com>
Subject: Re: [PATCH] xfs: start inodegc after quota initialization
Date: Wed, 15 Apr 2026 08:12:37 -0700 [thread overview]
Message-ID: <20260415151237.GA114209@frogsfrogsfrogs> (raw)
In-Reply-To: <ad89k-qafk3jsx35@infradead.org>
On Wed, Apr 15, 2026 at 12:26:11AM -0700, Christoph Hellwig wrote:
> On Mon, Apr 13, 2026 at 11:09:40AM -0700, Darrick J. Wong wrote:
> > > index ef1ea8a1238c..d6f75ab41337 100644
> > > --- a/fs/xfs/xfs_mount.c
> > > +++ b/fs/xfs/xfs_mount.c
> > > @@ -1057,7 +1057,6 @@ xfs_mountfs(
> > > xfs_clear_using_logged_xattrs(mp);
> > >
> > > /* Enable background inode inactivation workers. */
> > > - xfs_inodegc_start(mp);
> > > xfs_blockgc_start(mp);
> > >
> > > if (xfs_has_metadir(mp)) {
> > > @@ -1143,6 +1142,8 @@ xfs_mountfs(
> > > }
> > > }
> > >
> > > + xfs_inodegc_start(mp);
> >
> > Why is it correct to defer inodegc until this point? Can any code
> > between line 1060 and 1145 push an inode to the inodegc mechanism?
> > blockgc can unmap blocks from files, so why is it ok to leave the
> > blockgc_start call where it is?
>
> Looking at this - I think actually performing inodegc before quotas
> are up sounds dangerous, as we'd miss th quota accounting. So I
> think we need to defer starting the runners after that. But we
> should support queuing up inodes before that. blockgc has
> the same issues.
Hmm. Very very occasionally I'll see one generic/388 fail in xfs_repair
with slightly wrong quota icount. /me wonders if this might be it? In
theory quotacheck could be run to fix the accounting inaccuracies (ugh)
but it's probably better just to defer gc startup.
My original question ("can any code push an inode to gc...?") remains.
--D
next prev parent reply other threads:[~2026-04-15 15:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-13 0:49 [PATCH] xfs: start inodegc after quota initialization Pedro Demarchi Gomes
2026-04-13 18:09 ` Darrick J. Wong
2026-04-15 7:26 ` Christoph Hellwig
2026-04-15 15:12 ` Darrick J. Wong [this message]
2026-04-16 0:55 ` Dave Chinner
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=20260415151237.GA114209@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=pedrodemargomes@gmail.com \
--cc=shuangpeng.kernel@gmail.com \
/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