qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V9 03/11] quorum: Add quorum_aio_writev and its


From: Benoît Canet
Subject: Re: [Qemu-devel] [PATCH V9 03/11] quorum: Add quorum_aio_writev and its dependencies.
Date: Tue, 29 Oct 2013 21:06:45 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

L Tuesday 29 Oct 2013 à 18:21:57 (+0100), Max Reitz a écrit :
> Am 28.10.2013 13:21, schrieb Benoît Canet:
> > Le Friday 04 Oct 2013 à 16:35:18 (+0200), Max Reitz a écrit :
> >> On 2013-10-02 14:39, Benoît Canet wrote:
> >>> Signed-off-by: Benoit Canet <address@hidden>
> >>> ---
> >>>  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 = container_of(blockacb, QuorumAIOCB, common);
> >>> +    bool finished = false;
> >>> +
> >>> +    /* Wait for the request to finish */
> >>> +    acb->finished = &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ît
> 
> I thought of calling bdrv_aio_cancel() on every aios[i].aiocb – 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 itself
> 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ît

> 
> Max



reply via email to

[Prev in Thread] Current Thread [Next in Thread]