Received: from eggs.gnu.org ([2001:4830:134:3::10]:45372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brmDZ-0000xc-Ns for qemu-devel@nongnu.org; Wed, 05 Oct 2016 09:26:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brmDY-0002R8-GQ for qemu-devel@nongnu.org; Wed, 05 Oct 2016 09:26:41 -0400 References: <1475665023-21620-1-git-send-email-den@openvz.org> From: Eric Blake Message-ID: <4e9173e2-1391-7648-a3ff-36847fa3d640@redhat.com> Date: Wed, 5 Oct 2016 08:26:32 -0500 MIME-Version: 1.0 In-Reply-To: <1475665023-21620-1-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UOtuDmMqe2L6kmutVuMx9VP8mW33U4eEO" Subject: Re: [Qemu-devel] [PATCH v2 1/1] nbd: add zero-init parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" , qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: Kevin Wolf , Max Reitz , Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UOtuDmMqe2L6kmutVuMx9VP8mW33U4eEO From: Eric Blake To: "Denis V. Lunev" , qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: Kevin Wolf , Max Reitz , Paolo Bonzini Message-ID: <4e9173e2-1391-7648-a3ff-36847fa3d640@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 1/1] nbd: add zero-init parameter References: <1475665023-21620-1-git-send-email-den@openvz.org> In-Reply-To: <1475665023-21620-1-git-send-email-den@openvz.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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). >=20 > 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/ >=20 > Signed-off-by: Denis V. Lunev > CC: Paolo Bonzini > CC: Kevin Wolf > CC: Max Reitz > --- > block/nbd.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) >=20 > @@ -232,6 +234,11 @@ static SocketAddress *nbd_config(BDRVNBDState *s, = QemuOpts *opts, Error **errp) > =20 > s->export =3D g_strdup(qemu_opt_get(opts, "export")); > =20 > + zero_init =3D qemu_opt_get(opts, "zero-init"); > + if (zero_init !=3D NULL) { > + s->zero_init =3D strcmp(zero_init, "on") =3D=3D 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=3Dtrue for free. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --UOtuDmMqe2L6kmutVuMx9VP8mW33U4eEO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX9P+IAAoJEKeha0olJ0Nqw7AIAJ5R73sBS1TH2yb1gilDwhmV NAEph2y6i7ql0Or3SHfaXTu68MBtryWV2GWK6lVJH81dAW6OCFbyIVcO4RBYhiy3 0v+fbzFoCQ7GdzVMgfqHOmtC8L+8aVuqme2SsuPBGEeAJcSrwqf2FlxrYlwq/9bu 4fOTovgvLI/9g2N9cQOqytfc1EcNklbAqV3j21d3E8J/0kHtKtj7Gy5fidiRTk0n bFLjZ+1NnoxWUHLh9/5VEv8T03e0ntBHsoYVvGeICrOmy34qVthsAkR8Gla+QcJj 297Bp/p/HX8QQuk2KynCDxf0dhvG9mpvFJgyUfmktv/sn2TAw5m8tURsubcJYws= =gwb2 -----END PGP SIGNATURE----- --UOtuDmMqe2L6kmutVuMx9VP8mW33U4eEO--