Re: [PATCH 10/16] btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start

2018-04-09 Thread Anand Jain
On 04/04/2018 02:34 AM, David Sterba wrote: The volume mutex does not protect against anything in this case, the comment about scrub is right but not related to locking and looks confusing. The comment in btrfs_find_device_missing_or_by_path is wrong and confusing too. The device_list_mutex is

Re: [PATCH 10/16] btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start

2018-04-09 Thread Anand Jain
On 04/09/2018 07:53 PM, David Sterba wrote: On Mon, Apr 09, 2018 at 04:39:03PM +0800, Anand Jain wrote: On 04/04/2018 02:34 AM, David Sterba wrote: The volume mutex does not protect against anything in this case, the comment about scrub is right but not related to locking and looks confusin

Re: [PATCH 10/16] btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start

2018-04-09 Thread David Sterba
On Mon, Apr 09, 2018 at 04:39:03PM +0800, Anand Jain wrote: > > > On 04/04/2018 02:34 AM, David Sterba wrote: > > The volume mutex does not protect against anything in this case, the > > comment about scrub is right but not related to locking and looks > > confusing. The comment in btrfs_find_dev

Re: [PATCH 10/16] btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start

2018-04-09 Thread Anand Jain
On 04/09/2018 04:54 PM, Nikolay Borisov wrote: On 9.04.2018 11:39, Anand Jain wrote: On 04/04/2018 02:34 AM, David Sterba wrote: The volume mutex does not protect against anything in this case, the comment about scrub is right but not related to locking and looks confusing. The comment i

Re: [PATCH 10/16] btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start

2018-04-09 Thread Nikolay Borisov
On 9.04.2018 11:39, Anand Jain wrote: > > > On 04/04/2018 02:34 AM, David Sterba wrote: >> The volume mutex does not protect against anything in this case, the >> comment about scrub is right but not related to locking and looks >> confusing. The comment in btrfs_find_device_missing_or_by_path

Re: [PATCH 10/16] btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start

2018-04-09 Thread Anand Jain
On 04/04/2018 02:34 AM, David Sterba wrote: The volume mutex does not protect against anything in this case, the comment about scrub is right but not related to locking and looks confusing. The comment in btrfs_find_device_missing_or_by_path is wrong and confusing too. The device_list_mutex is

[PATCH 10/16] btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start

2018-04-03 Thread David Sterba
The volume mutex does not protect against anything in this case, the comment about scrub is right but not related to locking and looks confusing. The comment in btrfs_find_device_missing_or_by_path is wrong and confusing too. The device_list_mutex is not held here to protect device lookup, but in