btrfs-progs: convert: Enhance record_file_blocks to handle reserved ranges
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Fri, 29 Jan 2016 05:03:27 +0000 (13:03 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 Jun 2016 16:15:19 +0000 (18:15 +0200)
commite599b1c8d94dd8eaf469084ec813540b042e7f37
tree6dd59d6bf1f0735c6114d356c36e30510e31194f
parent48ae0ef0934c4a97b80efdb9a80ce6ddbcbf909a
btrfs-progs: convert: Enhance record_file_blocks to handle reserved ranges

Enhance record_file_blocks() to handle reserved ranges.

Old file system can use the space in btrfs reserved ranges.
So we could not use the bytenr of old filesystem directly.

Thanks to previous patches, we have a full fs image in convert_root, and
it has already relocated the blocks in reserved ranges.
So here we just search the convert_root to get correct disk_bytenr and
use it.

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