summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--btrfs-image.c3
-rw-r--r--man/btrfs-image.8.in5
2 files changed, 4 insertions, 4 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);
diff --git a/man/btrfs-image.8.in b/man/btrfs-image.8.in
index d5ba594a..3f51f3f3 100644
--- a/man/btrfs-image.8.in
+++ b/man/btrfs-image.8.in
@@ -17,7 +17,10 @@ is the image file that btrfs-image creates. When used with \fB-r\fP option,
.SH OPTIONS
.TP
\fB\-r\fP
-restore metadump image.
+Restore metadump image. By default, this fixes super's chunk tree, by
+using 1 stripe pointing to primary device, so that file system can be
+restored by running tree log reply if possible. To restore without
+changing number of stripes in chunk tree check \fB-o\fP option.
.TP
\fB\-c\fR \fIvalue\fP
compression level (0 ~ 9).