[libvirt] [PATCH] metadata: track title edits across libvirtd restart

Martin Kletzander mkletzan at redhat.com
Wed Jul 23 05:09:51 UTC 2014

On Tue, Jul 22, 2014 at 01:11:03PM -0600, Eric Blake wrote:
>Although the edits were changing in-memory XML, it was not flushed
>to disk; so unless some other action changes XML, a libvirtd restart
>would lose the changed information.

And there are more places like that.  Take a
qemuDomainSetNumaParameters() for example.  Would it be possible (as
in "not devastatingly hard" to create a syntax-check rule for
*_driver.c files (only those that are applicable, mostly stateful)
that would check if virCheckFlags is called with
VIR_DOMAIN_AFFECT_LIVE and if yes, then that function would have to
call virDomainSaveStatus() as well?

>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index 4b00280..6ed6155 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -19753,9 +19757,12 @@ virDomainObjSetMetadata(virDomainObjPtr vm,
>                                         &persistentDef) < 0)
>         return -1;
>-    if (flags & VIR_DOMAIN_AFFECT_LIVE)
>+    if (flags & VIR_DOMAIN_AFFECT_LIVE) {
>         if (virDomainDefSetMetadata(vm->def, type, metadata, key, uri) < 0)
>             return -1;

One empty line right here would perfectly go with the rest of the
function ;)

ACK with or without this change,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140723/330905d3/attachment-0001.sig>

More information about the libvir-list mailing list