Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: David Sterba <dsterba@suse.cz>
Cc: Olof Johansson <olof@lixom.net>,
	dsterba@suse.de, linux-btrfs@vger.kernel.org, clm@fb.com,
	linux-kernel@vger.kernel.org
Subject: Re: Circular lock dep in btrfs triggered by shrinker
Date: Tue, 23 Oct 2018 09:53:30 +0200	[thread overview]
Message-ID: <20181023075330.GP18839@dhcp22.suse.cz> (raw)
In-Reply-To: <20181022182243.GM16290@twin.jikos.cz>

On Mon 22-10-18 20:22:43, David Sterba wrote:
> On Mon, Oct 22, 2018 at 03:07:26AM -0700, Olof Johansson wrote:
> > I hit the below circular locking dependency. Seems like the assumption made in
> > 712e36c5f2a7fa56 ("btrfs: use GFP_KERNEL in btrfs_alloc_inode") either isn't
> > true, or has since changed?
> 
> I think it must have been there from the beginning. There were reports
> of this lockdep warning like the below and IIRC a few more
> (https://lkml.kernel.org/r/20180627120523.GA2287@suse.cz), but without a
> resolution.
> 
> Incidentally, there was a fix that's now in the 4.20 pull and only after
> I had seen your report I realized that it was the fix for the warning:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git/commit/?h=for-4.20-part1&id=84de76a2fb217dc1b6bc2965cc397d1648aa1404
> 
> It disables the filesystem allocations using the memalloc_nofs mechanism
> around free space inode allocation, while my original patch expected
> only regular inodes created by VFS.

Wouldn't it be better/possible to take the mark the scope at the higher
level where you take the trans handle?
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-10-23  7:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22 10:07 Circular lock dep in btrfs triggered by shrinker Olof Johansson
2018-10-22 18:22 ` David Sterba
2018-10-23  7:53   ` Michal Hocko [this message]
2018-10-23  8:41   ` Olof Johansson

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=20181023075330.GP18839@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=clm@fb.com \
    --cc=dsterba@suse.cz \
    --cc=dsterba@suse.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    /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