From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: cem@kernel.org, stable@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/6] xfs: don't stash removename operations with unknown ftype
Date: Tue, 25 Aug 2026 11:12:21 -0700 [thread overview]
Message-ID: <20260825181221.GT6072@frogsfrogsfrogs> (raw)
In-Reply-To: <20260825062800.GB24324@lst.de>
On Tue, Aug 25, 2026 at 08:28:00AM +0200, Christoph Hellwig wrote:
> On Mon, Aug 24, 2026 at 10:34:54PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > LOLLM notices that the behavior of xrep_dir_replay_update changes based
> > on the ftype recorded in the stashed removename information. It also
> > notices that the unlink iops sometimes set that ftype to FT_UNKNOWN
> > because the regular directory tree update code paths don't need to know
> > the ftype of the child.
> >
> > Unfortunately, this results in incorrect link counts, which eventually
> > trips link count errors in later phases of xfs_scrub, or in xfs_repair.
> > Fix this.
>
> Fix what?
>
> > @@ -1381,9 +1381,24 @@ xrep_dir_live_update(
> > if (p->delta > 0)
> > error = xrep_dir_stash_createname(rd, p->name,
> > I_INO(p->ip));
> > - else
> > - error = xrep_dir_stash_removename(rd, p->name,
> > + else {
> > + /*
> > + * xfs_dentry_to_name in unlink or rename-exchange can
> > + * pass us names with ftype FT_UNKNOWN, but we really
> > + * must know the ftype of the child that is being
> > + * removed so that we can do nlink updates correctly
> > + * without holding inode references.
> > + */
> > + struct xfs_name name = {
> > + .name = p->name->name,
> > + .len = p->name->len,
> > + .type = xfs_mode_to_ftype(
> > + VFS_IC(p->ip)->i_mode),
> > + };
>
> .. fix up the xfs_name to always have the correct type is I guess what
> the commit log should say.
I'll expand that last sentence to read:
"Fix this by creating a second xfs_name with the type set correctly."
> With that:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Thanks!
--D
next prev parent reply other threads:[~2026-08-25 18:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 5:34 [PATCHSET 1/2] xfs: LLM-inspired bug fixes, part 7 Darrick J. Wong
2026-08-25 5:34 ` [PATCH 1/6] xfs: don't spin forever on zero-length dirents when salvaging them Darrick J. Wong
2026-08-25 6:26 ` Christoph Hellwig
2026-08-25 18:11 ` Darrick J. Wong
2026-08-25 5:34 ` [PATCH 2/6] xfs: don't stash removename operations with unknown ftype Darrick J. Wong
2026-08-25 6:28 ` Christoph Hellwig
2026-08-25 18:12 ` Darrick J. Wong [this message]
2026-08-25 5:35 ` [PATCH 3/6] xfs: log the tempip after we convert it to extents format Darrick J. Wong
2026-08-25 6:28 ` Christoph Hellwig
2026-08-25 5:35 ` [PATCH 4/6] xfs: fix parent rec lookup initialization in xrep_metapath_unlink Darrick J. Wong
2026-08-25 6:31 ` Christoph Hellwig
2026-08-25 18:14 ` Darrick J. Wong
2026-08-25 5:35 ` [PATCH 5/6] xfs: handle reconnecting metadir subdirectories Darrick J. Wong
2026-08-25 6:32 ` Christoph Hellwig
2026-08-25 23:40 ` Darrick J. Wong
2026-08-26 4:46 ` Christoph Hellwig
2026-08-26 4:53 ` Darrick J. Wong
2026-08-25 5:35 ` [PATCH 6/6] xfs: lock the healthmon when inserting unmount event Darrick J. Wong
2026-08-25 6:33 ` Christoph Hellwig
2026-08-25 18:17 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2026-08-27 5:30 [PATCHSET v2 1/2] xfs: LLM-inspired bug fixes, part 7 Darrick J. Wong
2026-08-27 5:31 ` [PATCH 2/6] xfs: don't stash removename operations with unknown ftype Darrick J. Wong
2026-09-02 5:41 [PATCHSET v3 3/5] xfs: LLM-inspired bug fixes, part 7 Darrick J. Wong
2026-09-02 5:45 ` [PATCH 2/6] xfs: don't stash removename operations with unknown ftype Darrick J. Wong
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=20260825181221.GT6072@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@lst.de \
--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 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.