[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: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-block] [PATCH v2 2/6] qemu-img: Add salvaging mode to convert |
Date: |
Thu, 11 Apr 2019 14:33:46 +0000 |
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?
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.
--
Best regards,
Vladimir
- [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
- Re: [Qemu-block] [PATCH v2 2/6] qemu-img: Add salvaging mode to convert,
Vladimir Sementsov-Ogievskiy <=
- [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