btrfs-progs: Introduce new members for btrfs_convert_context
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Tue, 1 Dec 2015 07:11:23 +0000 (15:11 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 12 Jan 2016 14:01:03 +0000 (15:01 +0100)
commit9c572c38a1dd87cdbe1f9811ac17eff90f6c10c0
tree6801330f8fa9e999f05b9de50eecabad1b4727c3
parentf735b37466c293aa6ecc4d145b6251c162c519f6
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>
btrfs-convert.c
utils.h