RFC block/export: Add infrastructure and QAPI for block exports
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest22 patches 67 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/22 | nbd: Remove unused nbd_export_get_blockdev()include/ nbd/ | +0 | 2 replies | |
| 2/22 | qapi: Create block-export moduleblock/ blockdev-nbd.c include/ +6 more | +181 | 2 replies | |
| 3/22 | qapi: Rename BlockExport to BlockExportOptionsblock/ blockdev-nbd.c qapi/ +1 more | +14 | 2 replies | |
| 4/22 | block/export: Add BlockExport infrastructure and block-export-addMakefile.objs block/ block/ +6 more | +132 | 6 replies | |
| 5/22 | qemu-storage-daemon: Use qmp_block_export_add()qemu-storage-daemon.c | +1 | 2 replies | |
| 6/22 | qemu-nbd: Use raw block driver for --offsetblockdev-nbd.c include/ nbd/ +1 more | +32 | 6 replies | |
| 7/22 | block/export: Remove magic from block-export-addblock/ blockdev-nbd.c include/ +2 more | +58 | 7 replies | |
| 8/22 | nbd: Add max-connections to nbd-server-startblock/ blockdev-nbd.c include/ +2 more | +39 | 4 replies | |
| 9/22 | nbd: Add writethrough to block-export-addblockdev-nbd.c qapi/ | +7 | 7 replies | |
| 10/22 | nbd: Remove NBDExport.close callbackblockdev-nbd.c include/ nbd/ +1 more | +7 | 2 replies | |
| 11/22 | qemu-nbd: Use blk_exp_add() to create the exportblock/ blockdev-nbd.c include/ +2 more | +33 | 4 replies | |
| 12/22 | nbd/server: Simplify export shutdownnbd/ | +4 | 2 replies | |
| 13/22 | block/export: Move refcount from NBDExport to BlockExportblock/ blockdev-nbd.c include/ +2 more | +58 | 3 replies | |
| 14/22 | block/export: Move AioContext from NBDExport to BlockExportinclude/ nbd/ | +19 | 3 replies | |
| 15/22 | block/export: Move device to BlockExportOptionsblock/ block/ blockdev-nbd.c +2 more | +47 | 4 replies | |
| 16/22 | block/export: Allocate BlockExport in blk_exp_add()block/ blockdev-nbd.c include/ +2 more | +50 | 1 reply | |
| 17/22 | block/export: Add blk_exp_close_all(_type)block.c block/ blockdev-nbd.c +4 more | +68 | 1 reply | |
| 18/22 | block/export: Add 'id' option to block-export-addblock/ include/ qapi/ +1 more | +34 | 1 reply | |
| 19/22 | block/export: Move strong user reference to block_exportsblock/ blockdev-nbd.c include/ +1 more | +12 | 4 replies | |
| 20/22 | block/export: Add block-export-delblock/ block/ blockdev-nbd.c +3 more | +79 | 1 reply | |
| 21/22 | block/export: Move blk to BlockExportblock/ include/ nbd/ | +29 | 1 reply | |
| 22/22 | block/export: Add query-block-exportsblock/ qapi/ | +56 | 2 replies |
Reviews trailers per patch
17 of 22 patches have a Reviewed-by or Acked-by.
| Patch | Max Reitz | Eric Blake |
|---|---|---|
| 1/22 | R-b | R-b |
| 2/22 | R-b | R-b |
| 3/22 | R-b | R-b |
| 4/22 | R-b | |
| 5/22 | R-b | R-b |
| 6/22 | R-b | R-b |
| 7/22 | ||
| 8/22 | R-b | R-b |
| 9/22 | ||
| 10/22 | R-b | R-b |
| 11/22 | R-b | |
| 12/22 | R-b | R-b |
| 13/22 | R-b | |
| 14/22 | R-b | |
| 15/22 | ||
| 16/22 | R-b | |
| 17/22 | R-b | |
| 18/22 | ||
| 19/22 | R-b | |
| 20/22 | R-b | |
| 21/22 | R-b | |
| 22/22 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH 00/22] block/export: Add infrastructure and QAPI for block exports
We are planning to add more block export types than just NBD in the near future (e.g. vhost-user-blk and FUSE). This series lays the ground for this with some generic block export infrastructure and QAPI interfaces that will allow managing all of them (for now add/remove/query).
As a side effect, qemu-storage-daemon can now map --export directly to the block-export-add QMP command, similar to other command line options. The built-in NBD servers also gains new options that bring it at least a little closer to feature parity with qemu-nbd.
This series is still RFC because the patches aren't very polished (though they also shouldn't be too bad), it's not completely clear if more features should be moved from NBD to the BlockExport layer in this series (or maybe even less, and the rest dealt with in a separate series) and qemu-iotests cases for the new interfaces are still missing.
Kevin Wolf (22):
nbd: Remove unused nbd_export_get_blockdev()
qapi: Create block-export module
qapi: Rename BlockExport to BlockExportOptions block/export: Add BlockExport infrastructure and block-export-add
qemu-storage-daemon: Use qmp_block_export_add()
qemu-nbd: Use raw block driver for --offset block/export: Remove magic from block-export-add
nbd: Add max-connections to nbd-server-start
nbd: Add writethrough to block-export-add
nbd: Remove NBDExport.close callback
qemu-nbd: Use blk_exp_add() to create the export nbd/server: Simplify export shutdown
block/export: Move refcount from NBDExport to BlockExport block/export: Move AioContext from NBDExport to BlockExport block/export: Move device to BlockExportOptions block/export: Allocate BlockExport in blk_exp_add() block/export: Add blk_exp_close_all(_type) block/export: Add 'id' option to block-export-add block/export: Move strong user reference to block_exports block/export: Add block-export-del
block/export: Move blk to BlockExport
block/export: Add query-block-exports
qapi/block-core.json | 166 --------------- qapi/block-export.json | 261 +++++++++++++++++++++++ qapi/qapi-schema.json | 1 + include/block/export.h | 73 +++++++ include/block/nbd.h | 25 +-- block.c | 2 +- block/export/export.c | 297 +++++++++++++++++++++++++++ block/monitor/block-hmp-cmds.c | 11 +- blockdev-nbd.c | 124 +++++------ nbd/server.c | 243 +++++++++------------- qemu-nbd.c | 67 +++--- qemu-storage-daemon.c | 25 +-- Makefile.objs | 6 +- block/Makefile.objs | 2 + block/export/Makefile.objs | 1 + qapi/Makefile.objs | 5 +- storage-daemon/qapi/qapi-schema.json | 1 + 17 files changed, 857 insertions(+), 453 deletions(-) create mode 100644 qapi/block-export.json create mode 100644 include/block/export.h create mode 100644 block/export/export.c create mode 100644 block/export/Makefile.objs
Signature · 1 line
2.25.4