path: root/utils.h
diff options
authorQu Wenruo <>2015-12-01 15:11:23 +0800
committerDavid Sterba <>2016-01-12 15:01:03 +0100
commit9c572c38a1dd87cdbe1f9811ac17eff90f6c10c0 (patch)
tree6801330f8fa9e999f05b9de50eecabad1b4727c3 /utils.h
parentf735b37466c293aa6ecc4d145b6251c162c519f6 (diff)
btrfs-progs: Introduce new members for btrfs_convert_context
Introduce 3 new members for btrfs_convert_context: 1) struct cache_tree used Records accurate byte ranges which are used by old filesystem. This will be used to create old filesystem image. 2) struct cache_tree data_chunks Records batched ranges which must be covered by data chunks. The bytenr range is optimized to meet all the chunk requirement. 3) u64 total_bytenr Records how large the filesystem is in bytenr. Yes, we can calculate it easy, but that's for old blocks based filesystem. This will make it more friendly for extent based filesystem. And later cctx->block_counts and may be removed And 2 for mkfs_config: 1) char *chunk_uuid. Used as temporary chunk_uuid (unparsed) string for later make_convert_btrfs() 2) u64 super_bytenr Records the new temporary super bytenr after make_btrfs(). Signed-off-by: Qu Wenruo <> Signed-off-by: David Sterba <>
Diffstat (limited to 'utils.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 6f3824c5..493c2e42 100644
--- a/utils.h
+++ b/utils.h
@@ -109,12 +109,16 @@ void btrfs_parse_features_to_string(char *buf, u64 flags);
struct btrfs_mkfs_config {
char *label;
char *fs_uuid;
+ char *chunk_uuid;
u64 blocks[8];
u64 num_bytes;
u32 nodesize;
u32 sectorsize;
u32 stripesize;
u64 features;
+ /* Super bytenr after make_btrfs */
+ u64 super_bytenr;
int make_btrfs(int fd, struct btrfs_mkfs_config *cfg);