From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: David Sterba <dsterba@suse.com>,
linux-btrfs@vger.kernel.org, fdmanana@suse.com
Subject: Re: [PATCH 2/2] btrfs: scrub: move scrub_setup_ctx allocation out of device_list_mutex
Date: Wed, 5 Dec 2018 01:17:54 +0100 [thread overview]
Message-ID: <20181205001754.GW17773@twin.jikos.cz> (raw)
In-Reply-To: <e0917cec-7d06-6217-16f4-9f83d3ae5ff6@suse.com>
On Tue, Dec 04, 2018 at 05:22:19PM +0200, Nikolay Borisov wrote:
> > @@ -3874,16 +3882,9 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
> > if (ret) {
> > mutex_unlock(&fs_info->scrub_lock);
> > mutex_unlock(&fs_info->fs_devices->device_list_mutex);
> > - return ret;
> > + goto out_free_ctx;
>
> Don't we suffer the same issue when calling scrub_workers_get since in
> it we do btrfs_alloc_workqueue which also calls kzalloc with GFP_KERNEL?
Yes, that's right. I instrumented only the allocations in scrub.c to see
if the nofs and lock_not_held assertions work at all so this one did not
get caught directly.
As scrub_workers_get still needs the scrub_lock, fixing it by moving
does not work and would need more restructuring.
prev parent reply other threads:[~2018-12-05 0:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-04 15:11 [PATCH 0/2] Scrub allocations vs reclaim fix David Sterba
2018-12-04 15:11 ` [PATCH 1/2] btrfs: scrub: pass fs_info to scrub_setup_ctx David Sterba
2018-12-04 15:15 ` Nikolay Borisov
2018-12-04 15:11 ` [PATCH 2/2] btrfs: scrub: move scrub_setup_ctx allocation out of device_list_mutex David Sterba
2018-12-04 15:22 ` Nikolay Borisov
2018-12-05 0:17 ` David Sterba [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=20181205001754.GW17773@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=dsterba@suse.com \
--cc=fdmanana@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.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;
as well as URLs for NNTP newsgroup(s).