[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/6] sheepdog: restart I/O when socket becomes r
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 2/6] sheepdog: restart I/O when socket becomes ready in do_co_req() |
Date: |
Tue, 03 Jul 2012 15:44:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
Il 03/07/2012 15:09, Kevin Wolf ha scritto:
>> > Signed-off-by: MORITA Kazutaka <address@hidden>
>> > ---
>> > block/sheepdog.c | 14 ++++++++++++++
>> > 1 files changed, 14 insertions(+), 0 deletions(-)
> Paolo, is this how qemu_co_recv/send are supposed to be used?
Yes.
> Shouldn't
> the functions take care of reentering the coroutine like the block
> functions do?
No, because qemu_co_recv/send are generic outside the block layer and
they don't have enough context from the caller to set up the handler.
For example qemu_co_send to keep the recv handler, but in turn the recv
handler might have its own opaque.
In fact, qemu_co_recv/send originated in sheepdog :) so they are (even
with all the refactoring that went in since) Kazutaka's pet too!
Paolo