From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP7oe-0004ey-JX for qemu-devel@nongnu.org; Wed, 03 Sep 2014 06:29:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP7oZ-00044a-H1 for qemu-devel@nongnu.org; Wed, 03 Sep 2014 06:29:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP7oZ-00044R-AN for qemu-devel@nongnu.org; Wed, 03 Sep 2014 06:29:23 -0400 Date: Wed, 3 Sep 2014 18:29:17 +0800 From: Fam Zheng Message-ID: <20140903102917.GA5221@T430.redhat.com> References: <1409563324-28205-1-git-send-email-famz@redhat.com> <20140903101038.GG7717@noname.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20140903101038.GG7717@noname.str.redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v5] block: Introduce "null" drivers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: benoit.canet@irqsave.net, qemu-devel@nongnu.org, armbru@redhat.com, Stefan Hajnoczi , pbonzini@redhat.com On Wed, 09/03 12:10, Kevin Wolf wrote: > Am 01.09.2014 um 11:22 hat Fam Zheng geschrieben: > > This is an analogue to Linux null_blk. It can be used for testing or > > benchmarking block device emulation and general block layer > > functionalities such as coroutines and throttling, where disk IO is n= ot > > necessary or wanted. > >=20 > > Use null-aio:// for AIO version, and null-co:// for coroutine version. > >=20 > > Signed-off-by: Fam Zheng > > Reviewed-by: Beno=EEt Canet >=20 > > +static BlockDriver bdrv_null_co =3D { > > + .format_name =3D "null-co", > > + .protocol_name =3D "null-co", > > + .instance_size =3D sizeof(BDRVNullState), > > + > > + .bdrv_file_open =3D null_file_open, > > + .bdrv_close =3D null_close, > > + .bdrv_getlength =3D null_getlength, > > + > > + .bdrv_read =3D null_co_read, > > + .bdrv_write =3D null_co_write, >=20 > Any reason not to use the native .bdrv_co_readv/writev interfaces > instead of the old, emulated versions that involve a bounce buffer? No good reason, I'll change it in the next version. Thanks, Fam