qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/10] block: add .bdrv_co_is_allocated()


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 02/10] block: add .bdrv_co_is_allocated()
Date: Mon, 14 Nov 2011 08:32:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

On 11/14/2011 04:04 AM, Zhi Yong Wu wrote:
>  +        co = qemu_coroutine_create(bdrv_is_allocated_co_entry);
>  +        qemu_coroutine_enter(co,&data);
Since this main process will stop within qemu_coroutine_enter() until
bdrv_is_allocated_co_entry() is completed, three lines of condition
codes below are unnecessary, right?

No, they are necessary. They are executed when bdrv_is_allocated_co_entry calls qemu_coroutine_yield.

>  +        while (!data.done) {
>  +            qemu_aio_wait();
>  +        }

Paolo




reply via email to

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