aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-10 12:36:36 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-10 12:36:36 -0400
commitd0dbc6245cefa36e19dff49c557ccf05e3063e9c (patch)
tree88d01c9d2dbfc92aea35523f77e32d81310e3e56 /fs/btrfs/transaction.c
parent1b05da2ee6217e7d55460d04335813fec25be4ca (diff)
Btrfs: drop owner and parentid
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 54978d1bd958..f64c1729b0e1 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -163,7 +163,6 @@ int add_dirty_roots(struct btrfs_trans_handle *trans,
163 int i; 163 int i;
164 int ret; 164 int ret;
165 int err; 165 int err;
166printk("add dirty\n");
167 while(1) { 166 while(1) {
168 ret = radix_tree_gang_lookup_tag(radix, (void **)gang, 0, 167 ret = radix_tree_gang_lookup_tag(radix, (void **)gang, 0,
169 ARRAY_SIZE(gang), 168 ARRAY_SIZE(gang),
@@ -188,7 +187,6 @@ printk("add dirty\n");
188 dirty->commit_root = root->commit_root; 187 dirty->commit_root = root->commit_root;
189 root->commit_root = NULL; 188 root->commit_root = NULL;
190 dirty->root = root; 189 dirty->root = root;
191printk("adding dirty root %Lu gen %Lu blocknr %Lu\n", root->root_key.objectid, root->root_key.offset, dirty->commit_root->b_blocknr);
192 root->root_key.offset = root->fs_info->generation; 190 root->root_key.offset = root->fs_info->generation;
193 btrfs_set_root_blocknr(&root->root_item, 191 btrfs_set_root_blocknr(&root->root_item,
194 root->node->b_blocknr); 192 root->node->b_blocknr);
@@ -199,7 +197,6 @@ printk("adding dirty root %Lu gen %Lu blocknr %Lu\n", root->root_key.objectid, r
199 list_add(&dirty->list, list); 197 list_add(&dirty->list, list);
200 } 198 }
201 } 199 }
202printk("add dirty done\n");
203 return 0; 200 return 0;
204} 201}
205 202
@@ -213,12 +210,10 @@ int drop_dirty_roots(struct btrfs_root *tree_root, struct list_head *list)
213 dirty = list_entry(list->next, struct dirty_root, list); 210 dirty = list_entry(list->next, struct dirty_root, list);
214 list_del_init(&dirty->list); 211 list_del_init(&dirty->list);
215 trans = btrfs_start_transaction(tree_root, 1); 212 trans = btrfs_start_transaction(tree_root, 1);
216printk("drop snapshot root %p, commit_root blocknr %Lu generation %Lu\n", dirty->root, dirty->commit_root->b_blocknr, dirty->snap_key.offset);
217 ret = btrfs_drop_snapshot(trans, dirty->root, 213 ret = btrfs_drop_snapshot(trans, dirty->root,
218 dirty->commit_root); 214 dirty->commit_root);
219 BUG_ON(ret); 215 BUG_ON(ret);
220 216
221printk("del root objectid %Lu, offset %Lu\n", dirty->snap_key.objectid, dirty->snap_key.offset);
222 ret = btrfs_del_root(trans, tree_root, &dirty->snap_key); 217 ret = btrfs_del_root(trans, tree_root, &dirty->snap_key);
223 BUG_ON(ret); 218 BUG_ON(ret);
224 ret = btrfs_end_transaction(trans, tree_root); 219 ret = btrfs_end_transaction(trans, tree_root);
@@ -240,7 +235,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
240 235
241 mutex_lock(&root->fs_info->trans_mutex); 236 mutex_lock(&root->fs_info->trans_mutex);
242 if (trans->transaction->in_commit) { 237 if (trans->transaction->in_commit) {
243printk("already in commit!, waiting\n");
244 cur_trans = trans->transaction; 238 cur_trans = trans->transaction;
245 trans->transaction->use_count++; 239 trans->transaction->use_count++;
246 btrfs_end_transaction(trans, root); 240 btrfs_end_transaction(trans, root);