Re: [PATCH] qemu: mark domain as updated after config updating happened

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ä 2010å11æ25æ 02:44, Eric Blake åé:
On 11/24/2010 05:51 AM, Osier Yang wrote:
* src/qemu/qemu_driver.c (qemudDomainDetachDevice,
qemudDomainAttachDevice, qemuDomainUpdateDeviceFlags)
---
  src/qemu/qemu_driver.c |    9 +++++++++
  1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f00d8a3..b55e189 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8864,6 +8864,9 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
          goto endjob;
      }

+    if (ret == 0&&  !vm->updated)
+        vm->updated = 1;
+

This could be simplified to:

if (ret == 0)
     vm->updated = 1;

(no harm in re-setting it to 1 if it is already 1, and it can only be 0
or 1).

yeah, make sense.


Are you also missing an update when vcpus are modified?  I'm wondering
if it would be better to make virDomainSaveStatus auto-set the updated
field, rather than making every call have to independently do it.


yeah, for vcpu hotplug, I think so, other vcpu updates are for
persistent change, no need to mark it as "updated".

It's better if we could make virDomainSaveStatus auto-set it, but
qemudDomainHotplugVcpus doesn't invoke virDomainSaveStatus.

Regards

- Osier



--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]