[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 06/18] qemu-img: Add --target-is-zero to convert
From: |
David Edmondson |
Subject: |
Re: [PULL 06/18] qemu-img: Add --target-is-zero to convert |
Date: |
Thu, 20 Feb 2020 20:18:44 +0000 |
On Thursday, 2020-02-20 at 10:36:04 -06, Eric Blake wrote:
> On 2/20/20 10:06 AM, Max Reitz wrote:
>> From: David Edmondson <address@hidden>
>>
>> In many cases the target of a convert operation is a newly provisioned
>> target that the user knows is blank (reads as zero). In this situation
>> there is no requirement for qemu-img to wastefully zero out the entire
>> device.
>>
>> Add a new option, --target-is-zero, allowing the user to indicate that
>> an existing target device will return zeros for all reads.
>>
>> Signed-off-by: David Edmondson <address@hidden>
>> Message-Id: <address@hidden>
>> Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
>> Reviewed-by: Eric Blake <address@hidden>
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>> docs/interop/qemu-img.rst | 9 ++++++++-
>> qemu-img-cmds.hx | 4 ++--
>> qemu-img.c | 26 +++++++++++++++++++++++---
>> 3 files changed, 33 insertions(+), 6 deletions(-)
>>
>> diff --git a/docs/interop/qemu-img.rst b/docs/interop/qemu-img.rst
>> index 42e4451db4..5f40137c10 100644
>> --- a/docs/interop/qemu-img.rst
>> +++ b/docs/interop/qemu-img.rst
>> @@ -214,6 +214,13 @@ Parameters to convert subcommand:
>> will still be printed. Areas that cannot be read from the source will be
>> treated as containing only zeroes.
>>
>> +.. option:: --target-is-zero
>> +
>> + Assume that reading the destination image will always return
>> + zeros. This parameter is mutually exclusive with a destination image
>
> Late tweak now that this is in a pull request, so we may want a followup
> patch, but:
>
> The image doesn't always return zeros after we write to it, maybe we
> should tweak this sentence:
>
> Assume that reading the destination image will initially return all zeros.
I will send a patch for this.
> Also, my earlier comment about 'zeroes' one line before 'zeros' still
> applies - although both spellings are valid, we look inconsistent when
> we can't make up our mind within two adjacent paragraphs.
If we can agree on one of "zeros" or "zeroes" then I'm happy to send a
patch making it consistent everywhere.
I think that given there are existing functions with "zeroes" in the
name, I'd be inclined to go that way.
dme.
--
Why stay in college? Why go to night school?
- [PULL 00/18] Block patches, Max Reitz, 2020/02/20
- [PULL 01/18] docs: improve qcow2 spec about extending image header, Max Reitz, 2020/02/20
- [PULL 03/18] iotests: Remove the superfluous 2nd check for the availability of quorum, Max Reitz, 2020/02/20
- [PULL 02/18] docs: qcow2: introduce compression type feature, Max Reitz, 2020/02/20
- [PULL 04/18] iotests/147: Fix drive parameters, Max Reitz, 2020/02/20
- [PULL 05/18] qapi: Allow getting flat output from 'query-named-block-nodes', Max Reitz, 2020/02/20
- [PULL 06/18] qemu-img: Add --target-is-zero to convert, Max Reitz, 2020/02/20
- [PULL 07/18] block: always fill entire LUKS header space with zeros, Max Reitz, 2020/02/20
- [PULL 08/18] block/backup-top: fix flags handling, Max Reitz, 2020/02/20
- [PULL 09/18] iotests/279: Fix for non-qcow2 formats, Max Reitz, 2020/02/20
- [PULL 10/18] block/nbd: Fix hang in .bdrv_close(), Max Reitz, 2020/02/20
- [PULL 11/18] block: Generic file creation fallback, Max Reitz, 2020/02/20
- [PULL 12/18] file-posix: Drop hdev_co_create_opts(), Max Reitz, 2020/02/20
- [PULL 13/18] iscsi: Drop iscsi_co_create_opts(), Max Reitz, 2020/02/20
- [PULL 14/18] iotests: Add test for image creation fallback, Max Reitz, 2020/02/20