Re: [PATCH 2/2] btrfs: scrub: fix circular locking dependency warning

2018-11-29 Thread Anand Jain
On 11/30/2018 09:05 AM, Anand Jain wrote: On 11/29/2018 10:31 PM, David Sterba wrote: On Wed, Nov 28, 2018 at 04:47:27PM +0800, Anand Jain wrote: 2. scrub_workers_refcnt must eventually be converted to refcount_t type    ok. Added in v2 patch set. No such thing is in v2 and this would

Re: [PATCH 2/2] btrfs: scrub: fix circular locking dependency warning

2018-11-29 Thread Anand Jain
On 11/29/2018 10:31 PM, David Sterba wrote: On Wed, Nov 28, 2018 at 04:47:27PM +0800, Anand Jain wrote: 2. scrub_workers_refcnt must eventually be converted to refcount_t type ok. Added in v2 patch set. No such thing is in v2 and this would actually get rid of the need to hold scrub_lo

Re: [PATCH 2/2] btrfs: scrub: fix circular locking dependency warning

2018-11-29 Thread David Sterba
On Wed, Nov 28, 2018 at 04:47:27PM +0800, Anand Jain wrote: > > 2. scrub_workers_refcnt must eventually be converted to refcount_t type > > ok. Added in v2 patch set. No such thing is in v2 and this would actually get rid of the need to hold scrub_lock in scrub_workers_put. Which in turn can be

Re: [PATCH 2/2] btrfs: scrub: fix circular locking dependency warning

2018-11-28 Thread Anand Jain
On 11/26/2018 05:59 PM, Nikolay Borisov wrote: On 26.11.18 г. 11:07 ч., Anand Jain wrote: Circular locking dependency check reports warning[1], that's because the btrfs_scrub_dev() calls the stack #0 below with, the fs_info::scrub_lock held. The test case leading to this warning.. mkfs.

Re: [PATCH 2/2] btrfs: scrub: fix circular locking dependency warning

2018-11-26 Thread Nikolay Borisov
On 26.11.18 г. 11:07 ч., Anand Jain wrote: > Circular locking dependency check reports warning[1], that's because > the btrfs_scrub_dev() calls the stack #0 below with, the > fs_info::scrub_lock held. The test case leading to this warning.. > > mkfs.btrfs -fq /dev/sdb && mount /dev/sdb /btrfs

[PATCH 2/2] btrfs: scrub: fix circular locking dependency warning

2018-11-26 Thread Anand Jain
Circular locking dependency check reports warning[1], that's because the btrfs_scrub_dev() calls the stack #0 below with, the fs_info::scrub_lock held. The test case leading to this warning.. mkfs.btrfs -fq /dev/sdb && mount /dev/sdb /btrfs btrfs scrub start -B /btrfs In fact we have fs_info: