From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPZAW-0005fS-1j for qemu-devel@nongnu.org; Thu, 04 Sep 2014 11:41:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPZAQ-0003lJ-W9 for qemu-devel@nongnu.org; Thu, 04 Sep 2014 11:41:52 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:47515 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPZAQ-0003lE-Pp for qemu-devel@nongnu.org; Thu, 04 Sep 2014 11:41:46 -0400 Date: Thu, 4 Sep 2014 17:40:59 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140904154059.GE8094@irqsave.net> References: <1409743435-21155-1-git-send-email-famz@redhat.com> <1409743435-21155-16-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1409743435-21155-16-git-send-email-famz@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 15/20] quorum: Convert quorum_aiocb_info.cancel to .cancel_async List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , Chrysostomos Nanakos , Stefan Hajnoczi , Liu Yuan , Peter Lieven , qemu-devel@nongnu.org, Ronnie Sahlberg , Josh Durgin , Paolo Bonzini , MORITA Kazutaka The Wednesday 03 Sep 2014 =E0 19:23:50 (+0800), Fam Zheng wrote : > Before, we cancel all the child requests with bdrv_aio_cancel, then fre= e > the acb.. >=20 > Now we just kick off asynchronous cancellation of child requests and > return, we know quorum_aio_cb will be called later, so in the end > quorum_aio_finalize will take care of calling the caller's cb. >=20 > Signed-off-by: Fam Zheng > --- > block/quorum.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) >=20 > diff --git a/block/quorum.c b/block/quorum.c > index 093382e..0951d52 100644 > --- a/block/quorum.c > +++ b/block/quorum.c > @@ -138,16 +138,13 @@ static void quorum_aio_cancel(BlockDriverAIOCB *b= lockacb) > =20 > /* cancel all callbacks */ > for (i =3D 0; i < s->num_children; i++) { > - bdrv_aio_cancel(acb->qcrs[i].aiocb); > + bdrv_aio_cancel_async(acb->qcrs[i].aiocb); > } > - > - g_free(acb->qcrs); > - qemu_aio_release(acb); > } > =20 > static AIOCBInfo quorum_aiocb_info =3D { > .aiocb_size =3D sizeof(QuorumAIOCB), > - .cancel =3D quorum_aio_cancel, > + .cancel_async =3D quorum_aio_cancel, > }; > =20 > static void quorum_aio_finalize(QuorumAIOCB *acb) > --=20 > 2.1.0.27.g96db324 >=20 Look good but this seems to conflict with one of Liu ongoing patches as the the quorum_cancel method is currently broken and Liu repair it in his latest patchset. See: http://lists.gnu.org/archive/html/qemu-devel/2014-09/msg00022.html I think one of your series must rebase on the other. Liu: can you coordinate with Fam ?