Re: [PATCH RFC 2/3] btrfs: consolidate device_list_mutex in prepare_sprout to its parent
From: Anand Jain <hidden>
Date: 2021-08-23 10:34:29
From: Anand Jain <hidden>
Date: 2021-08-23 10:34:29
On 21/08/2021 23:00, Su Yue wrote:
On Sat 21 Aug 2021 at 22:57, Su Yue [off-list ref] wrote:quoted
On Fri 20 Aug 2021 at 16:53, Anand Jain [off-list ref] wrote:quoted
quoted
quoted
@@ -2366,6 +2366,8 @@ static int btrfs_prepare_sprout(structbtrfs_fs_info *fs_info) u64 super_flags; lockdep_assert_held(&uuid_mutex); + lockdep_assert_held(&fs_devices->device_list_mutex); +Just a reminder: clone_fs_devices() still takes the mutex in misc-next.As I am checking clone_fs_devices() does not take any lock. Could you pls recheck?Hmmmm... misc-next: https://github.com/kdave/btrfs-devel/blob/e05983195f31374ad51a0f3712efec381397f3cb/fs/btrfs/volumes.c#L381Sorry, it should be https://github.com/kdave/btrfs-devel/blob/misc-next/fs/btrfs/volumes.c#L995
Some of the Git commands stopped working. I had to run git fsck. Now I see mutex in close_fs_devices(), not sure if I was blind to it before. Anyway, this is a bad patch. I am working to fix it. Thanks, Anand
-- Su