path: root/volumes.h
diff options
authorMiao Xie <>2013-07-03 21:25:19 +0800
committerChris Mason <>2013-07-03 14:06:55 -0400
commit3b9e6dd4379ed8f2fb50bee8dce4245038498211 (patch)
tree62d67b301d3e8981a74703f4c0fd7591b179aaf4 /volumes.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 'volumes.h')
1 files changed, 3 insertions, 2 deletions
diff --git a/volumes.h b/volumes.h
index 91277a79..0b894fd5 100644
--- a/volumes.h
+++ b/volumes.h
@@ -190,8 +190,9 @@ int btrfs_add_system_chunk(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct btrfs_key *key,
struct btrfs_chunk *chunk, int item_size);
int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset);
-struct btrfs_device *btrfs_find_device_by_devid(struct btrfs_root *root,
- u64 devid, int instance);
+struct btrfs_device *
+btrfs_find_device_by_devid(struct btrfs_fs_devices *fs_devices,
+ u64 devid, int instance);
struct btrfs_device *btrfs_find_device(struct btrfs_root *root, u64 devid,
u8 *uuid, u8 *fsid);