Thread (15 messages) 15 messages, 3 authors, 2021-08-23

Re: [PATCH RFC 2/3] btrfs: consolidate device_list_mutex in prepare_sprout to its parent

From: David Sterba <hidden>
Date: 2021-08-23 12:23:33

On Mon, Aug 23, 2021 at 06:54:04PM +0800, Anand Jain wrote:

On 23/08/2021 18:34, Anand Jain wrote:
quoted
On 21/08/2021 23:00, Su Yue wrote:
quoted
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(struct
btrfs_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#L381 
Sorry, 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.
  Git errors were distracting. But why I didn't see the 
device_list_mutex is because I had the following patch [1] in my 
workspace, which is not yet integrated to the misc-next / commented.

  [1] btrfs: fix lockdep warning while mounting sprout fs
 
https://lore.kernel.org/linux-btrfs/8325002d-f8a6-a9b7-a27d-4cf62cbbc672@oracle.com/ (local)

  So as of now, I can say this patch needs the above patch.

  Could you please apply the above patch before this patch for tests?
So if there's a dependency I'd apply the whole series.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help