From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbFZ1-000384-Ec for qemu-devel@nongnu.org; Tue, 29 Oct 2013 16:07:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbFYw-00088Z-E6 for qemu-devel@nongnu.org; Tue, 29 Oct 2013 16:06:55 -0400 Received: from nodalink.pck.nerim.net ([62.212.105.220]:37840 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbFYw-00088V-3e for qemu-devel@nongnu.org; Tue, 29 Oct 2013 16:06:50 -0400 Date: Tue, 29 Oct 2013 21:06:45 +0100 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20131029200645.GB2948@irqsave.net> References: <1380717564-11098-1-git-send-email-benoit@irqsave.net> <1380717564-11098-4-git-send-email-benoit@irqsave.net> <524ED226.5030701@redhat.com> <20131028122116.GA2890@irqsave.net> <526FEEB5.1020708@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <526FEEB5.1020708@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V9 03/11] quorum: Add quorum_aio_writev and its dependencies. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: =?iso-8859-1?Q?Beno=EEt?= Canet , kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com L Tuesday 29 Oct 2013 =C3=A0 18:21:57 (+0100), Max Reitz a =C3=A9crit : > Am 28.10.2013 13:21, schrieb Beno=C3=AEt Canet: > > Le Friday 04 Oct 2013 =C3=A0 16:35:18 (+0200), Max Reitz a =C3=A9crit= : > >> On 2013-10-02 14:39, Beno=C3=AEt Canet wrote: > >>> Signed-off-by: Benoit Canet > >>> --- > >>> block/quorum.c | 123 +++++++++++++++++++++++++++++++++++++++++++++= ++++++++++++ > >>> 1 file changed, 123 insertions(+) > >>> > >>> diff --git a/block/quorum.c b/block/quorum.c > >>> index 9557e61..b49e3c6 100644 > >>> --- a/block/quorum.c > >>> +++ b/block/quorum.c > >>> @@ -64,11 +64,134 @@ struct QuorumAIOCB { > >>> int vote_ret; > >>> }; > >>> +static void quorum_aio_cancel(BlockDriverAIOCB *blockacb) > >>> +{ > >>> + QuorumAIOCB *acb =3D container_of(blockacb, QuorumAIOCB, commo= n); > >>> + bool finished =3D false; > >>> + > >>> + /* Wait for the request to finish */ > >>> + acb->finished =3D &finished; > >>> + while (!finished) { > >>> + qemu_aio_wait(); > >>> + } > >> Hm, wouldn't it be better to pass the cancel to the children? > >> > >> Max > > Hi Max, > > > > Hi don't understand how you would do this. > > > > Best regards > > > > Beno=C3=AEt >=20 > I thought of calling bdrv_aio_cancel() on every aios[i].aiocb =E2=80=93= I don't > know if that will work but it seems reasonable to me to try to cancel > all the operations quorum has initiated when the quorum operation itsel= f > is requested to be canceled (instead of waiting for the spawned > operations to finish normally). That makes sense. I will do this. Best regards Beno=C3=AEt >=20 > Max