From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtzJa-0006pX-CB for qemu-devel@nongnu.org; Fri, 20 Dec 2013 07:36:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtzJV-0000ZZ-JE for qemu-devel@nongnu.org; Fri, 20 Dec 2013 07:36:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtzJV-0000YZ-AT for qemu-devel@nongnu.org; Fri, 20 Dec 2013 07:36:21 -0500 Message-ID: <52B439B2.3040603@redhat.com> Date: Fri, 20 Dec 2013 05:36:02 -0700 From: Eric Blake MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HWS1bIH2njSwAqpfGwpgPtGWTQl6Nj6WB" Subject: Re: [Qemu-devel] [RFC PATCH v3 1/6] block: introduce prealloc_mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Lieven , Fam Zheng This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HWS1bIH2njSwAqpfGwpgPtGWTQl6Nj6WB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/18/2013 07:27 PM, Hu Tao wrote: > This patch prepares for the subsequent patches. >=20 > Signed-off-by: Hu Tao > --- > block/qcow2.c | 6 +++--- > include/block/block.h | 6 ++++++ > 2 files changed, 9 insertions(+), 3 deletions(-) >=20 > +++ b/include/block/block.h > @@ -527,4 +527,10 @@ int bdrv_debug_remove_breakpoint(BlockDriverState = *bs, const char *tag); > int bdrv_debug_resume(BlockDriverState *bs, const char *tag); > bool bdrv_debug_is_suspended(BlockDriverState *bs, const char *tag); > =20 > +enum prealloc_mode { > + PREALLOC_OFF =3D 0, > + PREALLOC_METADATA, > + PREALLOC_FULL, > +}; Why not make this a QAPI enum: { 'enum': 'PreallocMode', 'data': ['off', 'metadata', 'full'] } After all, this is the sort of thing where we will eventually want to select the prealloc mode of new files being created by online operations such as snapshot creation. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --HWS1bIH2njSwAqpfGwpgPtGWTQl6Nj6WB 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.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJStDmyAAoJEKeha0olJ0Nq4ZIH/3lvOTCdw7bivLqPCHHCM362 N2Io5Q3ZkiD/+LCRHZmuV4Rz3ZOIMoxeRdR3vaBQj5TkisO+JuFkXdyc04jy1qzz u+za3c90GaGuun9NZq0LX2W+gQh/zc6unikZSgwoR9k0g83cahU28/fl2PY3fLxA cb5j9pmLHNmZDQh5QILXCoRuUmIMuBo5DiW4knF9UgAZRgQ6Mt9m/9NPCfI5JpIm VrjCgueaMnk/lQSTiDXR+oxHmEHLgbFe5HaG6QYuTgnn2MrAEmexMQ/nWKTJn+Q4 VmggwZDecnRUW/ajW4HJyD0Py8qypHPpGQfe0U7yVWD1Vmpq/aKbtZzAt05O6ZQ= =XtXJ -----END PGP SIGNATURE----- --HWS1bIH2njSwAqpfGwpgPtGWTQl6Nj6WB--