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