From: David Sterba <dsterba@suse.cz>
To: Denis Kirjanov <dkirjanov@cloudlinux.com>
Cc: Jeff Mahoney <jeffm@suse.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
chris.mason@fusionio.com
Subject: Re: __link_block_group uses GFP_KERNEL
Date: Mon, 27 Mar 2017 19:18:17 +0200 [thread overview]
Message-ID: <20170327171817.GN4781@twin.jikos.cz> (raw)
In-Reply-To: <CABxMtgdx_aC53bL0XAZaTCX=8P6=J_+Z5jyUSS1GyES_5zw_qA@mail.gmail.com>
On Sat, Mar 25, 2017 at 09:48:28AM +0300, Denis Kirjanov wrote:
> On 3/25/17, Jeff Mahoney <jeffm@suse.com> wrote:
> > On 3/24/17 5:02 AM, Denis Kirjanov wrote:
> >> Hi guys,
> >>
> >> Looks like that current code does GFP_KERNEL allocation inside
> >> __link_block_group.
> >> the function invokes kobject_add and internally creates sysfs files
> >> with the GFP_KERNEL flag set.
> >
> > Yep, that's a bug.
> >
> >> But since do_chunk_alloc executes insides the btrfs transaction it's
> >> not allowed to sleep.
> >
> > It's allowed to sleep but isn't allowed to do reclaim that involves file
> > system writeback. Michal Hocko's allocation context idea would fix
> > this, but it's not there yet, so we'll need to defer the kobject_add
> > until we can use GFP_KERNEL.
>
> Ok, I see. Can you point out to the initial patchset?
https://lwn.net/Articles/716323/
Fixing this properly is a lot of work so we might need to add a
temporary workaround, as Jeff suggests, to move calling into sysfs to a
later time.
next prev parent reply other threads:[~2017-03-27 17:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 9:02 Denis Kirjanov
2017-03-24 23:13 ` Jeff Mahoney
2017-03-25 6:48 ` Denis Kirjanov
2017-03-27 17:18 ` David Sterba [this message]
2017-03-28 8:16 ` Denis Kirjanov
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=20170327171817.GN4781@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=chris.mason@fusionio.com \
--cc=dkirjanov@cloudlinux.com \
--cc=jeffm@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®