qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 00/13] Embedded NBD server
@ 2012-08-27 15:00 Paolo Bonzini
  2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 01/13] nbd: add more constants Paolo Bonzini
                   ` (14 more replies)
  0 siblings, 15 replies; 28+ messages in thread
From: Paolo Bonzini @ 2012-08-27 15:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, stefanha

Hi all,

this is an RFC series implementing an NBD server embedded inside QEMU.
This can be used in various cases, including migration with non-shared
storage.

Three new commands are introduced at the QMP level

  { 'command': 'nbd-server-start',  'data': { 'addr': 'IPSocketAddress' } }
  { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
  { 'command': 'nbd-server-stop' }

At the HMP level there is no nbd_server_add command.  nbd_server_start
automatically exposes all of the VM's block devices, and an option -w
makes them writable.

The NBD server exports multiple devices on a single port; they can be
accessed using "nbd:HOST:PART:exportname=NAME".

The patches are mostly boring touching nbd.c.  The part where I need
a second opinion and/or ack is patch 12 and 13.  They fix the case of
a disk being unplugged while NBD export is active.  To do this I add a
NotifierList to a BlockDriverState.  Does this look okay, or is it too
ad hoc?

Paolo Bonzini (13):
  nbd: add more constants
  nbd: pass NBDClient to nbd_send_negotiate
  nbd: do not leak nbd_trip coroutines when a connection is torn down
  nbd: close all clients on deleting export
  nbd: register named exports
  nbd: negotiate with named exports
  nbd: do not close BlockDriverState in nbd_export_close
  qemu-sockets: publish dummy_opts
  qmp: add NBD server commands
  qemu-sockets: make inet_parse public
  hmp: add NBD server commands
  block: add close notifiers
  nbd: add notifier to close exports when the image is closed

 Makefile.objs       |   5 +-
 block.c             |  19 +++-
 block.h             |   1 +
 block_int.h         |   2 +
 blockdev-nbd.c      | 131 ++++++++++++++++++++++
 hmp-commands.hx     |  29 +++++
 hmp.c               |  66 +++++++++++
 hmp.h               |   2 +
 nbd.c               | 311 +++++++++++++++++++++++++++++++++++++++++-----------
 nbd.h               |   6 +
 qapi-schema.json    |  69 ++++++++++++
 qapi/opts-visitor.c |  48 ++++----
 qemu-nbd.c          |   1 +
 qemu-sockets.c      |  16 +--
 qemu_socket.h       |   3 +
 qmp-commands.hx     |  16 +++
 16 file modificati, 621 inserzioni(+), 104 rimozioni(-)
 create mode 100644 blockdev-nbd.c

-- 
1.7.11.2

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

end of thread, other threads:[~2012-09-19 10:22 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-27 15:00 [Qemu-devel] [RFC PATCH 00/13] Embedded NBD server Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 01/13] nbd: add more constants Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 02/13] nbd: pass NBDClient to nbd_send_negotiate Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 03/13] nbd: do not leak nbd_trip coroutines when a connection is torn down Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 04/13] nbd: close all clients on deleting export Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 05/13] nbd: register named exports Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 06/13] nbd: negotiate with " Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 07/13] nbd: do not close BlockDriverState in nbd_export_close Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 08/13] qemu-sockets: publish dummy_opts Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 09/13] qmp: add NBD server commands Paolo Bonzini
2012-09-18 20:11   ` Luiz Capitulino
2012-09-19  8:16     ` Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 10/13] qemu-sockets: make inet_parse public Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 11/13] hmp: add NBD server commands Paolo Bonzini
2012-09-18 20:22   ` Luiz Capitulino
2012-09-19  8:00     ` Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 12/13] block: add close notifiers Paolo Bonzini
2012-08-27 15:00 ` [Qemu-devel] [RFC PATCH 13/13] nbd: add notifier to close exports when the image is closed Paolo Bonzini
2012-09-07 15:50 ` [Qemu-devel] ping Re: [RFC PATCH 00/13] Embedded NBD server Paolo Bonzini
2012-09-07 16:11   ` Kevin Wolf
2012-09-17 16:43     ` Paolo Bonzini
2012-09-18  8:45       ` Kevin Wolf
2012-09-18  9:09         ` Paolo Bonzini
2012-09-18  9:40           ` Kevin Wolf
2012-09-18  9:48             ` Paolo Bonzini
2012-09-18  9:55               ` Kevin Wolf
2012-09-19 10:16 ` [Qemu-devel] " Daniel P. Berrange
2012-09-19 10:22   ` Paolo Bonzini

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