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 <d...@openvz.org>
> CC: Paolo Bonzini <pbonz...@redhat.com>
> CC: Kevin Wolf <kw...@redhat.com>
> CC: Max Reitz <mre...@redhat.com>
> ---
>  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