From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 2/4] btrfs: init sysfs for devices outside of the chunk_mutex
Date: Wed, 2 Sep 2020 19:45:49 +0200 [thread overview]
Message-ID: <20200902174549.GL28318@twin.jikos.cz> (raw)
In-Reply-To: <79ace2bf-6f01-39ee-0566-727182c5ff85@oracle.com>
On Wed, Sep 02, 2020 at 02:21:31PM +0800, Anand Jain wrote:
> > @@ -2609,6 +2606,10 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path
> > btrfs_clear_space_info_full(fs_info);
> >
> > mutex_unlock(&fs_info->chunk_mutex);
> > +
> > + /* add sysfs device entry */
> > + btrfs_sysfs_add_devices_dir(fs_devices, device);
> > +
> > mutex_unlock(&fs_devices->device_list_mutex);
> >
> > if (seeding_dev) {
> >
>
> Strange we should get this splat when btrfs_sysfs_add_devices_dir()
> already has implicit GFP_NOFS allocation scope right? What did I
> miss?
The problem is the sysfs' kernfs_mutex, all sysfs allocations are
GFP_KERNEL thus it can grab fs_reclaim at some point.
next prev parent reply other threads:[~2020-09-02 17:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 21:40 [PATCH 0/4][v2] Lockdep fixes Josef Bacik
2020-09-01 21:40 ` [PATCH 1/4] btrfs: fix lockdep splat in add_missing_dev Josef Bacik
2020-09-02 6:23 ` Anand Jain
2020-09-03 11:17 ` David Sterba
2020-09-01 21:40 ` [PATCH 2/4] btrfs: init sysfs for devices outside of the chunk_mutex Josef Bacik
2020-09-02 6:21 ` Anand Jain
2020-09-02 17:45 ` David Sterba [this message]
2020-09-03 11:41 ` Anand Jain
2020-09-03 11:42 ` Anand Jain
2020-09-03 11:18 ` David Sterba
2020-09-01 21:40 ` [PATCH 3/4] btrfs: kill the rcu protection for fs_info->space_info Josef Bacik
2020-09-02 8:04 ` Nikolay Borisov
2020-09-02 10:32 ` David Sterba
2020-09-01 21:40 ` [PATCH 4/4] btrfs: do not create raid sysfs entries under any locks Josef Bacik
2020-09-08 12:40 ` David Sterba
2020-09-08 12:52 ` Josef Bacik
2020-09-04 14:20 ` [PATCH 0/4][v2] Lockdep fixes David Sterba
2020-09-07 13:05 ` David Sterba
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=20200902174549.GL28318@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=anand.jain@oracle.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox