[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/2] block: add the support to drain throttle
From: |
Zhi Yong Wu |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/2] block: add the support to drain throttled requests |
Date: |
Mon, 12 Mar 2012 16:42:41 +0800 |
On Mon, Mar 12, 2012 at 3:27 PM, Paolo Bonzini <address@hidden> wrote:
> Il 12/03/2012 07:29, address@hidden ha scritto:
>> From: Zhi Yong Wu <address@hidden>
>>
>> Signed-off-by: Zhi Yong Wu <address@hidden>
>> ---
>> 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