summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-12-01 15:11:23 +0800
committerDavid Sterba <dsterba@suse.com>2016-01-12 15:01:03 +0100
commit9c572c38a1dd87cdbe1f9811ac17eff90f6c10c0 (patch)
tree6801330f8fa9e999f05b9de50eecabad1b4727c3 /utils.h
parentf735b37466c293aa6ecc4d145b6251c162c519f6 (diff)
downloadbtrfs-progs-9c572c38a1dd87cdbe1f9811ac17eff90f6c10c0.tar.gz
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 <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 6f3824c..493c2e4 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);