On 22.05.2012 14:03, ronnie sahlberg wrote:
[]
>>> Doh, now I remember.  Whenever you change the aio handlers you need to
>>> call qemu_notify_event() afterwards, if the handler may fire right away.
>>
>> Thanks.  I just confirmed that qemu_notify_event() fixes the issue.
>> Ill send a patch that uses qemu_notify_event() and a comment why this is 
>> needed.

When I were writing network block driver I tried to not call 
qemu_aio_set_fd_handler()
unless absolutely necessary -- that is, trying to write as much as possible till
the next write returns EAGAIN, or to read till the next read returns EAGAIN.  
This
way there's no need to call qemu_notify_event().  FWIW.

/mjt

Reply via email to