File 31e937fb-libxl-save-lock-indicator.patch of Package libvirt
xxxxxxxxxx
1
commit 31e937fb3b7d0aa040a879394eff700bc1108251
2
Author: Jim Fehlig <jfehlig@suse.com>
3
Date: Mon Jan 24 12:03:20 2022 -0700
4
5
libxl: Add lock process indicator to saved VM state
6
7
Commit fa58f571ee added a lock processes indicator to the
8
libxlDomainObjPrivate struct to note that a lock process was
9
successfully started for the VM. However, the commit neglected to
10
add the indicator to the VM's saved state file. As a result, the
11
indicator is lost on libvirtd restart, along with the knowledge of
12
whether a lock process was started for the VM.
13
14
This change adds support for the indicator in the domainObjPrivate
15
data parse and format callbacks, ensuring its value survives libvirtd
16
restarts.
17
18
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
19
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20
21
Index: libvirt-7.1.0/src/libxl/libxl_domain.c
22
===================================================================
23
--- libvirt-7.1.0.orig/src/libxl/libxl_domain.c
24
+++ libvirt-7.1.0/src/libxl/libxl_domain.c
25
26
libxlDomainObjPrivatePtr priv = vm->privateData;
27
28
priv->lockState = virXPathString("string(./lockstate)", ctxt);
29
+ priv->lockProcessRunning = virXPathBoolean("boolean(./lockProcessRunning)", ctxt);
30
31
return 0;
32
}
33
34
if (priv->lockState)
35
virBufferAsprintf(buf, "<lockstate>%s</lockstate>\n", priv->lockState);
36
37
+ if (priv->lockProcessRunning)
38
+ virBufferAddLit(buf, "<lockProcessRunning/>\n");
39
+
40
return 0;
41
}
42
43