]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/pve/0039-PVE-add-query_proxmox_support-QMP-command.patch
clean up pve/ patches by squashing patches of patches
[pve-qemu.git] / debian / patches / pve / 0039-PVE-add-query_proxmox_support-QMP-command.patch
CommitLineData
3499c5b4
TL
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Stefan Reiter <s.reiter@proxmox.com>
3Date: Wed, 8 Jul 2020 11:57:53 +0200
4Subject: [PATCH] PVE: add query_proxmox_support QMP command
5
6Generic interface for future use, currently used for PBS dirty-bitmap
7backup support.
8
9Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
10Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
32ee4115
SR
11[PVE: query-proxmox-support: include library version]
12Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3499c5b4 13---
32ee4115
SR
14 pve-backup.c | 8 ++++++++
15 qapi/block-core.json | 25 +++++++++++++++++++++++++
16 2 files changed, 33 insertions(+)
3499c5b4
TL
17
18diff --git a/pve-backup.c b/pve-backup.c
0c893fd8 19index b8182aaf89..40c2697b37 100644
3499c5b4
TL
20--- a/pve-backup.c
21+++ b/pve-backup.c
0c893fd8 22@@ -1073,3 +1073,11 @@ BackupStatus *qmp_query_backup(Error **errp)
3499c5b4
TL
23
24 return info;
25 }
26+
27+ProxmoxSupportStatus *qmp_query_proxmox_support(Error **errp)
28+{
29+ ProxmoxSupportStatus *ret = g_malloc0(sizeof(*ret));
32ee4115 30+ ret->pbs_library_version = g_strdup(proxmox_backup_qemu_version());
3499c5b4
TL
31+ ret->pbs_dirty_bitmap = true;
32+ return ret;
33+}
34diff --git a/qapi/block-core.json b/qapi/block-core.json
817b7667 35index 553112d998..e0a0a60354 100644
3499c5b4
TL
36--- a/qapi/block-core.json
37+++ b/qapi/block-core.json
817b7667 38@@ -868,6 +868,31 @@
3499c5b4
TL
39 ##
40 { 'command': 'backup-cancel' }
41
42+##
43+# @ProxmoxSupportStatus:
44+#
45+# Contains info about supported features added by Proxmox.
46+#
47+# @pbs-dirty-bitmap: True if dirty-bitmap-incremental backups to PBS are
48+# supported.
49+#
32ee4115
SR
50+# @pbs-library-version: Running version of libproxmox-backup-qemu0 library.
51+#
3499c5b4
TL
52+##
53+{ 'struct': 'ProxmoxSupportStatus',
32ee4115
SR
54+ 'data': { 'pbs-dirty-bitmap': 'bool',
55+ 'pbs-library-version': 'str' } }
3499c5b4
TL
56+
57+##
58+# @query-proxmox-support:
59+#
60+# Returns information about supported features added by Proxmox.
61+#
62+# Returns: @ProxmoxSupportStatus
63+#
64+##
65+{ 'command': 'query-proxmox-support', 'returns': 'ProxmoxSupportStatus' }
66+
67 ##
68 # @BlockDeviceTimedStats:
69 #