btrfs-progs: Convert: Add support for rollback new convert behavior
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Fri, 29 Jan 2016 05:03:30 +0000 (13:03 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 Jun 2016 16:15:19 +0000 (18:15 +0200)
commite5724bfc8e015835154b77a6e2b1eb7ed4b9f16c
tree3f871ee51abc80c066ced675c71df72ba20a7d99
parent08f0c73eee929db08431f9ae5c765812358d099d
btrfs-progs: Convert: Add support for rollback new convert behavior

Add support to rollback new btrfs-convert.

The support is quite easy unlike the new convert behavior, which in fact
makes the rollback less restricted.

The core is, rollback must support both old and new convert result.

For old convert, all fs image extents can be covered by any chunk type.
But any extents inside reserved range must be covered by chunk.
For new convert, all fs image extents are covered by data chunk.

Allowing any condition will just make another fail to pass.
So make the convert condition a little less restricted to allow both can
be converted.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
btrfs-convert.c