btrfs-progs: convert: Fix a bug leads to discontinuous extents
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Mon, 27 Jun 2016 07:50:10 +0000 (15:50 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 4 Jul 2016 11:44:54 +0000 (13:44 +0200)
commitafded5ea48e32e27ed407d920ce8dbb94649c319
tree1a72a025bd1fa897c6d34e10c7748882d40ecb91
parent82aaf603e0e3e2d4302616c0b5c6e45246deca71
btrfs-progs: convert: Fix a bug leads to discontinuous extents

Btrfs_record_file_extent() will split extents using max extent size(128M).
It works well for real file extents, but not that well for large
hole extent, as hole doesn't have extent size limit.

In that case, it will only insert one 128M hole, and skip the rest,
leading to discontinuous extent error for converted btrfs.

Fix it by not splitting hole extents.

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