aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-06-25 16:01:31 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:03 -0400
commita74a4b97b61beede185b4b3ad359d7d378b0d312 (patch)
tree49ce5e7698f08e84d0ad2f65768e9f34b64d79c5 /fs/btrfs/volumes.c
parent89ce8a63d0c761fbb02089850605360f389477d8 (diff)
Btrfs: Replace the transaction work queue with kthreads
This creates one kthread for commits and one kthread for deleting old snapshots. All the work queues are removed. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 869864ddcc29..4e7cee27aab5 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -271,13 +271,17 @@ again:
271 list_for_each(cur, head) { 271 list_for_each(cur, head) {
272 device = list_entry(cur, struct btrfs_device, dev_list); 272 device = list_entry(cur, struct btrfs_device, dev_list);
273 if (!device->in_fs_metadata) { 273 if (!device->in_fs_metadata) {
274 if (device->bdev) { 274 struct block_device *bdev;
275 close_bdev_excl(device->bdev);
276 fs_devices->open_devices--;
277 }
278 list_del(&device->dev_list); 275 list_del(&device->dev_list);
279 list_del(&device->dev_alloc_list); 276 list_del(&device->dev_alloc_list);
280 fs_devices->num_devices--; 277 fs_devices->num_devices--;
278 if (device->bdev) {
279 bdev = device->bdev;
280 fs_devices->open_devices--;
281 mutex_unlock(&uuid_mutex);
282 close_bdev_excl(bdev);
283 mutex_lock(&uuid_mutex);
284 }
281 kfree(device->name); 285 kfree(device->name);
282 kfree(device); 286 kfree(device);
283 goto again; 287 goto again;