From 56ee86261e0ffa151e82b383d9628cf5660be355 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 24 Sep 2020 17:26:50 +0200 Subject: block/export: Add BlockExport infrastructure and block-export-add We want to have a common set of commands for all types of block exports. Currently, this is only NBD, but we're going to add more types. This patch adds the basic BlockExport and BlockExportDriver structs and a QMP command block-export-add that creates a new export based on the given BlockExportOptions. qmp_nbd_server_add() becomes a wrapper around qmp_block_export_add(). Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Message-Id: <20200924152717.287415-5-kwolf@redhat.com> Acked-by: Stefan Hajnoczi Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qapi/block-export.json | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'qapi') diff --git a/qapi/block-export.json b/qapi/block-export.json index 6ac3a63123..5890a94219 100644 --- a/qapi/block-export.json +++ b/qapi/block-export.json @@ -172,3 +172,13 @@ 'data': { 'nbd': 'BlockExportOptionsNbd' } } + +## +# @block-export-add: +# +# Creates a new block export. +# +# Since: 5.2 +## +{ 'command': 'block-export-add', + 'data': 'BlockExportOptions', 'boxed': true } -- cgit v1.2.3