Home
last modified time | relevance | path

Searched hist:"7 fe7b68b" (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/block/
H A Dnbd.c7fe7b68b Mon Mar 05 02:10:35 CST 2012 Paolo Bonzini <pbonzini@redhat.com> nbd: do not block in nbd_wr_sync if no data at all is available

Right now, nbd_wr_sync will hang if no data at all is available on the
socket and the other side is not going to provide any. Relax this by
making it loop only for writes or partial reads. This fixes a race
where one thread is executing qemu_aio_wait() and another is executing
main_loop_wait(). Then, the select() call in main_loop_wait() can return
stale data and call the "readable" callback with no data in the socket.

Reported-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>