Btrfs: Add a thread pool just for submit_bio
If a bio submission is after a lock holder waiting for the bio
on the work queue, it is possible to deadlock. Move the bios
into their own pool.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index c57458c..ba39685 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2112,7 +2112,8 @@
spin_unlock(&device->io_lock);
if (should_queue)
- btrfs_queue_worker(&root->fs_info->workers, &device->work);
+ btrfs_queue_worker(&root->fs_info->submit_workers,
+ &device->work);
return 0;
}