qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block: fix streaming/closing race


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] block: fix streaming/closing race
Date: Fri, 30 Mar 2012 12:29:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

Il 30/03/2012 12:25, Stefan Hajnoczi ha scritto:
> On Fri, Mar 30, 2012 at 9:31 AM, Paolo Bonzini <address@hidden> 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 via email to

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