From: Al Viro <viro@zeniv.linux.org.uk>
To: Hugh Dickins <hughd@google.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
Christian Brauner <brauner@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: 6.19 tmpfs __d_lookup() lockup
Date: Sat, 13 Dec 2025 07:22:41 +0000 [thread overview]
Message-ID: <20251213072241.GH1712166@ZenIV> (raw)
In-Reply-To: <bed18e79-ab2b-2a8f-0c32-77e6d27e2a05@google.com>
On Fri, Dec 12, 2025 at 02:12:17AM -0800, Hugh Dickins wrote:
> Well, more than that: it's exactly the right thing to do, isn't it?
> shmem_mknod() already called d_make_peristent() which called __d_rehash(),
> calling it a second time naturally leads to the __d_lookup() lockup seen.
> And I can't see a place now for shmem_whiteout()'s "Cheat and hash" comment.
>
> Al, may I please leave you to send in the fix to Christian and/or Linus?
> You may have noticed other things on the way, that you might want to add.
>
> But if your patch resembles the below (which has now passed xfstests
> auto runs on tmpfs), please feel free to add or omit any or all of
>
> Reported-by: Hugh Dickins <hughd@google.com>
> Acked-by: Hugh Dickins <hughd@google.com>
> Tested-by: Hugh Dickins <hughd@google.com>
The problem is that the comment is not quite accurate ;-)
What it's trying to say is that we get whiteout and old_dentry
sharing parent, name and both hashed, but that won't last for
long - as soon as we get to d_move(), old_dentry will change
name and/or parent.
The trouble is, it might not _get_ to that d_move() at
all. It used to be guaranteed back when shmem_whiteout() had
been introduced (shmem_renameat2() used to have no failure
exits past shmem_whiteout() returning success), but it's no longer
true - not since a2e459555c5f "shmem: stable directory offsets"
two years ago.
Failure, AFAICS, requires severe a OOM, but it's still
a bug. What's more, simple_offset_rename() itself does not recover
from a failure, without any whiteouts being involved.
What I'm going to do is a couple of patches - one fixing
the regression in this cycle (pretty much what you'd been testing),
then a separate fix for stable offsets failure handling (present
since 2023). I'll feed them to Linus; I hoped to do that with
old regression fixed first, to reduce the PITA for backports,
but if I don't have that debugged tomorrow, I'll send the recent
regression fix first.
next prev parent reply other threads:[~2025-12-13 7:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-12 3:56 6.19 tmpfs __d_lookup() lockup Hugh Dickins
2025-12-12 5:02 ` Al Viro
2025-12-12 5:15 ` Hugh Dickins
2025-12-12 5:34 ` Al Viro
2025-12-12 5:57 ` Hugh Dickins
2025-12-12 6:30 ` Al Viro
2025-12-12 7:17 ` Hugh Dickins
2025-12-12 10:12 ` Hugh Dickins
2025-12-13 7:22 ` Al Viro [this message]
2025-12-14 3:27 ` shmem_rename() bugs (was Re: 6.19 tmpfs __d_lookup() lockup) Al Viro
2025-12-14 3:30 ` [PATCH 1/2] shmem_whiteout(): fix regression from tree-in-dcache series Al Viro
2025-12-14 3:30 ` [RFC][PATCH 2/2] shmem: fix recovery on rename failures Al Viro
2025-12-15 7:38 ` Hugh Dickins
2025-12-15 11:58 ` Christian Brauner
2025-12-15 16:03 ` Chuck Lever
2025-12-15 16:54 ` Al Viro
2025-12-16 6:02 ` [git pull] shmem rename fixes Al Viro
2025-12-16 8:04 ` pr-tracker-bot
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=20251213072241.GH1712166@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=brauner@kernel.org \
--cc=hughd@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=miklos@szeredi.hu \
/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.