[pve-devel] [PATCH qemu 6/6] savevm-async: treat failure to set iothread context as a hard failure

Fiona Ebner f.ebner at proxmox.com
Mon Mar 31 16:55:07 CEST 2025


This is not expected to ever fail and there might be assumptions about
having the expected context down the line.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 migration/savevm-async.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/migration/savevm-async.c b/migration/savevm-async.c
index 7176946691..03823ecd17 100644
--- a/migration/savevm-async.c
+++ b/migration/savevm-async.c
@@ -454,9 +454,10 @@ void qmp_savevm_start(const char *statefile, Error **errp)
 
     ret = blk_set_aio_context(snap_state.target, snap_state.iothread->ctx, &local_err);
     if (ret != 0) {
-        warn_report("failed to set iothread context for VM state target: %s %s",
-                    local_err ? error_get_pretty(local_err) : "unknown error",
-                    strerror(-ret));
+        error_setg_errno(errp, -ret, "failed to set iothread context for VM state target: %s",
+                         local_err ? error_get_pretty(local_err) : "unknown error");
+        savevm_start_failed();
+        return;
     }
 
     snap_state.co = qemu_coroutine_create(&process_savevm_co, NULL);
-- 
2.39.5





More information about the pve-devel mailing list