public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: Jan Kara <jack@suse.cz>,
	brauner@kernel.org, viro@zeniv.linux.org.uk,
	 linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	 "Lai, Yi" <yi1.lai@linux.intel.com>
Subject: Re: [PATCH] fs: revert insert_inode_locked() eviction wait change and explain why
Date: Tue, 17 Mar 2026 14:39:34 +0100	[thread overview]
Message-ID: <6mknq4cxnf2dhix23gv4wqxy3vnzmhy5opxwpd72ncnpdgnnxr@omhnt5rktvir> (raw)
In-Reply-To: <CAGudoHEMpe6r+g8OOhFPDAiHtVDraPxA4kSmVLp469g5YZgzYA@mail.gmail.com>

On Tue 17-03-26 14:12:48, Mateusz Guzik wrote:
> On Tue, Mar 17, 2026 at 2:01 PM Jan Kara <jack@suse.cz> wrote:
> >
> > On Mon 16-03-26 11:33:05, Mateusz Guzik wrote:
> > > It causes a deadlock, reproducer can be found here:
> > > https://lore.kernel.org/linux-fsdevel/abNvb2PcrKj1FBeC@ly-workstation/
> > >
> > > The real bug is in ext4, but I'm not digging into it and a working order
> > > needs to be restored.
> >
> > I can dig into that. I expect ext4 ends up calling find_inode() from its
> > ext4_evict_inode() handler or something like that? I was searching for such
> > occurrence for a while but I didn't find it so can you share where ext4
> > blocked? Because the stacktraces from the original report just show the
> > journalling machinery hangs but those are only side-effects of somebody
> > hanging in ext4 with the transaction handle started... Thanks!
> all traces attached

Thanks! OK, for reference the inode has been marked as 'sync' so

ext4_evict_inode() -> ext4_journal_stop()

ends up waiting for transaction commit. However ext4_new_inode() calls
insert_inode_locked() with started transaction handle and thus waits for
the freeing inode with the handle started. Classical ABBA deadlock. I'll
think how we could sensibly fix this in ext4.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2026-03-17 13:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 10:33 [PATCH] fs: revert insert_inode_locked() eviction wait change and explain why Mateusz Guzik
2026-03-17 13:01 ` Jan Kara
2026-03-17 13:12   ` Mateusz Guzik
2026-03-17 13:39     ` Jan Kara [this message]
2026-03-17 13:44       ` Mateusz Guzik
2026-03-19 13:05         ` Jan Kara
2026-03-20  9:30           ` Jan Kara

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=6mknq4cxnf2dhix23gv4wqxy3vnzmhy5opxwpd72ncnpdgnnxr@omhnt5rktvir \
    --to=jack@suse.cz \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjguzik@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yi1.lai@linux.intel.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