Btrfs: Properly setup root key while reading the root
[deliverable/linux.git] / fs / btrfs / disk-io.c
index 3878772fcffd8b553015d0c48437b1adc2d94c2e..5a7e60d7f443044cb457ec637dadabdad96c36e9 100644 (file)
@@ -410,6 +410,7 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_fs_info *fs_info,
        read_extent_buffer(l, &root->root_item,
               btrfs_item_ptr_offset(l, path->slots[0]),
               sizeof(root->root_item));
+       memcpy(&root->root_key, location, sizeof(*location));
        ret = 0;
 out:
        btrfs_release_path(root, path);
@@ -594,6 +595,7 @@ struct btrfs_root *open_ctree(struct super_block *sb)
        tree_root->nodesize = nodesize;
        tree_root->leafsize = leafsize;
        tree_root->sectorsize = sectorsize;
+       sb_set_blocksize(sb, sectorsize);
 
        i_size_write(fs_info->btree_inode,
                     btrfs_super_total_bytes(disk_super));
This page took 0.023533 seconds and 5 git commands to generate.