diff options
author | Rakesh Pandit <rakesh@tuxera.com> | 2014-03-05 02:12:23 +0200 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-03-21 06:23:33 -0700 |
commit | afb7de0da23676a37b2f28ced315889541591f69 (patch) | |
tree | 8e518768b6df564a693654ea1b7f603b53532664 /btrfs-image.c | |
parent | 12b727a48619ffb78ff32b7aa8d375730182d3e3 (diff) |
Btrfs-progs: remove unused variable and update btrfs-image man page
Remove unused variable in btrfs-image.c (update_super) and update man
page documentation about -r option. Running btrfsck on a restored
image produces missing chunk information. This is because by default,
btrfs-image fixes up chunk tree to use 1 stripe pointing to the
primary device. This in turns results in btrfsck making some noise.
$ ./mkfs.btrfs /dev/sdb2 -f
$ ./btrfs-image /dev/sdb2 btrfs_image_output
$ ./btrfs-image -r btrfs_image_output disk-image
$ ./btrfsck disk-image
Device extent[1, 29360128, 8388608] didn't find the relative chunk.
Device extent[1, 1111490560, 1073741824] didn't find the relative chunk.
Ideally btfsck should be updated to reflect this default behavior and
not through these messages, but it isn't harmful and can be done
later.
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'btrfs-image.c')
-rw-r--r-- | btrfs-image.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/btrfs-image.c b/btrfs-image.c index c3a7fe55..cc8627c5 100644 --- a/btrfs-image.c +++ b/btrfs-image.c @@ -1373,7 +1373,6 @@ static int update_super(u8 *buffer) u32 new_array_size = 0; u32 array_size; u32 cur = 0; - u32 new_cur = 0; u8 *ptr, *write_ptr; int old_num_stripes; @@ -1390,7 +1389,6 @@ static int update_super(u8 *buffer) write_ptr += sizeof(*disk_key); ptr += sizeof(*disk_key); cur += sizeof(*disk_key); - new_cur += sizeof(*disk_key); if (key.type == BTRFS_CHUNK_ITEM_KEY) { chunk = (struct btrfs_chunk *)ptr; @@ -1406,7 +1404,6 @@ static int update_super(u8 *buffer) memcpy(chunk->stripe.dev_uuid, super->dev_item.uuid, BTRFS_UUID_SIZE); new_array_size += sizeof(*chunk); - new_cur += sizeof(*chunk); } else { fprintf(stderr, "Bogus key in the sys chunk array " "%d\n", key.type); |