qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] nbd: Async built-in server negotiation
@ 2016-01-11  3:36 Fam Zheng
  2016-01-11  3:36 ` [Qemu-devel] [PATCH v2 1/2] nbd: Always call "close_fn" in nbd_client_new Fam Zheng
  2016-01-11  3:36 ` [Qemu-devel] [PATCH v2 2/2] nbd: Coroutine based nbd_send_negotiate Fam Zheng
  0 siblings, 2 replies; 5+ messages in thread
From: Fam Zheng @ 2016-01-11  3:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Paolo Bonzini, qemu-block

v2: Adopt Daniel and Paolo's idea: always call close_fn.

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: Always call "close_fn" in nbd_client_new
  nbd: Coroutine based nbd_send_negotiate

 blockdev-nbd.c      |  5 ++--
 include/block/nbd.h |  3 +--
 nbd.c               | 73 ++++++++++++++++++++++++++++++++++++++---------------
 qemu-nbd.c          | 10 +++-----
 4 files changed, 58 insertions(+), 33 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-12 11:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-11  3:36 [Qemu-devel] [PATCH v2 0/2] nbd: Async built-in server negotiation Fam Zheng
2016-01-11  3:36 ` [Qemu-devel] [PATCH v2 1/2] nbd: Always call "close_fn" in nbd_client_new Fam Zheng
2016-01-11  3:36 ` [Qemu-devel] [PATCH v2 2/2] nbd: Coroutine based nbd_send_negotiate Fam Zheng
2016-01-11 14:00   ` Paolo Bonzini
2016-01-12 11:44     ` Fam Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).