diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-23 11:00:45 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-23 11:00:45 -0400 |
commit | df2ce34c8801af8e00c7f82435fcb1e4b45a2759 (patch) | |
tree | 6231bb66994c54a18fe10ca26dfbe35e93e58721 /fs | |
parent | d571976292839cec05a2820b08f7629b145ed157 (diff) |
Btrfs: properly set new buffers for new blocks up to date
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/disk-io.c | 9 | ||||
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 | ||||
-rw-r--r-- | fs/btrfs/super.c | 3 |
3 files changed, 11 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 8e1dcda0839c..2f1eb4ae4e1d 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -10,8 +10,13 @@ static int check_tree_block(struct btrfs_root *root, struct buffer_head *buf) | |||
10 | if (buf->b_blocknr != btrfs_header_blocknr(&node->header)) | 10 | if (buf->b_blocknr != btrfs_header_blocknr(&node->header)) |
11 | BUG(); | 11 | BUG(); |
12 | if (root->node && btrfs_header_parentid(&node->header) != | 12 | if (root->node && btrfs_header_parentid(&node->header) != |
13 | btrfs_header_parentid(btrfs_buffer_header(root->node))) | 13 | btrfs_header_parentid(btrfs_buffer_header(root->node))) { |
14 | BUG(); | 14 | printk("block %Lu parentids don't match buf %Lu, root %Lu\n", |
15 | buf->b_blocknr, | ||
16 | btrfs_header_parentid(&node->header), | ||
17 | btrfs_header_parentid(btrfs_buffer_header(root->node))); | ||
18 | WARN_ON(1); | ||
19 | } | ||
15 | return 0; | 20 | return 0; |
16 | } | 21 | } |
17 | 22 | ||
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 2818f1c57170..c86f0e6152f2 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -467,7 +467,7 @@ struct buffer_head *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, | |||
467 | return NULL; | 467 | return NULL; |
468 | } | 468 | } |
469 | buf = find_tree_block(root, ins.objectid); | 469 | buf = find_tree_block(root, ins.objectid); |
470 | dirty_tree_block(trans, root, buf); | 470 | set_buffer_uptodate(buf); |
471 | return buf; | 471 | return buf; |
472 | } | 472 | } |
473 | 473 | ||
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 6080a8133d71..8970e9a82156 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -473,7 +473,10 @@ static int btrfs_sync_fs(struct super_block *sb, int wait) | |||
473 | struct btrfs_trans_handle *trans; | 473 | struct btrfs_trans_handle *trans; |
474 | struct btrfs_root *root; | 474 | struct btrfs_root *root; |
475 | int ret; | 475 | int ret; |
476 | |||
476 | sb->s_dirt = 0; | 477 | sb->s_dirt = 0; |
478 | return 0; | ||
479 | |||
477 | root = btrfs_sb(sb); | 480 | root = btrfs_sb(sb); |
478 | trans = btrfs_start_transaction(root, 1); | 481 | trans = btrfs_start_transaction(root, 1); |
479 | ret = btrfs_commit_transaction(trans, root); | 482 | ret = btrfs_commit_transaction(trans, root); |