From 3b9e6dd4379ed8f2fb50bee8dce4245038498211 Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Wed, 3 Jul 2013 21:25:19 +0800 Subject: Btrfs-progs: Add chunk rebuild function for RAID1/SINGLE/DUP Add chunk rebuild for RAID1/SINGLE/DUP to chunk-recover command. Before this patch chunk-recover can only scan and reuse the old chunk data to recover. With this patch, chunk-recover can use the reference between chunk/block group/dev extent to rebuild the whole chunk tree even when old chunks are not available. Signed-off-by: Qu Wenruo Signed-off-by: Miao Xie Signed-off-by: Chris Mason --- btrfsck.h | 1 + 1 file changed, 1 insertion(+) (limited to 'btrfsck.h') diff --git a/btrfsck.h b/btrfsck.h index a6151d5..f73c605 100644 --- a/btrfsck.h +++ b/btrfsck.h @@ -140,6 +140,7 @@ static inline unsigned long btrfs_chunk_record_size(int num_stripes) } void free_chunk_cache_tree(struct cache_tree *chunk_cache); +u64 calc_stripe_length(u64 type, u64 length, int num_stripes); /* For block group tree */ static inline void block_group_tree_init(struct block_group_tree *tree) { -- cgit v1.2.1