On Mon, Nov 14, 2011 at 4:37 PM, Paolo Bonzini wrote:
> On 11/14/2011 09:10 AM, Zhi Yong Wu wrote:
>>>
>>> > No, they are necessary. They are executed when
>>> > bdrv_is_allocated_co_entry
>>> > calls qemu_coroutine_yield.
>>
>> Right, But i don't think that they are necessary.
>>
>> after bdrv
On Mon, Nov 14, 2011 at 4:50 PM, Kevin Wolf wrote:
> Am 14.11.2011 04:04, schrieb Zhi Yong Wu:
>> On Sat, Nov 12, 2011 at 12:47 AM, Stefan Hajnoczi
>> wrote:
>>> This patch adds the .bdrv_co_is_allocated() interface which is identical
>>> to .bdrv_is_allocated() but runs in coroutine context. Ru
Am 14.11.2011 04:04, schrieb Zhi Yong Wu:
> On Sat, Nov 12, 2011 at 12:47 AM, Stefan Hajnoczi
> wrote:
>> This patch adds the .bdrv_co_is_allocated() interface which is identical
>> to .bdrv_is_allocated() but runs in coroutine context. Running in
>> coroutine context implies that other coroutine
On 11/14/2011 09:10 AM, Zhi Yong Wu wrote:
> No, they are necessary. They are executed when bdrv_is_allocated_co_entry
> calls qemu_coroutine_yield.
Right, But i don't think that they are necessary.
after bdrv_is_allocated_co_entry has basically completed all main
task, it call qemu_coroutin
On Mon, Nov 14, 2011 at 3:32 PM, Paolo Bonzini wrote:
> 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
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
cod
On Sat, Nov 12, 2011 at 12:47 AM, Stefan Hajnoczi
wrote:
> This patch adds the .bdrv_co_is_allocated() interface which is identical
> to .bdrv_is_allocated() but runs in coroutine context. Running in
> coroutine context implies that other coroutines might be performing I/O
> at the same time. T
This patch adds the .bdrv_co_is_allocated() interface which is identical
to .bdrv_is_allocated() but runs in coroutine context. Running in
coroutine context implies that other coroutines might be performing I/O
at the same time. Therefore it must be safe to run while the following
BlockDriver fu