From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYKAV-0000Jb-Hf for qemu-devel@nongnu.org; Thu, 10 Apr 2014 14:57:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYKAQ-00010W-4J for qemu-devel@nongnu.org; Thu, 10 Apr 2014 14:57:47 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:33037 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYKAP-00010G-U9 for qemu-devel@nongnu.org; Thu, 10 Apr 2014 14:57:42 -0400 Date: Thu, 10 Apr 2014 20:57:50 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140410185750.GC11061@irqsave.net> References: <1397155423-29713-1-git-send-email-mreitz@redhat.com> <1397155423-29713-6-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1397155423-29713-6-git-send-email-mreitz@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 05/12] block/json: Add functions for cache control List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi The Thursday 10 Apr 2014 =E0 20:43:36 (+0200), Max Reitz wrote : > Add passthrough functions for bdrv_aio_flush() and > bdrv_invalidate_cache(). >=20 > Signed-off-by: Max Reitz > --- > block/json.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) >=20 > diff --git a/block/json.c b/block/json.c > index 591bc47..0e2d518 100644 > --- a/block/json.c > +++ b/block/json.c > @@ -88,6 +88,18 @@ static BlockDriverAIOCB *json_aio_writev(BlockDriver= State *bs, > return bdrv_aio_writev(bs->file, sector_num, qiov, nb_sectors, cb,= opaque); > } > =20 > +static BlockDriverAIOCB *json_aio_flush(BlockDriverState *bs, > + BlockDriverCompletionFunc *cb, > + void *opaque) > +{ > + return bdrv_aio_flush(bs->file, cb, opaque); > +} > + > +static void json_invalidate_cache(BlockDriverState *bs, Error **errp) > +{ > + return bdrv_invalidate_cache(bs->file, errp); > +} > + > static int64_t json_getlength(BlockDriverState *bs) > { > return bdrv_getlength(bs->file); > @@ -115,6 +127,9 @@ static BlockDriver bdrv_json =3D { > =20 > .bdrv_aio_readv =3D json_aio_readv, > .bdrv_aio_writev =3D json_aio_writev, > + .bdrv_aio_flush =3D json_aio_flush, > + > + .bdrv_invalidate_cache =3D json_invalidate_cache, > =20 > .has_variable_length =3D true, > .bdrv_getlength =3D json_getlength, > --=20 > 1.9.1 >=20 Reviewed-by: Benoit Canet