From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN20D-0007zt-4u for qemu-devel@nongnu.org; Thu, 28 Aug 2014 11:52:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN205-00010z-86 for qemu-devel@nongnu.org; Thu, 28 Aug 2014 11:52:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN205-00010i-14 for qemu-devel@nongnu.org; Thu, 28 Aug 2014 11:52:37 -0400 Message-ID: <53FF5040.1020608@redhat.com> Date: Thu, 28 Aug 2014 09:52:32 -0600 From: Eric Blake MIME-Version: 1.0 References: <1409205191-11406-1-git-send-email-famz@redhat.com> <20140828152224.GA4970@irqsave.net> In-Reply-To: <20140828152224.GA4970@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i36S0NVoKhCubUCmElwLOpOlFBC9EWfBj" Subject: Re: [Qemu-devel] [PATCH v3] block: Introduce "null" driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , Fam Zheng Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi , armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --i36S0NVoKhCubUCmElwLOpOlFBC9EWfBj Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/28/2014 09:22 AM, Beno=C3=AEt Canet wrote: > The Thursday 28 Aug 2014 =C3=A0 13:53:11 (+0800), Fam Zheng wrote : >> This is an analogue to Linux null_blk. It can be used for testing bloc= k >> device emulation and general block layer functionalities such as >> coroutines and throttling, where disk IO is not necessary or wanted. >> >> Use null:// for AIO version, and null-co:// for coroutine version. >> >> +++ b/qapi/block-core.json >> @@ -1150,7 +1150,8 @@ >> 'data': [ 'archipelago', 'file', 'host_device', 'host_cdrom', 'host= _floppy', >> 'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'blkdebu= g', >> 'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels',= 'qcow', >> - 'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quo= rum' ] } >> + 'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quo= rum', >> + 'null' ] } >=20 > Why not also adding null-co to QMP ? Or have just one driver 'null', but... >=20 >> =20 >> ## >> # @BlockdevOptionsBase >> @@ -1203,6 +1204,19 @@ >> 'data': { 'filename': 'str' } } >> =20 >> ## >> +# @BlockdevOptionsNull >> +# >> +# Driver specific block device options for the null backend. >> +# >> +# @size: size of the device in bytes. >> +# >> +# Since: 2.2 >> +## >> +{ 'type': 'BlockdevOptionsNull', >> + 'base': 'BlockdevOptionsFile', >> + 'data': { '*size': 'int' } } have a '*coroutine':'bool' flag here that chooses between the null: and the null-co: protocol. (I suspect we would do the same when finaly adding gluster to BlockdevOptions: rather than having 'gluster+tcp' and 'gluster+udp', it would be a single 'gluster' element that can then select transport of tcp vs. udp as an option). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --i36S0NVoKhCubUCmElwLOpOlFBC9EWfBj 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 iQEcBAEBCAAGBQJT/1BAAAoJEKeha0olJ0Nqls8H/3uDqscYXosTyes4qR6AzNvT 2D1gNV30bavssPJIUVg8DrEF4SzH4giaDUrHFcwtjhp0uXatF7SA7xZsoEo6RGxd LTvAChmmk2lHhMT8FEUvr1BhcsQdOEe5hPGGiXxypcMDF8Cnn2RlIM0WHL/MazDI PcaHoxbhgQWm6F/bg64xSEQgtwQHrzmV/1SlXHx2hXulisM7R1ySpNyS9aQyElLv JPH5YBTs9PzqeYx6rCdSXrpuCm/fz1JgmDM2a/hNE2gO8e40TwgHyCPRgrSkXWxG /HGa0czGoNp39tz5pKXyU4HmqoRpvs58E6JvsYV1NNPKw3MPhaNo+c6lF9uRpzU= =tTBE -----END PGP SIGNATURE----- --i36S0NVoKhCubUCmElwLOpOlFBC9EWfBj--