qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] nbd: add zero-init paramete


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] nbd: add zero-init parameter
Date: Wed, 5 Oct 2016 08:26:32 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 10/05/2016 05:57 AM, Denis V. Lunev wrote:
> When using a nbd block device, the info about necessity of prior disk
> zeroing could significantly improve the speed of certain operations
> (e.g. backups).
> 
> This patch also will allow to preserve QCOW2 images during migration.

'allow to' is not idiomatic English; and your placement of 'also' before
'will' is awkward. You want either of:

This patch will also allow preservation of QCOW2 images...
This patch will also preserve QCOW2 images...

> Management software now may specify zero-init option and thus abscent

s/now may/may now/
s/abscent/absent/

> areas in the original QCOW2 image will not be marked as zeroes in the
> target image. This is tight distiction but it is here.

s/distiction/distinction/

> 
> Signed-off-by: Denis V. Lunev <address@hidden>
> CC: Paolo Bonzini <address@hidden>
> CC: Kevin Wolf <address@hidden>
> CC: Max Reitz <address@hidden>
> ---
>  block/nbd.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 

> @@ -232,6 +234,11 @@ static SocketAddress *nbd_config(BDRVNBDState *s, 
> QemuOpts *opts, Error **errp)
>  
>      s->export = g_strdup(qemu_opt_get(opts, "export"));
>  
> +    zero_init = qemu_opt_get(opts, "zero-init");
> +    if (zero_init != NULL) {
> +        s->zero_init = strcmp(zero_init, "on") == 0;

As Kevin pointed out, a manual parse makes the command line less
consistent; reusing the common parser also means that you will support
things like zero-init=true for free.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]