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

Re: [libvirt] [Patch v7 1/4] libvirt/qemu - persistent modification of domain.



On Tue, 29 Mar 2011 13:17:55 +0800
Wen Congyang <wency cn fujitsu com> wrote:

> At 03/29/2011 12:32 PM, KAMEZAWA Hiroyuki Write:
> > On Tue, 29 Mar 2011 11:24:23 +0800
> > Wen Congyang <wency cn fujitsu com> wrote:

> > Hmm ? I'll add a spec. on qemuDomainAt(De)tachDevicePersistent() to
> > never update vmdef when return !0. Is it ok ?
> 
> No.
> In patch 2, the function qemuDomainDeviceAddressFixup() may modify vmdef
> and return -1:
> =============
> +static int qemuDomainDeviceAddressFixup(virDomainDefPtr vmdef, bool pci)
> +{
> +    if (!pci && virDomainDefAddImplicitControllers(vmdef))
> +        return -1;
> +    /* added controller requires PCI address */
> +    return qemuDomainAssignPCIAddresses(vmdef);
> +}
> +
> =============
> The function virDomainDefAddImplicitControllers() may modify vmdef. If 
> qemuDomainAssignPCIAddresses() failed, there is no way to rollback the
> operation that virDomainDefAddImplicitControllers() do.
> 

Of course, I'll add a rollback. That's a bug in patch'2', not here.

Thanks,
-Kame


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