diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-09-04 08:44:16 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-09-04 08:44:16 -0400 |
| commit | 695a461296e5df148c99ac087b9e1cb380f4db15 (patch) | |
| tree | 951893036fdc0b7bae0e17bc739ac8ffe909781d /fs/btrfs/disk-io.c | |
| parent | c7084b35eb1a4d3353a501508baf9d3d82822c93 (diff) | |
| parent | 2b681fafcc50fea6304ed418667c9d04282acb73 (diff) | |
Merge branch 'amd-iommu/2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into core/iommu
Diffstat (limited to 'fs/btrfs/disk-io.c')
| -rw-r--r-- | fs/btrfs/disk-io.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index d28d29c95f7c..e83be2e4602c 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
| @@ -1639,6 +1639,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
| 1639 | mutex_init(&fs_info->cleaner_mutex); | 1639 | mutex_init(&fs_info->cleaner_mutex); |
| 1640 | mutex_init(&fs_info->volume_mutex); | 1640 | mutex_init(&fs_info->volume_mutex); |
| 1641 | mutex_init(&fs_info->tree_reloc_mutex); | 1641 | mutex_init(&fs_info->tree_reloc_mutex); |
| 1642 | init_rwsem(&fs_info->extent_commit_sem); | ||
| 1642 | 1643 | ||
| 1643 | btrfs_init_free_cluster(&fs_info->meta_alloc_cluster); | 1644 | btrfs_init_free_cluster(&fs_info->meta_alloc_cluster); |
| 1644 | btrfs_init_free_cluster(&fs_info->data_alloc_cluster); | 1645 | btrfs_init_free_cluster(&fs_info->data_alloc_cluster); |
| @@ -1799,6 +1800,11 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
| 1799 | btrfs_super_chunk_root(disk_super), | 1800 | btrfs_super_chunk_root(disk_super), |
| 1800 | blocksize, generation); | 1801 | blocksize, generation); |
| 1801 | BUG_ON(!chunk_root->node); | 1802 | BUG_ON(!chunk_root->node); |
| 1803 | if (!test_bit(EXTENT_BUFFER_UPTODATE, &chunk_root->node->bflags)) { | ||
| 1804 | printk(KERN_WARNING "btrfs: failed to read chunk root on %s\n", | ||
| 1805 | sb->s_id); | ||
| 1806 | goto fail_chunk_root; | ||
| 1807 | } | ||
| 1802 | btrfs_set_root_node(&chunk_root->root_item, chunk_root->node); | 1808 | btrfs_set_root_node(&chunk_root->root_item, chunk_root->node); |
| 1803 | chunk_root->commit_root = btrfs_root_node(chunk_root); | 1809 | chunk_root->commit_root = btrfs_root_node(chunk_root); |
| 1804 | 1810 | ||
| @@ -1826,6 +1832,11 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
| 1826 | blocksize, generation); | 1832 | blocksize, generation); |
| 1827 | if (!tree_root->node) | 1833 | if (!tree_root->node) |
| 1828 | goto fail_chunk_root; | 1834 | goto fail_chunk_root; |
| 1835 | if (!test_bit(EXTENT_BUFFER_UPTODATE, &tree_root->node->bflags)) { | ||
| 1836 | printk(KERN_WARNING "btrfs: failed to read tree root on %s\n", | ||
| 1837 | sb->s_id); | ||
| 1838 | goto fail_tree_root; | ||
| 1839 | } | ||
| 1829 | btrfs_set_root_node(&tree_root->root_item, tree_root->node); | 1840 | btrfs_set_root_node(&tree_root->root_item, tree_root->node); |
| 1830 | tree_root->commit_root = btrfs_root_node(tree_root); | 1841 | tree_root->commit_root = btrfs_root_node(tree_root); |
| 1831 | 1842 | ||
| @@ -2322,6 +2333,9 @@ int close_ctree(struct btrfs_root *root) | |||
| 2322 | printk(KERN_ERR "btrfs: commit super ret %d\n", ret); | 2333 | printk(KERN_ERR "btrfs: commit super ret %d\n", ret); |
| 2323 | } | 2334 | } |
| 2324 | 2335 | ||
| 2336 | fs_info->closing = 2; | ||
| 2337 | smp_mb(); | ||
| 2338 | |||
| 2325 | if (fs_info->delalloc_bytes) { | 2339 | if (fs_info->delalloc_bytes) { |
| 2326 | printk(KERN_INFO "btrfs: at unmount delalloc count %llu\n", | 2340 | printk(KERN_INFO "btrfs: at unmount delalloc count %llu\n", |
| 2327 | (unsigned long long)fs_info->delalloc_bytes); | 2341 | (unsigned long long)fs_info->delalloc_bytes); |
| @@ -2343,6 +2357,7 @@ int close_ctree(struct btrfs_root *root) | |||
| 2343 | free_extent_buffer(root->fs_info->csum_root->commit_root); | 2357 | free_extent_buffer(root->fs_info->csum_root->commit_root); |
| 2344 | 2358 | ||
| 2345 | btrfs_free_block_groups(root->fs_info); | 2359 | btrfs_free_block_groups(root->fs_info); |
| 2360 | btrfs_free_pinned_extents(root->fs_info); | ||
| 2346 | 2361 | ||
| 2347 | del_fs_roots(fs_info); | 2362 | del_fs_roots(fs_info); |
| 2348 | 2363 | ||
