On Mon, Sep 18, 2023 at 15:29:23 +0200, Pavel Hrdina wrote:
When used with internal snapshots there is no memory state file so
we
have no data to load and decompression is not needed.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/qemu/qemu_process.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index c8430bf7b7..f96918073f 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8165,7 +8165,7 @@ qemuProcessStart(virConnectPtr conn,
* @fd: FD pointer of memory state file
* @path: path to memory state file
* @snapshot: internal snapshot to load when starting QEMU process or NULL
- * @data: data from memory state file
+ * @data: data from memory state file or NULL
* @asyncJob: type of asynchronous job
* @start_flags: flags to start QEMU process with
* @reason: audit log reason
@@ -8175,7 +8175,8 @@ qemuProcessStart(virConnectPtr conn,
* is correctly decompressed so it can be loaded by QEMU process.
*
* When reverting to internal snapshot callers needs to pass @snapshot as well
- * correctly start QEMU process.
+ * correctly start QEMU process. In addition there is no memory state file so
+ * it's safe to pass NULL as @data.
This does not fully address my comment from previous patch. It says that
@data 'can' be NULL, not that it MUST be inull if @snapshot is non-null.