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>
This commit is contained in:
Chris Mason
2008-06-12 14:46:17 -04:00
parent df5b5520b2
commit 1cc127b5d1
3 changed files with 10 additions and 1 deletions

View File

@@ -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;
}