|
@@ -1783,6 +1783,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,
|
|
btrfs_super_chunk_root(disk_super),
|
|
btrfs_super_chunk_root(disk_super),
|
|
blocksize, generation);
|
|
blocksize, generation);
|
|
BUG_ON(!chunk_root->node);
|
|
BUG_ON(!chunk_root->node);
|
|
|
|
+ if (!test_bit(EXTENT_BUFFER_UPTODATE, &chunk_root->node->bflags)) {
|
|
|
|
+ printk(KERN_WARNING "btrfs: failed to read chunk root on %s\n",
|
|
|
|
+ sb->s_id);
|
|
|
|
+ goto fail_chunk_root;
|
|
|
|
+ }
|
|
btrfs_set_root_node(&chunk_root->root_item, chunk_root->node);
|
|
btrfs_set_root_node(&chunk_root->root_item, chunk_root->node);
|
|
chunk_root->commit_root = btrfs_root_node(chunk_root);
|
|
chunk_root->commit_root = btrfs_root_node(chunk_root);
|
|
|
|
|
|
@@ -1810,6 +1815,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,
|
|
blocksize, generation);
|
|
blocksize, generation);
|
|
if (!tree_root->node)
|
|
if (!tree_root->node)
|
|
goto fail_chunk_root;
|
|
goto fail_chunk_root;
|
|
|
|
+ if (!test_bit(EXTENT_BUFFER_UPTODATE, &tree_root->node->bflags)) {
|
|
|
|
+ printk(KERN_WARNING "btrfs: failed to read tree root on %s\n",
|
|
|
|
+ sb->s_id);
|
|
|
|
+ goto fail_tree_root;
|
|
|
|
+ }
|
|
btrfs_set_root_node(&tree_root->root_item, tree_root->node);
|
|
btrfs_set_root_node(&tree_root->root_item, tree_root->node);
|
|
tree_root->commit_root = btrfs_root_node(tree_root);
|
|
tree_root->commit_root = btrfs_root_node(tree_root);
|
|
|
|
|