qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] block: wait for job callback in block_job_c


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 2/3] block: wait for job callback in block_job_cancel_sync
Date: Thu, 19 Apr 2012 12:36:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

Il 19/04/2012 12:31, Stefan Hajnoczi ha scritto:
>>  void block_job_cancel(BlockJob *job)
>>  {
>> +    /* Complete all guest I/O before cancelling the job, so that if the
>> +     * job chooses to complete itself it will do so with a consistent
>> +     * view of the disk.
>> +     */
>> +    bdrv_drain_all();
>>      job->cancelled = true;
>> +    if (job->co && !job->busy) {
>> +        qemu_coroutine_enter(job->co, NULL);
>> +    }
>>  }
> 
> block_job_cancel() is not supposed to block.  Now it will wait however
> long it takes to complete in-flight I/O.

You're right...  let me see if we can fix it otherwise. :/

Paolo



reply via email to

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