diff options
author | David Sterba <dsterba@suse.cz> | 2013-03-06 17:32:51 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-03-10 16:12:21 +0100 |
commit | dd21bc16ad9bfd87df9311b39dad425ee533eb78 (patch) | |
tree | 0d8cd4e374eaeb0dd30f6aa4603d7d6a073280b4 /cmds-check.c | |
parent | fc61b53da8dba69d2a150ca4fa8faca62c978221 (diff) |
btrfs-progs: separate super_copy out of fs_info
Allocate fs_info::super_copy dynamically of full BTRFS_SUPER_INFO_SIZE
and use it directly for saving superblock to disk.
This fixes incorrect superblock checksum after mkfs.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-check.c')
-rw-r--r-- | cmds-check.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds-check.c b/cmds-check.c index 5d2e9edf..12192fa2 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -973,7 +973,7 @@ static u64 count_csum_range(struct btrfs_root *root, u64 start, u64 len) size_t size; u64 found = 0; u64 csum_end; - u16 csum_size = btrfs_super_csum_size(&root->fs_info->super_copy); + u16 csum_size = btrfs_super_csum_size(root->fs_info->super_copy); btrfs_init_path(&path); @@ -3613,7 +3613,7 @@ int cmd_check(int argc, char **argv) if (info == NULL) return 1; - uuid_unparse(info->super_copy.fsid, uuidbuf); + uuid_unparse(info->super_copy->fsid, uuidbuf); printf("Checking filesystem on %s\nUUID: %s\n", argv[optind], uuidbuf); if (!extent_buffer_uptodate(info->tree_root->node) || |