btrfs-progs/image
Qu Wenruo 3ff9d35257 btrfs-progs: use read_data_from_disk() to replace read_extent_from_disk() and replace read_extent_data()
The function read_extent_from_disk() is only a wrapper to read tree
block.

And read_extent_data() is just a while loop to eliminate short read
caused by stripe boundary.

In fact, a lot of call sites of read_extent_data() are either reading
metadata (thus no possible short read) or doing extra loop by
themselves.

This patch will replace those two functions with read_data_from_disk(),
making it the only entrance for data/metadata read.
And update read_data_from_disk() to return the read bytes, so caller can
do a simple while loop.

For the few callers of read_extent_data(), open-code a small while loop
for them.

This will allow later RAID56 read repair using P/Q much easier.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-04-25 19:08:30 +02:00
..
Makefile btrfs-progs: build: add stub makefile to image and mkfs 2019-07-04 15:36:01 +02:00
main.c btrfs-progs: use read_data_from_disk() to replace read_extent_from_disk() and replace read_extent_data() 2022-04-25 19:08:30 +02:00
metadump.h btrfs-progs: image: introduce framework for more dump versions 2021-08-25 15:38:53 +02:00
sanitize.c btrfs-progs: remove the _nr from the item helpers 2022-03-09 15:13:13 +01:00
sanitize.h btrfs-progs: image: move sanitization to new file 2017-11-14 15:59:00 +01:00