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: Fri, 20 Mar 2026 10:30:23 +0100	[thread overview]
Message-ID: <x25uksrwpsjceab7db5uk3cbetacnr7cfkce7sh6fb7komoaq6@mclapzhfg7e2> (raw)
In-Reply-To: <rjpefd3vudfq3wktpidlqnohf5esige634wmdka6at3auxm2bd@yk6nn77dpkde>

On Thu 19-03-26 14:05:34, Jan Kara wrote:
> On Tue 17-03-26 14:44:54, Mateusz Guzik wrote:
> > On Tue, Mar 17, 2026 at 2:39 PM Jan Kara <jack@suse.cz> wrote:
> > >
> > > 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.
> > >
> > 
> > Do you think fixing the actual bug is viable for 7.0? The above revert
> > seems most prudent for the time being.
> 
> I have an idea for relatively easy fix within ext4. I'll discuss it today
> on our ext4 developers call and if it works out, I think we can fix ext4
> for 7.0. I agree if it doesn't work out, we should revert for now. I'll let
> you know how it worked out.

Posted a tentative fix:
https://lore.kernel.org/all/20260320090428.24899-2-jack@suse.cz

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

      reply	other threads:[~2026-03-20  9:30 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
2026-03-17 13:44       ` Mateusz Guzik
2026-03-19 13:05         ` Jan Kara
2026-03-20  9:30           ` Jan Kara [this message]

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=x25uksrwpsjceab7db5uk3cbetacnr7cfkce7sh6fb7komoaq6@mclapzhfg7e2 \
    --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