mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-27 16:02:56 +00:00
btrfs-progs: convert: Make read_disk_extent return more -EIO instead of -1
When pread64() returns value smaller than expected, it normally means EIO, so just return -EIO to replace the intermediate number. So when IO fails, we should be able to get more meaningful error number of than EPERM. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
251d32ea5c
commit
6a659dbfde
@ -201,7 +201,7 @@ int read_disk_extent(struct btrfs_root *root, u64 bytenr,
|
||||
ret = 0;
|
||||
fail:
|
||||
if (ret > 0)
|
||||
ret = -1;
|
||||
ret = -EIO;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user