aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2025-02-04 22:13:58 +0100
committerKevin Wolf <kwolf@redhat.com>2025-02-06 14:26:51 +0100
commitfaecd16fe5c65a25b5b55b5edbe4322cec5a9d96 (patch)
tree9b1dd4b5b9df09206ec2cfec167b8e760abfcfc4 /qapi
parent8c2c72a33581987af8d8c484d03af3cd69b9e10a (diff)
downloadqemu-faecd16fe5c65a25b5b55b5edbe4322cec5a9d96.zip
qemu-faecd16fe5c65a25b5b55b5edbe4322cec5a9d96.tar.gz
qemu-faecd16fe5c65a25b5b55b5edbe4322cec5a9d96.tar.bz2
block: Add option to create inactive nodes
In QEMU, nodes are automatically created inactive while expecting an incoming migration (i.e. RUN_STATE_INMIGRATE). In qemu-storage-daemon, the notion of runstates doesn't exist. It also wouldn't necessarily make sense to introduce it because a single daemon can serve multiple VMs that can be in different states. Therefore, allow the user to explicitly open images as inactive with a new option. The default is as before: Nodes are usually active, except when created during RUN_STATE_INMIGRATE. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20250204211407.381505-8-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json6
1 files changed, 6 insertions, 0 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 1296ca8..6029e54 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -4683,6 +4683,11 @@
#
# @cache: cache-related options
#
+# @active: whether the block node should be activated (default: true).
+# Having inactive block nodes is useful primarily for migration because it
+# allows opening an image on the destination while the source is still
+# holding locks for it. (Since 10.0)
+#
# @read-only: whether the block device should be read-only (default:
# false). Note that some block drivers support only read-only
# access, either generally or in certain configurations. In this
@@ -4709,6 +4714,7 @@
'*node-name': 'str',
'*discard': 'BlockdevDiscardOptions',
'*cache': 'BlockdevCacheOptions',
+ '*active': 'bool',
'*read-only': 'bool',
'*auto-read-only': 'bool',
'*force-share': 'bool',