btrfs-progs: Use existing facility to replace read_data_extent function
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Fri, 21 Aug 2015 03:21:27 +0000 (11:21 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 31 Aug 2015 17:25:13 +0000 (19:25 +0200)
commit2d46558b30f5e130085212de7e3a22e2780e8d2a
tree36d3b8de60bde2b8f9f29615df193292f801026c
parent59df5b6e9aacd222b79f27886b6989bff3eef2a9
btrfs-progs: Use existing facility to replace read_data_extent function

Function read_data_extent() in btrfs-image.c is using manual-and-read
codes.
Replace it with existing read_extent_data() to reduce duplication.

Also, now we can use other mirror to try our best to do the dump, just
like read_tree_block().

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