summaryrefslogtreecommitdiff
path: root/mkfs.c
diff options
context:
space:
mode:
authorYan Zheng <zheng.yan@oracle.com>2008-12-05 12:21:31 -0500
committerChris Mason <chris.mason@oracle.com>2008-12-05 12:21:31 -0500
commit5ccd1715fa2eaad0b26037bb53706779c8c93b5f (patch)
tree3957b56e7b0d7d494c952829ff926df8c24377f6 /mkfs.c
parentd79f499eae6671a04e80b5a3081fae8e2a311b54 (diff)
superblock duplication
This patch updates btrfs-progs for superblock duplication. Note: I didn't make this patch as complete as the one for kernel since updating the converter requires changing the code again. Thank you, Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Diffstat (limited to 'mkfs.c')
-rw-r--r--mkfs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mkfs.c b/mkfs.c
index cc0eec02..f942dc73 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -414,8 +414,11 @@ int main(int ac, char **av)
if (block_count == 0)
block_count = dev_block_count;
- for (i = 0; i < 7; i++)
- blocks[i] = BTRFS_SUPER_INFO_OFFSET + leafsize * i;
+ blocks[0] = BTRFS_SUPER_INFO_OFFSET;
+ for (i = 1; i < 7; i++) {
+ blocks[i] = BTRFS_SUPER_INFO_OFFSET + 1024 * 1024 +
+ leafsize * i;
+ }
ret = make_btrfs(fd, file, label, blocks, block_count,
nodesize, leafsize,