[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 2/6] qemu-img: Add salvaging mode to convert
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v2 2/6] qemu-img: Add salvaging mode to convert |
Date: |
Sat, 13 Apr 2019 03:01:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
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 <address@hidden>
>> ---
>
> [..]
>
>> --- 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.
>> address@hidden --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
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v2 0/6] qemu-img: Add salvaging mode to convert, Max Reitz, 2019/04/10
- [Qemu-block] [PATCH v2 1/6] qemu-img: Move quiet into ImgConvertState, Max Reitz, 2019/04/10
- [Qemu-block] [PATCH v2 2/6] qemu-img: Add salvaging mode to convert, Max Reitz, 2019/04/10
- [Qemu-block] [PATCH v2 3/6] blkdebug: Add @iotype error option, Max Reitz, 2019/04/10
- [Qemu-block] [PATCH v2 4/6] blkdebug: Add "none" event, Max Reitz, 2019/04/10
- [Qemu-block] [PATCH v2 5/6] blkdebug: Inject errors on .bdrv_co_block_status(), Max Reitz, 2019/04/10
- [Qemu-block] [PATCH v2 6/6] iotests: Test qemu-img convert --salvage, Max Reitz, 2019/04/10