From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkZ29-00015K-EG for qemu-devel@nongnu.org; Wed, 14 May 2014 09:15:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkZ21-0004Na-GD for qemu-devel@nongnu.org; Wed, 14 May 2014 09:15:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkZ21-0004NL-8n for qemu-devel@nongnu.org; Wed, 14 May 2014 09:15:37 -0400 Message-ID: <53736C72.1070009@redhat.com> Date: Wed, 14 May 2014 07:15:30 -0600 From: Eric Blake MIME-Version: 1.0 References: <1399566139-24140-1-git-send-email-pl@kamp.de> <53712EFC.5080108@redhat.com> <53720AB9.4040508@kamp.de> In-Reply-To: <53720AB9.4040508@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vDmG3W34N0Sv5CD5qvIHshONkbOl9NuND" Subject: Re: [Qemu-devel] [PATCHv4] block: optimize zero writes with bdrv_write_zeroes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, famz@redhat.com, stefanha@redhat.com, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vDmG3W34N0Sv5CD5qvIHshONkbOl9NuND Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/13/2014 06:06 AM, Peter Lieven wrote: >>> - changed the parse function in blockdev_init to >>> be generic usable for other enum parameters >> If you wouldn't mind, I think the generic function is useful enough th= at >> people might want to backport it independently from this optimization.= >> It would be better to split this into a two-patch series, one for the >> new parse_enum_option, the other for bdrv_write_zeroes utilizing it. >> >> >>> + },{ >>> + .name =3D "detect-zeroes", >>> + .type =3D QEMU_OPT_STRING, >>> + .help =3D "try to optimize zero writes", >> Might be worth listing (off, on, unmap) in the text. >> >> Everything else looked okay, but I'll wait for R-b until I see a >> response about the idea of splitting the patch (even if that response = is >> justification for keeping it as one) >> >=20 > I did not split because currently there is no other possible > user in the function. The on_error settings and discard settings > would be possible users, but for on_error there is a hardcoded > difference between read and write which is not reflected in the > qapi and for discard settings we have ignore and unmap, but > we have also off and on which are not in qapi as well. Even if there is currently only one caller of the new function, it's STILL better to split patches into manageable pieces - psychologically, it's easier to review a new function in isolation. Besides, just because there's currently only one user (the rest of your patch) does not rule out that someone else may start using the function, and then a backport would target that later commit plus your function. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --vDmG3W34N0Sv5CD5qvIHshONkbOl9NuND Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTc2xyAAoJEKeha0olJ0NqewAH/RH2ScDbTgQjpevN29z1bRo/ 9VDolSvkVM/MZKt8ORALmG1/VGK0VCjStJk/GId3Oqgl6bpq61jtmdhRoWDAxCFJ p+xJBUbt1gYvAYMX2sSM3pSUgRONmqhoHd7aZL2LWecEl3bQTHbxX+KOHX03HWCP GrNiH4fTYd6unJ4fhBz6FyuEOe78C6zBqiEpK/HjDb/1FA6rIVGuSMx0bt566pSl 6IjOwkg1lno5nHzl9NBcLDensZRn2+hIAwKbYEyHjOLareQMR66DBndNZpT1tRUL FuPqTnbg7Ln1z2AmsfU6WvU4jNROteiQiOnMAnlZCzucg4kE7s6IdOWtAHDZRgs= =PeGK -----END PGP SIGNATURE----- --vDmG3W34N0Sv5CD5qvIHshONkbOl9NuND--