aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-11 15:53:25 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-11 15:53:25 -0400
commit7eccb903a817e890c947ba4bc90c6a9af9b4219a (patch)
tree0e8553fb8f1dfd701d4e8eacd618ec72a8ec8720 /fs/btrfs/transaction.c
parent0bd93ba022f5c1ddb4e5b722b02f3c4a4a8865ad (diff)
Btrfs: create a logical->phsyical block number mapping scheme
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index e15a072407bf..3a15943ea8ed 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -119,10 +119,10 @@ int btrfs_commit_tree_roots(struct btrfs_trans_handle *trans,
119 119
120 while(1) { 120 while(1) {
121 old_extent_block = btrfs_root_blocknr(&extent_root->root_item); 121 old_extent_block = btrfs_root_blocknr(&extent_root->root_item);
122 if (old_extent_block == extent_root->node->b_blocknr) 122 if (old_extent_block == bh_blocknr(extent_root->node))
123 break; 123 break;
124 btrfs_set_root_blocknr(&extent_root->root_item, 124 btrfs_set_root_blocknr(&extent_root->root_item,
125 extent_root->node->b_blocknr); 125 bh_blocknr(extent_root->node));
126 ret = btrfs_update_root(trans, tree_root, 126 ret = btrfs_update_root(trans, tree_root,
127 &extent_root->root_key, 127 &extent_root->root_key,
128 &extent_root->root_item); 128 &extent_root->root_item);
@@ -176,7 +176,7 @@ int add_dirty_roots(struct btrfs_trans_handle *trans,
176 (unsigned long)root->root_key.objectid, 176 (unsigned long)root->root_key.objectid,
177 BTRFS_ROOT_TRANS_TAG); 177 BTRFS_ROOT_TRANS_TAG);
178 if (root->commit_root == root->node) { 178 if (root->commit_root == root->node) {
179 WARN_ON(root->node->b_blocknr != 179 WARN_ON(bh_blocknr(root->node) !=
180 btrfs_root_blocknr(&root->root_item)); 180 btrfs_root_blocknr(&root->root_item));
181 brelse(root->commit_root); 181 brelse(root->commit_root);
182 root->commit_root = NULL; 182 root->commit_root = NULL;
@@ -191,7 +191,7 @@ int add_dirty_roots(struct btrfs_trans_handle *trans,
191 dirty->root = root; 191 dirty->root = root;
192 root->root_key.offset = root->fs_info->generation; 192 root->root_key.offset = root->fs_info->generation;
193 btrfs_set_root_blocknr(&root->root_item, 193 btrfs_set_root_blocknr(&root->root_item,
194 root->node->b_blocknr); 194 bh_blocknr(root->node));
195 err = btrfs_insert_root(trans, root->fs_info->tree_root, 195 err = btrfs_insert_root(trans, root->fs_info->tree_root,
196 &root->root_key, 196 &root->root_key,
197 &root->root_item); 197 &root->root_item);