aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.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/extent-tree.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/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 6274f30031db..89cc4f611869 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1216,15 +1216,16 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans,
1216 if (ret == -ENOSPC) { 1216 if (ret == -ENOSPC) {
1217printk("space info full %Lu\n", flags); 1217printk("space info full %Lu\n", flags);
1218 space_info->full = 1; 1218 space_info->full = 1;
1219 goto out; 1219 goto out_unlock;
1220 } 1220 }
1221 BUG_ON(ret); 1221 BUG_ON(ret);
1222 1222
1223 ret = btrfs_make_block_group(trans, extent_root, 0, flags, 1223 ret = btrfs_make_block_group(trans, extent_root, 0, flags,
1224 BTRFS_FIRST_CHUNK_TREE_OBJECTID, start, num_bytes); 1224 BTRFS_FIRST_CHUNK_TREE_OBJECTID, start, num_bytes);
1225 BUG_ON(ret); 1225 BUG_ON(ret);
1226out: 1226out_unlock:
1227 mutex_unlock(&extent_root->fs_info->chunk_mutex); 1227 mutex_unlock(&extent_root->fs_info->chunk_mutex);
1228out:
1228 return 0; 1229 return 0;
1229} 1230}
1230 1231
@@ -2274,7 +2275,8 @@ static int noinline walk_down_tree(struct btrfs_trans_handle *trans,
2274 free_extent_buffer(next); 2275 free_extent_buffer(next);
2275 mutex_unlock(&root->fs_info->alloc_mutex); 2276 mutex_unlock(&root->fs_info->alloc_mutex);
2276 2277
2277 reada_walk_down(root, cur, path->slots[*level]); 2278 if (path->slots[*level] == 0)
2279 reada_walk_down(root, cur, path->slots[*level]);
2278 2280
2279 next = read_tree_block(root, bytenr, blocksize, 2281 next = read_tree_block(root, bytenr, blocksize,
2280 ptr_gen); 2282 ptr_gen);
@@ -2446,8 +2448,6 @@ int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root
2446 break; 2448 break;
2447 if (wret < 0) 2449 if (wret < 0)
2448 ret = wret; 2450 ret = wret;
2449 ret = -EAGAIN;
2450 break;
2451 } 2451 }
2452 for (i = 0; i <= orig_level; i++) { 2452 for (i = 0; i <= orig_level; i++) {
2453 if (path->nodes[i]) { 2453 if (path->nodes[i]) {