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

v3: Rework previous patch 2 (fix the busy loop bug and split to two patches).
    [Paolo]

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 (3):
  nbd: Always call "close_fn" in nbd_client_new
  nbd: Split nbd.c
  nbd-server: Coroutine based negotiation

 MAINTAINERS                  |   5 +-
 Makefile.objs                |   3 +-
 blockdev-nbd.c               |   5 +-
 include/block/nbd-internal.h | 113 +++++++++
 include/block/nbd.h          |   3 +-
 nbd/Makefile.objs            |   1 +
 nbd/client.c                 | 361 ++++++++++++++++++++++++++
 nbd/common.c                 |  64 +++++
 nbd.c => nbd/server.c        | 588 ++++++++-----------------------------------
 qemu-nbd.c                   |  10 +-
 tests/qemu-iotests/083       |   2 +-
 11 files changed, 649 insertions(+), 506 deletions(-)
 create mode 100644 include/block/nbd-internal.h
 create mode 100644 nbd/Makefile.objs
 create mode 100644 nbd/client.c
 create mode 100644 nbd/common.c
 rename nbd.c => nbd/server.c (62%)

-- 
2.4.3

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

end of thread, other threads:[~2016-01-14 20:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-14  8:41 [Qemu-devel] [PATCH v3 0/3] nbd: Async built-in server negotiation Fam Zheng
2016-01-14  8:41 ` [Qemu-devel] [PATCH v3 1/3] nbd: Always call "close_fn" in nbd_client_new Fam Zheng
2016-01-14 17:23   ` Daniel P. Berrange
2016-01-14  8:41 ` [Qemu-devel] [PATCH v3 2/3] nbd: Split nbd.c Fam Zheng
2016-01-14 17:26   ` Daniel P. Berrange
2016-01-14 20:31     ` Paolo Bonzini
2016-01-14  8:41 ` [Qemu-devel] [PATCH v3 3/3] nbd-server: Coroutine based negotiation Fam Zheng
2016-01-14 17:29   ` Daniel P. Berrange

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).