From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP8R0-0007wP-AS for qemu-devel@nongnu.org; Wed, 03 Sep 2014 07:09:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP8Qu-0001YH-CS for qemu-devel@nongnu.org; Wed, 03 Sep 2014 07:09:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP8Qu-0001YD-5o for qemu-devel@nongnu.org; Wed, 03 Sep 2014 07:09:00 -0400 Date: Wed, 3 Sep 2014 12:10:38 +0200 From: Kevin Wolf Message-ID: <20140903101038.GG7717@noname.str.redhat.com> References: <1409563324-28205-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1409563324-28205-1-git-send-email-famz@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: Fam Zheng Cc: benoit.canet@irqsave.net, qemu-devel@nongnu.org, armbru@redhat.com, Stefan Hajnoczi , pbonzini@redhat.com 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 not > 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 > +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, Any reason not to use the native .bdrv_co_readv/writev interfaces instead of the old, emulated versions that involve a bounce buffer? > + .bdrv_co_flush_to_disk =3D null_co_flush, > +}; Kevin