aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@openvz.org>2022-03-15 00:32:25 +0300
committerEric Blake <eblake@redhat.com>2022-04-26 13:15:19 -0500
commite5fb29d5d001dd5f300ddb4ad48e11c3ab2d35ec (patch)
tree2efd5ac6e08f2671d39281a42ad7069ee1ebac60 /qapi
parent1466ef6cbe26a55e9bd5d4c3d9f58c793e1eb2c4 (diff)
downloadqemu-e5fb29d5d001dd5f300ddb4ad48e11c3ab2d35ec.zip
qemu-e5fb29d5d001dd5f300ddb4ad48e11c3ab2d35ec.tar.gz
qemu-e5fb29d5d001dd5f300ddb4ad48e11c3ab2d35ec.tar.bz2
qapi: nbd-export: allow select bitmaps by node/name pair
Hi all! Current logic of relying on search through backing chain is not safe neither convenient. Sometimes it leads to necessity of extra bitmap copying. Also, we are going to add "snapshot-access" driver, to access some snapshot state through NBD. And this driver is not formally a filter, and of course it's not a COW format driver. So, searching through backing chain will not work. Instead of widening the workaround of bitmap searching, let's extend the interface so that user can select bitmap precisely. Note, that checking for bitmap active status is not copied to the new API, I don't see a reason for it, user should understand the risks. And anyway, bitmap from other node is unrelated to this export being read-only or read-write. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org> Message-Id: <20220314213226.362217-3-v.sementsov-og@mail.ru> [eblake: Adjust S-o-b to Vladimir's new email, with permission] Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-export.json5
1 files changed, 4 insertions, 1 deletions
diff --git a/qapi/block-export.json b/qapi/block-export.json
index 1e34927..1de16d2 100644
--- a/qapi/block-export.json
+++ b/qapi/block-export.json
@@ -6,6 +6,7 @@
##
{ 'include': 'sockets.json' }
+{ 'include': 'block-core.json' }
##
# @NbdServerOptions:
@@ -89,6 +90,7 @@
# @device, so the NBD client can use NBD_OPT_SET_META_CONTEXT with
# the metadata context name "qemu:dirty-bitmap:BITMAP" to inspect
# each bitmap.
+# Since 7.1 bitmap may be specified by node/name pair.
#
# @allocation-depth: Also export the allocation depth map for @device, so
# the NBD client can use NBD_OPT_SET_META_CONTEXT with
@@ -99,7 +101,8 @@
##
{ 'struct': 'BlockExportOptionsNbd',
'base': 'BlockExportOptionsNbdBase',
- 'data': { '*bitmaps': ['str'], '*allocation-depth': 'bool' } }
+ 'data': { '*bitmaps': ['BlockDirtyBitmapOrStr'],
+ '*allocation-depth': 'bool' } }
##
# @BlockExportOptionsVhostUserBlk: