qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Benoît Canet" <benoit.canet@irqsave.net>
To: Max Reitz <mreitz@redhat.com>
Cc: "Benoît Canet" <benoit.canet@irqsave.net>,
	kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
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	[thread overview]
Message-ID: <20131029200645.GB2948@irqsave.net> (raw)
In-Reply-To: <526FEEB5.1020708@redhat.com>

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 <benoit@irqsave.net>
> >>> ---
> >>>  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	other threads:[~2013-10-29 20:07 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02 12:39 [Qemu-devel] [PATCH V9 00/11] Quorum block driver Benoît Canet
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 01/11] quorum: Create quorum.c, add QuorumSingleAIOCB and QuorumAIOCB Benoît Canet
2013-10-04 14:33   ` Max Reitz
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 02/11] quorum: Create BDRVQuorumState and BlkDriver and do init Benoît Canet
2013-10-04 14:34   ` Max Reitz
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 03/11] quorum: Add quorum_aio_writev and its dependencies Benoît Canet
2013-10-04 14:35   ` Max Reitz
2013-10-28 12:21     ` Benoît Canet
2013-10-29 17:21       ` Max Reitz
2013-10-29 20:06         ` Benoît Canet [this message]
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 04/11] blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify Benoît Canet
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 05/11] quorum: Add quorum_aio_readv Benoît Canet
2013-10-04 14:38   ` Max Reitz
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 06/11] quorum: Add quorum mechanism Benoît Canet
2013-10-04 14:48   ` Max Reitz
2013-10-28 12:31     ` Benoît Canet
2013-10-29 16:42       ` Max Reitz
2013-10-28 13:04     ` Benoît Canet
2013-10-29 17:34       ` Max Reitz
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 07/11] quorum: Add quorum_getlength() Benoît Canet
2013-10-04 14:49   ` Max Reitz
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 08/11] quorum: Add quorum_invalidate_cache() Benoît Canet
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 09/11] quorum: Add quorum_co_get_block_status Benoît Canet
2013-10-04 14:51   ` Max Reitz
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 10/11] quorum: Add quorum_co_flush() Benoît Canet
2013-10-04 14:53   ` Max Reitz
2013-10-02 12:39 ` [Qemu-devel] [PATCH V9 11/11] quorum: Add quorum_open() and quorum_close() Benoît Canet
2013-10-04 15:14   ` Max Reitz
2013-10-04 15:31     ` Eric Blake
2013-10-07  7:23       ` Max Reitz
2013-10-04 14:31 ` [Qemu-devel] [PATCH V9 00/11] Quorum block driver Max Reitz
2013-10-04 22:25   ` Benoît Canet
2013-10-29  7:59   ` Benoît Canet
2013-10-29 17:55     ` Max Reitz
2013-10-29 17:56       ` Max Reitz
2013-10-29 20:06         ` Benoît Canet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131029200645.GB2948@irqsave.net \
    --to=benoit.canet@irqsave.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).