path: root/btrfsck.h
diff options
authorMiao Xie <>2013-07-03 21:25:19 +0800
committerChris Mason <>2013-07-03 14:06:55 -0400
commit3b9e6dd4379ed8f2fb50bee8dce4245038498211 (patch)
tree62d67b301d3e8981a74703f4c0fd7591b179aaf4 /btrfsck.h
parent68acb1075e0da2d9f170cb52f561c5225787dbdf (diff)
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 <>
Diffstat (limited to 'btrfsck.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/btrfsck.h b/btrfsck.h
index a6151d5a..f73c6052 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)