summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorChris Mason2008-06-12 20:46:17 +0200
committerChris Mason2008-09-25 17:04:03 +0200
commit1cc127b5d1b71453091859301de4a7dd6ee96fa8 (patch)
treecb1280305a04eb5e6838f91781e668e3bdeed208 /fs/btrfs/volumes.c
parentBTRFS_IOC_TRANS_START should be privilegued (diff)
downloadkernel-qcow2-linux-1cc127b5d1b71453091859301de4a7dd6ee96fa8.tar.gz
kernel-qcow2-linux-1cc127b5d1b71453091859301de4a7dd6ee96fa8.tar.xz
kernel-qcow2-linux-1cc127b5d1b71453091859301de4a7dd6ee96fa8.zip
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>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index c57458ce6339..ba3968571024 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2112,7 +2112,8 @@ int schedule_bio(struct btrfs_root *root, struct btrfs_device *device,
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;
}