From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPrMk-0000DW-2I for qemu-devel@nongnu.org; Fri, 05 Sep 2014 07:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPrMd-00060e-Uh for qemu-devel@nongnu.org; Fri, 05 Sep 2014 07:07:42 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:44822 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPrMd-00060F-Oh for qemu-devel@nongnu.org; Fri, 05 Sep 2014 07:07:35 -0400 Date: Fri, 5 Sep 2014 13:06:46 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140905110646.GA21550@irqsave.net> References: <1409743435-21155-1-git-send-email-famz@redhat.com> <1409743435-21155-5-git-send-email-famz@redhat.com> <20140904152126.GC8094@irqsave.net> <20140905105551.GB1904@fam-t430.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20140905105551.GB1904@fam-t430.nay.redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 04/20] block: Convert bdrv_em_aiocb_info.cancel to .cancel_async List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: =?iso-8859-1?Q?Beno=EEt?= Canet , Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi The Friday 05 Sep 2014 =E0 18:55:51 (+0800), Fam Zheng wrote : > On Thu, 09/04 17:21, Beno=EEt Canet wrote: > > The Wednesday 03 Sep 2014 =E0 19:23:39 (+0800), Fam Zheng wrote : > > > All the difference is that the old .cancel doesn't call cb, but > > > .cancel_async does. > > >=20 > > > Signed-off-by: Fam Zheng > > > --- > > > block.c | 5 ++++- > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > >=20 > > > diff --git a/block.c b/block.c > > > index 4aa1bd7..b7253af 100644 > > > --- a/block.c > > > +++ b/block.c > > > @@ -4679,6 +4679,9 @@ static void bdrv_aio_cancel_em(BlockDriverAIO= CB *blockacb) > > > { > > > BlockDriverAIOCBSync *acb =3D > > > container_of(blockacb, BlockDriverAIOCBSync, common); > > > + > > > + acb->ret =3D -ECANCELED; > > > + acb->common.cb(acb->common.opaque, acb->ret); > > > qemu_bh_delete(acb->bh); > > > acb->bh =3D NULL; > > > qemu_aio_release(acb); > > > @@ -4686,7 +4689,7 @@ static void bdrv_aio_cancel_em(BlockDriverAIO= CB *blockacb) > > > =20 > > > static const AIOCBInfo bdrv_em_aiocb_info =3D { > > > .aiocb_size =3D sizeof(BlockDriverAIOCBSync), > > > - .cancel =3D bdrv_aio_cancel_em, > > > + .cancel_async =3D bdrv_aio_cancel_em, > > > }; > >=20 > > Note from an AIO noob. Could we explain somewhere in the block layer = what the _em suffix means ? >=20 > I didn't write these functions but I think it means "emulation". Thanks Best regards Beno=EEt >=20 > Fam