qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] Add file-posix-dynamic-auto-read-only feature


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 2/2] Add file-posix-dynamic-auto-read-only feature
Date: Thu, 28 Mar 2019 19:28:10 +0100

auto-read-only=on changed its behaviour in file-posix for the 4.0
release. This change cannot be detected through the usual mechanisms
like schema introspection. Add a new feature to query-qemu-features to
allow libvirt to detect the presence of the new behaviour.

Signed-off-by: Kevin Wolf <address@hidden>
---
 qapi/misc.json | 7 ++++++-
 qmp.c          | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/qapi/misc.json b/qapi/misc.json
index d892f37633..df23c54a65 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -3058,10 +3058,15 @@
 # Information about support for QEMU features that isn't available through
 # schema introspection.
 #
+# @file-posix-dynamic-auto-read-only:
+#   true if auto-read-only=on means that the image file is dynamically reopened
+#   read-only or read-write depending on whether any writers are attached to
+#   the node.
+#
 # Since: 4.0
 ##
 { 'struct': 'QemuFeatures',
-  'data': { } }
+  'data': { 'file-posix-dynamic-auto-read-only': 'bool' } }
 
 ##
 # @query-qemu-features:
diff --git a/qmp.c b/qmp.c
index 0aad533eca..2a887c1e7d 100644
--- a/qmp.c
+++ b/qmp.c
@@ -723,6 +723,7 @@ QemuFeatures *qmp_query_qemu_features(Error **errp)
     QemuFeatures *caps = g_new(QemuFeatures, 1);
 
     *caps = (QemuFeatures) {
+        .file_posix_dynamic_auto_read_only = true,
     };
 
     return caps;
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]