<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 21, 2021 at 2:29 PM Peter Krempa <<a href="mailto:pkrempa@redhat.com">pkrempa@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jul 21, 2021 at 14:05:05 +0200, Kristina Hanicova wrote:<br>
> We didn't always save status xml after generating new taint<br>
> message, which resulted in it being deleted in case of a libvirtd<br>
> restart.  Some taint messages were preserved thanks to saving<br>
> status xml separately at the end of the calling functions (which<br>
> makes sense, because qemuDomainObjTaint was usually called there<br>
> multiple times).  But for special cases (e.g. When only few taint<br>
> messages are generated) we need a separate function for<br>
> generating them and saving status xml explicitly.<br>
<br>
Saving the status XML is a very common operation which we in some cases<br>
repeat a few times when doing an multi-step operation, thus we can<br>
reasonably assume that saving the status XML in all cases when we are<br>
adding a taint on a VM object is okay without the need to special case<br>
operations which don't save the status XML as part of their code.<br></blockquote><div> </div><div>I didn't want to add saving status xml to the original function mainly because<br>of qemuDomainObjCheckTaint, where qemuDomainObjTaint could be potentially<br>called in multiple for cycles. I thought it would be ineffective, but I will<br>change the patch if that kind of situation is not likely.</div><div> </div><div>Kristina<br></div></div></div>