On Mon, Mar 12, 2012 at 3:27 PM, Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 12/03/2012 07:29, zwu.ker...@gmail.com ha scritto:
>> From: Zhi Yong Wu <wu...@linux.vnet.ibm.com>
>>
>> Signed-off-by: Zhi Yong Wu <wu...@linux.vnet.ibm.com>
>> ---
>>  block.c     |   21 +++++++++++++++++++++
>>  block_int.h |    1 +
>>  2 files changed, 22 insertions(+), 0 deletions(-)
>>
>> diff --git a/block.c b/block.c
>> index 52ffe14..0825168 100644
>> --- a/block.c
>> +++ b/block.c
>> @@ -853,6 +853,21 @@ void bdrv_close_all(void)
>>      }
>>  }
>>
>> +/**
>> + * Complete all pending requests for a block device
>> + */
>> +void bdrv_drain(BlockDriverState *bs)
>> +{
>> +    do {
>> +        qemu_co_queue_restart_all(&bs->throttled_reqs);
>> +    } while (!qemu_co_queue_empty(&bs->throttled_reqs));
>> +
>> +    qemu_aio_flush();
>
> This doesn't work, qemu_aio_flush can start new I/O.
Do you mean that it will start next I/O via the current request's cb?
if no, where will it start new I/O?
>
> Paolo
>
>



-- 
Regards,

Zhi Yong Wu

Reply via email to