btrfs-progs: convert: Insert needed holes for superblock migration
commitdb6f9251e509107755c7014e7358469409a0d5fe
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Wed, 1 Jun 2016 08:29:43 +0000 (1 16:29 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 Jun 2016 16:15:19 +0000 (7 18:15 +0200)
tree61cdb6363f1f16339371c1c6b5a3ae7b6228d164
parent0c621b519d531600655f179f1ebf62c0dd95e478
btrfs-progs: convert: Insert needed holes for superblock migration

New convert doesn't insert holes for superblock migration range.

Unlike the old design, which only relocates 4K (superblock size) to
other places.
In the new design, to make sure convert can handle different page sizes
and align chunks bytenr, we relocate the whole 64K range.

And if there is only a 4K used block inside 64K superblock migration
range, it will make converted the fs have discontiguous file extents.

This patch will fix it by inserting needed holes to avoid such
discontinuous error.

Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
btrfs-convert.c