On 11.04.19 16:33, Vladimir Sementsov-Ogievskiy wrote:
> 10.04.2019 23:57, Max Reitz wrote:
>> This adds a salvaging mode (--salvage) to qemu-img convert which ignores
>> read errors and treats the respective areas as containing only zeroes.
>> This can be used for instance to at least partially recover the data
>> from terminally corrupted qcow2 images.
>>
>> Signed-off-by: Max Reitz <mre...@redhat.com>
>> ---
> 
> [..]
> 
>> --- a/qemu-img.texi
>> +++ b/qemu-img.texi
>> @@ -175,6 +175,11 @@ improve performance if the data is remote, such as with 
>> NFS or iSCSI backends,
>>   but will not automatically sparsify zero sectors, and may result in a fully
>>   allocated target image depending on the host support for getting allocation
>>   information.
>> +@item --salvage
>> +Try to ignore I/O errors when reading.  Unless in quiet mode (@code{-q}), 
>> errors
>> +will still be printed.  Areas that cannot be read from the source will be
>> +treated as containing only zeroes.  This option has no effect in copy 
>> offloading
>> +mode (@code{-C}).
> 
> Isn't it better to restrict such it, instead of creating meaningless 
> combination?
> And drop the restriction if we support it in future, instead of silent move 
> from
> noop to the feature?

You’re right, I should do that.

> Otherwise, looks OK for me. I dislike mixing byte-based and sector-based 
> logic, but it
> is not about the series, we should move to byte-based like in other places, 
> and it may
> be done later.

Thanks for having a look!

Max

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to