All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH] block: fix streaming/closing race
Date: Fri, 30 Mar 2012 12:29:49 +0200	[thread overview]
Message-ID: <4F758B1D.10505@redhat.com> (raw)
In-Reply-To: <CAJSP0QV52+JJXzBK+01JQOmZcm1n0eRsusUBMeApmBbirM4sYQ@mail.gmail.com>

Il 30/03/2012 12:25, Stefan Hajnoczi ha scritto:
> On Fri, Mar 30, 2012 at 9:31 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 30/03/2012 09:19, Stefan Hajnoczi ha scritto:
>>>>> +void block_job_cancel_sync(BlockJob *job)
>>>>> +{
>>>>> +    BlockDriverState *bs = job->bs;
>>>>> +
>>>>> +    assert(bs->job == job);
>>>>> +    block_job_cancel(job);
>>>>> +    while (bs->job != NULL && bs->job->busy) {
>>> It's not clear to me why we have a busy flag.
>>
>> Because the coroutine does not restart if you do qemu_aio_wait and the
>> coroutine is waiting in co_sleep.  So the busy flag communicates that
>> the coroutine is quiescent and, when cancelled, will not issue any new I/O.
> 
> Ah, yes.  This is tricky, a comment would be nice.

I'll just add gtkdoc comments for the blockjob interface.  We need to
start somewhere...

Paolo

      reply	other threads:[~2012-03-30 10:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29 16:08 [Qemu-devel] [PATCH] block: fix streaming/closing race Paolo Bonzini
2012-03-30  7:19 ` Stefan Hajnoczi
2012-03-30  8:31   ` Paolo Bonzini
2012-03-30 10:00     ` Paolo Bonzini
2012-03-30 10:25     ` Stefan Hajnoczi
2012-03-30 10:29       ` Paolo Bonzini [this message]

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=4F758B1D.10505@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.