During nbd_send_negotiate, if the client simply doesn't respond, the function
will not return, and the whole event loop is blocked.

Make the I/O effectively asynchronous by using coroutine read/write, so that a
malicious or disappeared client cannot make a hang.

Fam


Fam Zheng (2):
  nbd: Interface tweak of nbd_client_new
  nbd: Coroutine based nbd_send_negotiate

 blockdev-nbd.c      |  5 ++-
 include/block/nbd.h |  6 ++--
 nbd.c               | 87 ++++++++++++++++++++++++++++++++++++++++-------------
 qemu-nbd.c          | 16 +++++-----
 4 files changed, 81 insertions(+), 33 deletions(-)

-- 
2.4.3


Reply via email to