[pve-devel] [PATCH qemu 1/2] PVE: add query_proxmox_support QMP command

Stefan Reiter s.reiter at proxmox.com
Wed Jul 8 10:42:27 CEST 2020


Generic interface for future use, currently only used for dirty-bitmap
backup support.

Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
 pve-backup.c         |  7 +++++++
 qapi/block-core.json | 22 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/pve-backup.c b/pve-backup.c
index 46191bb328..187a78f38d 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -1044,3 +1044,10 @@ BackupStatus *qmp_query_backup(Error **errp)
 
     return info;
 }
+
+ProxmoxSupportStatus *qmp_query_proxmox_support(Error **errp)
+{
+    ProxmoxSupportStatus *ret = g_malloc0(sizeof(*ret));
+    ret->pbs_dirty_bitmap = true;
+    return ret;
+}
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 2c83734b04..169b89a58e 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -861,6 +861,28 @@
 ##
 { 'command': 'backup-cancel' }
 
+##
+# @ProxmoxSupportStatus:
+#
+# Contains info about supported features added by Proxmox.
+#
+# @pbs-dirty-bitmap: True if dirty-bitmap-incremental backups to PBS are
+#                    supported.
+#
+##
+{ 'struct': 'ProxmoxSupportStatus',
+  'data': { 'pbs-dirty-bitmap': 'bool' } }
+
+##
+# @query-proxmox-support:
+#
+# Returns information about supported features added by Proxmox.
+#
+# Returns: @ProxmoxSupportStatus
+#
+##
+{ 'command': 'query-proxmox-support', 'returns': 'ProxmoxSupportStatus' }
+
 ##
 # @BlockDeviceTimedStats:
 #
-- 
2.20.1






More information about the pve-devel mailing list