From 5ccd1715fa2eaad0b26037bb53706779c8c93b5f Mon Sep 17 00:00:00 2001 From: Yan Zheng Date: Fri, 5 Dec 2008 12:21:31 -0500 Subject: 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 --- mkfs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mkfs.c') 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, -- cgit v1.2.3