From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKWhU-0002lU-9U for qemu-devel@nongnu.org; Fri, 13 Sep 2013 12:58:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKWhP-0007H3-Sk for qemu-devel@nongnu.org; Fri, 13 Sep 2013 12:58:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKWhP-0007Gx-Jd for qemu-devel@nongnu.org; Fri, 13 Sep 2013 12:58:27 -0400 Message-ID: <52334429.7050804@redhat.com> Date: Fri, 13 Sep 2013 10:58:17 -0600 From: Eric Blake MIME-Version: 1.0 References: <1379067909-22984-1-git-send-email-pl@kamp.de> <1379067909-22984-3-git-send-email-pl@kamp.de> In-Reply-To: <1379067909-22984-3-git-send-email-pl@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="O9HrXUK2aWtDCmg9bKk7HrWKJHclPi3Nd" Subject: Re: [Qemu-devel] [PATCH 02/12] block: add flags to bdrv_*_write_zeroes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, stefanha@redhat.com, qemu-devel@nongnu.org, anthony@codemonkey.ws, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --O9HrXUK2aWtDCmg9bKk7HrWKJHclPi3Nd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/13/2013 04:24 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block-migration.c | 2 +- > block.c | 20 +++++++++++--------- > block/backup.c | 3 ++- > block/qcow2.c | 2 +- > block/qed.c | 3 ++- > block/raw_bsd.c | 5 +++-- > block/vmdk.c | 3 ++- > include/block/block.h | 4 ++-- > include/block/block_int.h | 2 +- > qemu-io-cmds.c | 2 +- > 10 files changed, 26 insertions(+), 20 deletions(-) Reviewed-by: Eric Blake > =20 > -int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num, int nb= _sectors) > +int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num, > + int nb_sectors, BdrvRequestFlags flags) Technically, you are allowing any bitwise combination of BdrvRequestFlags, including combinations that are NOT enumerated values within BdrvRequestFlags. There are some type-strict languages where you'd fail to compile when passing in a non-enum value. But C allows this (ab)use of enum types in place of an integer type, and I find it better documented this way, so I'm fine with leaving it as-is. That, and you're just copying existing style already in qemu :) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --O9HrXUK2aWtDCmg9bKk7HrWKJHclPi3Nd 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.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSM0QpAAoJEKeha0olJ0Nq90YIAIZWO61VzFj02oftpAsatAtf 5598xLvIfABUdExLahu/sF7cQjtWYUcuJBbckrAluqMqJ2DprkulmsOwCSNDHJtJ r0i3dVQFXIfOhNSY09LpmwMcOAWL79XOjSn11Y9TR2eOfckLWmX8tZqJODGIxahV gqFtGy7SEZyPl6h/MftDuyD+dTbe3jGNg0M6KPYQoqDcNZf/an/Stj/fNSmuQTKw 7s5EnnIY4NibtGsW948RadjQIlgMqUkalFdZVt5Q3wtWwvW/k6UfEBGI053Cz9b0 G7eO3oRer7LsMjgJ2qkV0UtrVEnEpHbzww3X1RMt4eS9/JF5Et7Nf79hZ5MJzwk= =F7Q/ -----END PGP SIGNATURE----- --O9HrXUK2aWtDCmg9bKk7HrWKJHclPi3Nd--