Add qemu-storage-daemon
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest20 patches 4 repliesIn review
- v1 RFC18 patches 46 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/20 | qemu-storage-daemon: Add barebone toolMakefile configure qemu-storage-daemon.c | +129 | 0 replies | |
| 2/20 | stubs: Add arch_typeinclude/ stubs/ stubs/ | +7 | 0 replies | |
| 3/20 | block: Move system emulator QMP commands to block/qapi-sysemu.cblock/ block/ blockdev.c | +592 | 0 replies | |
| 4/20 | block: Move common QMP commands to block-core QAPI moduleqapi/ qapi/ | +283 | 0 replies | |
| 5/20 | block: Move sysemu QMP commands to QAPI block modulemonitor/ qapi/ qapi/ | +387 | 0 replies | |
| 6/20 | qemu-storage-daemon: Add --blockdev optionMakefile Makefile.objs block/ +1 more | +43 | 0 replies | |
| 7/20 | qapi: Flatten object-addhw/ include/ monitor/ +3 more | +67 | 0 replies | |
| 8/20 | qemu-storage-daemon: Add --object optionMakefile.objs qemu-storage-daemon.c qom/ | +49 | 2 replies | |
| 9/20 | qemu-storage-daemon: Add --nbd-server optionMakefile.objs blockdev-nbd.c include/ +2 more | +56 | 0 replies | |
| 10/20 | blockdev-nbd: Boxed argument type for nbd-server-addblockdev-nbd.c monitor/ qapi/ | +47 | 0 replies | |
| 11/20 | qemu-storage-daemon: Add --export optionqapi/ qemu-storage-daemon.c | +58 | 0 replies | |
| 12/20 | qemu-storage-daemon: Add main loopMakefile.objs qemu-storage-daemon.c | +15 | 0 replies | |
| 13/20 | qemu-storage-daemon: Add --chardev optionMakefile qemu-storage-daemon.c | +25 | 0 replies | |
| 14/20 | stubs: Update monitor stubs for qemu-storage-daemonstubs/ stubs/ stubs/ | +24 | 0 replies | |
| 15/20 | qapi: Create 'pragma' moduleqapi/ qapi/ qapi/ | +26 | 0 replies | |
| 16/20 | monitor: Create QAPIfied monitor_init()include/ monitor/ qapi/ | +80 | 0 replies | |
| 17/20 | qmp: Fail gracefully if chardev is already in useinclude/ monitor/ monitor/ +2 more | +16 | 0 replies | |
| 18/20 | hmp: Fail gracefully if chardev is already in usechardev/ gdbstub.c include/ +4 more | +18 | 0 replies | |
| 19/20 | monitor: Add allow_hmp parameter to monitor_init()include/ monitor/ qapi/ | +13 | 0 replies | |
| 20/20 | qemu-storage-daemon: Add --monitor optionMakefile Makefile.objs monitor/ +7 more | +121 | 0 replies |
Reviews trailers per patch
None of the 20 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Stefan Hajnoczi |
|---|---|
| Series | A-b |
| 1/20 | |
| 2/20 | |
| 3/20 | |
| 4/20 | |
| 5/20 | |
| 6/20 | |
| 7/20 | |
| 8/20 | |
| 9/20 | |
| 10/20 | |
| 11/20 | |
| 12/20 | |
| 13/20 | |
| 14/20 | |
| 15/20 | |
| 16/20 | |
| 17/20 | |
| 18/20 | |
| 19/20 | |
| 20/20 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 00/20] Add qemu-storage-daemon
This series adds a new tool 'qemu-storage-daemon', which can be used to export and perform operations on block devices. There is some overlap between qemu-img/qemu-nbd and the new qemu-storage-daemon, but there are a few important differences:
* The qemu-storage-daemon has QMP support. The command set is obviously restricted compared to the system emulator because there is no guest, but all of the block operations that are not tied to gues devices are present.
This means that it can access advanced options or operations that the qemu-img command line doesn't expose. For example, blockdev-create is a lot more powerful than 'qemu-img create', and qemu-storage-daemon allows to execute it without starting a guest.
Compared to qemu-nbd it means that, for example, block jobs can now be executed on the server side, and backing chains shared by multiple VMs can be modified this way.
* The existing tools all have a separately invented one-off syntax for the job at hand, which usually comes with restrictions compared to the system emulator. qemu-storage-daemon shares the same syntax with the system emulator for most options and prefers QAPI based interfaces where possible (such as --blockdev), so it should be easy to make use of in libvirt.
The exception is --chardev, for which not clear design for a QAPIfied command line exists yet. We'll consider this interface unstable until we've figured out how to solve it. For now it just uses the same QemuOpts-based code as the system emulator.
* While this series implements only NBD exports, the storage daemon is intended to serve multiple protocols and its syntax reflects this. In the past, we had proposals to add new one-off tools for exporting over new protocols like FUSE or TCMU.
With a generic storage daemon, additional export methods have a home without adding a new tool for each of them.
The plan is to merge qemu-storage-daemon as an experimental feature with a reduced API stability promise in 5.0.
Kevin Wolf (20):
qemu-storage-daemon: Add barebone tool
stubs: Add arch_type
block: Move system emulator QMP commands to block/qapi-sysemu.c
block: Move common QMP commands to block-core QAPI module
block: Move sysemu QMP commands to QAPI block module
qemu-storage-daemon: Add --blockdev option
qapi: Flatten object-add
qemu-storage-daemon: Add --object option
qemu-storage-daemon: Add --nbd-server option
blockdev-nbd: Boxed argument type for nbd-server-add
qemu-storage-daemon: Add --export option
qemu-storage-daemon: Add main loop
qemu-storage-daemon: Add --chardev option
stubs: Update monitor stubs for qemu-storage-daemon
qapi: Create 'pragma' module
monitor: Create QAPIfied monitor_init()
qmp: Fail gracefully if chardev is already in use
hmp: Fail gracefully if chardev is already in use
monitor: Add allow_hmp parameter to monitor_init()
qemu-storage-daemon: Add --monitor option
qapi/block-core.json | 730 +++++++++++++-------------- qapi/block.json | 512 +++++++++++-------- qapi/control.json | 37 ++ qapi/pragma.json | 24 + qapi/qapi-schema.json | 25 +- qapi/qom.json | 12 +- qapi/transaction.json | 2 +- configure | 2 +- include/block/nbd.h | 1 + include/monitor/monitor.h | 6 +- include/qom/object_interfaces.h | 7 + include/sysemu/arch_init.h | 2 + block/qapi-sysemu.c | 590 ++++++++++++++++++++++ blockdev-nbd.c | 40 +- blockdev.c | 559 -------------------- chardev/char.c | 8 +- gdbstub.c | 2 +- hw/block/xen-block.c | 11 +- monitor/hmp-cmds.c | 21 +- monitor/hmp.c | 8 +- monitor/misc.c | 2 + monitor/monitor.c | 86 ++-- monitor/qmp-cmds.c | 2 +- monitor/qmp.c | 11 +- qemu-storage-daemon.c | 340 +++++++++++++ qom/qom-qmp-cmds.c | 42 +- stubs/arch_type.c | 4 + stubs/monitor-core.c | 21 + stubs/monitor.c | 17 +- tests/test-util-sockets.c | 4 +- scripts/qapi/gen.py | 5 + Makefile | 37 ++ Makefile.objs | 9 + block/Makefile.objs | 4 +- monitor/Makefile.objs | 2 + qapi/Makefile.objs | 7 +- qemu-deprecated.texi | 4 + qom/Makefile.objs | 1 + storage-daemon/Makefile.objs | 1 + storage-daemon/qapi/Makefile.objs | 1 + storage-daemon/qapi/qapi-schema.json | 26 + stubs/Makefile.objs | 2 + 42 files changed, 1955 insertions(+), 1272 deletions(-) create mode 100644 qapi/pragma.json create mode 100644 block/qapi-sysemu.c create mode 100644 qemu-storage-daemon.c create mode 100644 stubs/arch_type.c create mode 100644 stubs/monitor-core.c create mode 100644 storage-daemon/Makefile.objs create mode 100644 storage-daemon/qapi/Makefile.objs create mode 100644 storage-daemon/qapi/qapi-schema.json
Signature · 1 line
2.20.1