[libvirt] [PATCH] qemu: mark domain as updated after config updating happened
Eric Blake
eblake at redhat.com
Wed Nov 24 18:44:48 UTC 2010
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).
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.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101124/53cf0f8b/attachment-0001.sig>
More information about the libvir-list
mailing list