From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 qemu 2/3] drop deprecated custom drive snapshot QMP commands
Date: Wed, 24 May 2023 15:56:53 +0200 [thread overview]
Message-ID: <20230524135654.214008-6-f.ebner@proxmox.com> (raw)
In-Reply-To: <20230524135654.214008-1-f.ebner@proxmox.com>
They are not required anymore since qemu-server >= 5.0-36.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
New in v2.
...async-for-background-state-snapshots.patch | 101 +++---------------
...add-optional-buffer-size-to-QEMUFile.patch | 4 +-
...ckup-Proxmox-backup-patches-for-QEMU.patch | 6 +-
...vm-async-don-t-hold-BQL-during-setup.patch | 2 +-
4 files changed, 22 insertions(+), 91 deletions(-)
diff --git a/debian/patches/pve/0017-PVE-add-savevm-async-for-background-state-snapshots.patch b/debian/patches/pve/0017-PVE-add-savevm-async-for-background-state-snapshots.patch
index d42d0f0..926b38d 100644
--- a/debian/patches/pve/0017-PVE-add-savevm-async-for-background-state-snapshots.patch
+++ b/debian/patches/pve/0017-PVE-add-savevm-async-for-background-state-snapshots.patch
@@ -31,17 +31,17 @@ Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
hmp-commands-info.hx | 13 +
- hmp-commands.hx | 33 +++
+ hmp-commands.hx | 17 ++
include/migration/snapshot.h | 2 +
- include/monitor/hmp.h | 5 +
+ include/monitor/hmp.h | 3 +
migration/meson.build | 1 +
- migration/savevm-async.c | 548 +++++++++++++++++++++++++++++++++++
- monitor/hmp-cmds.c | 58 ++++
+ migration/savevm-async.c | 533 +++++++++++++++++++++++++++++++++++
+ monitor/hmp-cmds.c | 38 +++
qapi/migration.json | 34 +++
- qapi/misc.json | 32 ++
+ qapi/misc.json | 16 ++
qemu-options.hx | 12 +
softmmu/vl.c | 10 +
- 11 files changed, 748 insertions(+)
+ 11 files changed, 679 insertions(+)
create mode 100644 migration/savevm-async.c
diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
@@ -69,10 +69,10 @@ index 47d63d26db..a166bff3d5 100644
.name = "balloon",
.args_type = "",
diff --git a/hmp-commands.hx b/hmp-commands.hx
-index bb85ee1d26..b66d7fc4ab 100644
+index bb85ee1d26..d9f9f42d11 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
-@@ -1846,3 +1846,36 @@ SRST
+@@ -1846,3 +1846,20 @@ SRST
List event channels in the guest
ERST
#endif
@@ -86,22 +86,6 @@ index bb85ee1d26..b66d7fc4ab 100644
+ },
+
+ {
-+ .name = "snapshot-drive",
-+ .args_type = "device:s,name:s",
-+ .params = "device name",
-+ .help = "Create internal snapshot.",
-+ .cmd = hmp_snapshot_drive,
-+ },
-+
-+ {
-+ .name = "delete-drive-snapshot",
-+ .args_type = "device:s,name:s",
-+ .params = "device name",
-+ .help = "Delete internal snapshot.",
-+ .cmd = hmp_delete_drive_snapshot,
-+ },
-+
-+ {
+ .name = "savevm-end",
+ .args_type = "",
+ .params = "",
@@ -121,7 +105,7 @@ index e72083b117..c846d37806 100644
+
#endif
diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h
-index fdb69b7f9c..c012bad741 100644
+index fdb69b7f9c..fdf6b45fb8 100644
--- a/include/monitor/hmp.h
+++ b/include/monitor/hmp.h
@@ -28,6 +28,7 @@ void hmp_info_status(Monitor *mon, const QDict *qdict);
@@ -132,13 +116,11 @@ index fdb69b7f9c..c012bad741 100644
void hmp_info_migrate(Monitor *mon, const QDict *qdict);
void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict);
void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict);
-@@ -94,6 +95,10 @@ void hmp_closefd(Monitor *mon, const QDict *qdict);
+@@ -94,6 +95,8 @@ void hmp_closefd(Monitor *mon, const QDict *qdict);
void hmp_mouse_move(Monitor *mon, const QDict *qdict);
void hmp_mouse_button(Monitor *mon, const QDict *qdict);
void hmp_mouse_set(Monitor *mon, const QDict *qdict);
+void hmp_savevm_start(Monitor *mon, const QDict *qdict);
-+void hmp_snapshot_drive(Monitor *mon, const QDict *qdict);
-+void hmp_delete_drive_snapshot(Monitor *mon, const QDict *qdict);
+void hmp_savevm_end(Monitor *mon, const QDict *qdict);
void hmp_sendkey(Monitor *mon, const QDict *qdict);
void coroutine_fn hmp_screendump(Monitor *mon, const QDict *qdict);
@@ -157,10 +139,10 @@ index 8a142fc7a9..a7824b5266 100644
'threadinfo.c',
diff --git a/migration/savevm-async.c b/migration/savevm-async.c
new file mode 100644
-index 0000000000..c5db9e9c1e
+index 0000000000..ac1fac6378
--- /dev/null
+++ b/migration/savevm-async.c
-@@ -0,0 +1,548 @@
+@@ -0,0 +1,533 @@
+#include "qemu/osdep.h"
+#include "migration/channel-savevm-async.h"
+#include "migration/migration.h"
@@ -640,21 +622,6 @@ index 0000000000..c5db9e9c1e
+ DPRINTF("savevm-end: cleanup done\n");
+}
+
-+// FIXME: Deprecated
-+void qmp_snapshot_drive(const char *device, const char *name, Error **errp)
-+{
-+ // Compatibility to older qemu-server.
-+ qmp_blockdev_snapshot_internal_sync(device, name, errp);
-+}
-+
-+// FIXME: Deprecated
-+void qmp_delete_drive_snapshot(const char *device, const char *name,
-+ Error **errp)
-+{
-+ // Compatibility to older qemu-server.
-+ (void)qmp_blockdev_snapshot_delete_internal_sync(device, NULL, name, errp);
-+}
-+
+int load_snapshot_from_blockdev(const char *filename, Error **errp)
+{
+ BlockBackend *be;
@@ -710,7 +677,7 @@ index 0000000000..c5db9e9c1e
+ return ret;
+}
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
-index 6c559b48c8..435f9334f9 100644
+index 6c559b48c8..91be698308 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -22,6 +22,7 @@
@@ -721,7 +688,7 @@ index 6c559b48c8..435f9334f9 100644
#include "qapi/qapi-commands-misc.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qerror.h"
-@@ -443,3 +444,60 @@ void hmp_info_mtree(Monitor *mon, const QDict *qdict)
+@@ -443,3 +444,40 @@ void hmp_info_mtree(Monitor *mon, const QDict *qdict)
mtree_info(flatview, dispatch_tree, owner, disabled);
}
@@ -735,26 +702,6 @@ index 6c559b48c8..435f9334f9 100644
+ hmp_handle_error(mon, errp);
+}
+
-+void hmp_snapshot_drive(Monitor *mon, const QDict *qdict)
-+{
-+ Error *errp = NULL;
-+ const char *name = qdict_get_str(qdict, "name");
-+ const char *device = qdict_get_str(qdict, "device");
-+
-+ qmp_snapshot_drive(device, name, &errp);
-+ hmp_handle_error(mon, errp);
-+}
-+
-+void hmp_delete_drive_snapshot(Monitor *mon, const QDict *qdict)
-+{
-+ Error *errp = NULL;
-+ const char *name = qdict_get_str(qdict, "name");
-+ const char *device = qdict_get_str(qdict, "device");
-+
-+ qmp_delete_drive_snapshot(device, name, &errp);
-+ hmp_handle_error(mon, errp);
-+}
-+
+void coroutine_fn hmp_savevm_end(Monitor *mon, const QDict *qdict)
+{
+ Error *errp = NULL;
@@ -828,10 +775,10 @@ index c84fa10e86..1702b92553 100644
# @query-migrate:
#
diff --git a/qapi/misc.json b/qapi/misc.json
-index 6ddd16ea28..098c9bbe93 100644
+index 6ddd16ea28..e5681ae8a2 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
-@@ -469,6 +469,38 @@
+@@ -469,6 +469,22 @@
##
{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
@@ -844,22 +791,6 @@ index 6ddd16ea28..098c9bbe93 100644
+{ 'command': 'savevm-start', 'data': { '*statefile': 'str' } }
+
+##
-+# @snapshot-drive:
-+#
-+# Create an internal drive snapshot.
-+#
-+##
-+{ 'command': 'snapshot-drive', 'data': { 'device': 'str', 'name': 'str' } }
-+
-+##
-+# @delete-drive-snapshot:
-+#
-+# Delete a drive snapshot.
-+#
-+##
-+{ 'command': 'delete-drive-snapshot', 'data': { 'device': 'str', 'name': 'str' } }
-+
-+##
+# @savevm-end:
+#
+# Resume VM after a snapshot.
diff --git a/debian/patches/pve/0018-PVE-add-optional-buffer-size-to-QEMUFile.patch b/debian/patches/pve/0018-PVE-add-optional-buffer-size-to-QEMUFile.patch
index cd7b508..98cd3ce 100644
--- a/debian/patches/pve/0018-PVE-add-optional-buffer-size-to-QEMUFile.patch
+++ b/debian/patches/pve/0018-PVE-add-optional-buffer-size-to-QEMUFile.patch
@@ -192,7 +192,7 @@ index 9d0155a2a1..cc06240e8d 100644
int qemu_fclose(QEMUFile *f);
diff --git a/migration/savevm-async.c b/migration/savevm-async.c
-index c5db9e9c1e..effe6d1e0d 100644
+index ac1fac6378..ea3b2f36a6 100644
--- a/migration/savevm-async.c
+++ b/migration/savevm-async.c
@@ -380,7 +380,7 @@ void qmp_savevm_start(const char *statefile, Error **errp)
@@ -204,7 +204,7 @@ index c5db9e9c1e..effe6d1e0d 100644
if (!snap_state.file) {
error_set(errp, ERROR_CLASS_GENERIC_ERROR, "failed to open '%s'", statefile);
-@@ -513,7 +513,8 @@ int load_snapshot_from_blockdev(const char *filename, Error **errp)
+@@ -498,7 +498,8 @@ int load_snapshot_from_blockdev(const char *filename, Error **errp)
blk_op_block_all(be, blocker);
/* restore the VM state */
diff --git a/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch b/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch
index 99b2a08..cd9818d 100644
--- a/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch
+++ b/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch
@@ -203,7 +203,7 @@ index a166bff3d5..4b75966c2e 100644
{
.name = "usernet",
diff --git a/hmp-commands.hx b/hmp-commands.hx
-index b66d7fc4ab..896430dae8 100644
+index d9f9f42d11..775518fb09 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -101,6 +101,37 @@ ERST
@@ -245,7 +245,7 @@ index b66d7fc4ab..896430dae8 100644
{
diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h
-index c012bad741..2e504db706 100644
+index fdf6b45fb8..e01b2201d8 100644
--- a/include/monitor/hmp.h
+++ b/include/monitor/hmp.h
@@ -32,6 +32,7 @@ void hmp_info_savevm(Monitor *mon, const QDict *qdict);
@@ -278,7 +278,7 @@ index 603cdb97bb..d307d8eabf 100644
# libselinux
selinux = dependency('libselinux',
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
-index 435f9334f9..9a67e544ce 100644
+index 91be698308..5b9c231a4c 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -21,6 +21,7 @@
diff --git a/debian/patches/pve/0045-savevm-async-don-t-hold-BQL-during-setup.patch b/debian/patches/pve/0045-savevm-async-don-t-hold-BQL-during-setup.patch
index ce5e14e..4a1b1b8 100644
--- a/debian/patches/pve/0045-savevm-async-don-t-hold-BQL-during-setup.patch
+++ b/debian/patches/pve/0045-savevm-async-don-t-hold-BQL-during-setup.patch
@@ -13,7 +13,7 @@ Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
1 file changed, 2 deletions(-)
diff --git a/migration/savevm-async.c b/migration/savevm-async.c
-index effe6d1e0d..f006a8e4d4 100644
+index ea3b2f36a6..dd7744ab66 100644
--- a/migration/savevm-async.c
+++ b/migration/savevm-async.c
@@ -403,10 +403,8 @@ void qmp_savevm_start(const char *statefile, Error **errp)
--
2.39.2
next prev parent reply other threads:[~2023-05-24 13:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 13:56 [pve-devel] [PATCH-SERIES v2 qemu-server/qemu] Some breaking QEMU changes Fiona Ebner
2023-05-24 13:56 ` [pve-devel] [PATCH v2 qemu-server 1/3] remove left-over mentions of to-be-dropped, outdated QMP commands Fiona Ebner
2023-05-24 13:56 ` [pve-devel] [RFC v2 qemu-server 2/3] qmeventd: extract vmid from cgroup file instead of cmdline Fiona Ebner
2023-05-24 13:56 ` [pve-devel] [RFC v2 qemu-server 3/3] cfg2cmd: drop custom id parameter Fiona Ebner
2023-05-24 13:56 ` [pve-devel] [PATCH v2 qemu 1/3] drop patch for custom get_link_status QMP command Fiona Ebner
2023-05-24 13:56 ` Fiona Ebner [this message]
2023-05-24 13:56 ` [pve-devel] [RFC v2 qemu 3/3] drop patch for custom dummy id CLI argument Fiona Ebner
2023-06-07 17:39 ` [pve-devel] partially-applied-series: [PATCH-SERIES v2 qemu-server/qemu] Some breaking QEMU changes Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230524135654.214008-6-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.