Explorar o código

Btrfs: Release uuid_mutex for shrink during device delete

Device scanning waits on the uuid_mutex, which can result in a very long
wait if dev delete is shrinking the device.

Signed-off-by: Carey Underwood <cwillu@cwillu.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Carey Underwood %!s(int64=12) %!d(string=hai) anos
pai
achega
d790155457
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      fs/btrfs/volumes.c

+ 2 - 0
fs/btrfs/volumes.c

@@ -1562,7 +1562,9 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
 		clear_super = true;
 	}
 
+	mutex_unlock(&uuid_mutex);
 	ret = btrfs_shrink_device(device, 0);
+	mutex_lock(&uuid_mutex);
 	if (ret)
 		goto error_undo;