| Branch: | Revision:

root / blockdev-nbd.c @ feature-archipelago

History | View | Annotate | Download (3 kB)

# Date Author Comment
38b54b6d 09/06/2013 04:25 pm Fam Zheng

nbd: use BlockDriverState refcnt

Previously, nbd calls drive_get_ref() on the drive of bs. A BDS doesn't
always have associated dinfo, which nbd doesn't care either. We already
have BDS ref count, so use it to make it safe for a BDS w/o blockdev.

Signed-off-by: Fam Zheng <>...

0d09e41a 04/08/2013 07:13 pm Paolo Bonzini

hw: move headers to include/

Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches....

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <>

7b1b5d19 12/19/2012 09:31 am Paolo Bonzini

qapi: move include files to include/qobject/

Signed-off-by: Paolo Bonzini <>

737e150e 12/19/2012 09:31 am Paolo Bonzini

block: move include files to include/block/

Signed-off-by: Paolo Bonzini <>

f3313d23 11/28/2012 12:56 pm Michal Privoznik

nbd-server-add: Fix the default for 'writable'

The documentation to this monitor command tells, that 'writable'
argument is optional and defaults to false. However, the code sets
true as the default. But since some applications may already been
using this, it's safer to fix the code and not documentation which...

fc6467ea 11/12/2012 03:38 pm Paolo Bonzini

nbd: fix nbd_server_stop crash when no server was running

This failed on the new assertion of qemu_set_fd_handler2:

qemu-system-x86_64: /home/pbonzini/work/upstream/qemu/iohandler.c:60: qemu_set_fd_handler2: Assertion `fd >= 0' failed.

Signed-off-by: Paolo Bonzini <>

e6444734 11/12/2012 03:38 pm Paolo Bonzini

nbd: force read-only export for read-only devices

This is the desired behavior for HMP, but it is a better choice for QMP as well.

Signed-off-by: Paolo Bonzini <>

17b6be4a 11/12/2012 03:38 pm Paolo Bonzini

nbd: disallow nbd-server-add before nbd-server-start

It works nicely with the QMP commands, but it adds useless complication
with HMP. In particular, see the following:

(qemu) nbd_server_add -w scsi0-hd0
(qemu) nbd_server_start -a localhost:10809...
6dd844db 10/23/2012 11:39 pm Paolo Bonzini

qmp: add NBD server commands

Adding an NBD server inside QEMU is trivial, since all the logic is
in nbd.c and can be shared easily between qemu-nbd and QEMU itself.
The main difference is that qemu-nbd serves a single unnamed export,
while QEMU serves named exports....