[libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

Eric Blake eblake at redhat.com
Wed Mar 7 18:39:16 UTC 2012


On 03/07/2012 10:48 AM, Michal Privoznik wrote:
> Some nits are generated during XML parse (e.g. MAC address of

s/nits/members/

> an interface); However, with current implementation, if we
> are plugging a device both to persistent and live config,
> we parse given XML twice: first time for live, second for config.
> This is wrong then as the second time we are not guaranteed
> to generate same values as we did for the first time.
> To prevent that we need to create a copy of DeviceDefPtr;
> This is done through format/parse process instead of writing
> functions for deep copy as it is easier to maintain:
> adding new field to any virDomain*DefPtr doesn't require change
> of copying function.
> ---
> diff to v1:
> -Eric's review included

except for in the commit message itself :)

ACK.

But Laine had comments on v1 as well, in case you want to wait for a
second opinion on whether this needs any more work.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120307/4c07c582/attachment-0001.sig>


More information about the libvir-list mailing list