[libvirt] [PATCH v3 1/2] qemu: Resolve data loss and data corruption of domain restoring.
Eric Blake
eblake at redhat.com
Thu Apr 7 02:21:33 UTC 2011
On 04/06/2011 08:01 PM, Osier Yang wrote:
>>> managed_save = qemuDomainManagedSavePath(driver, vm);
>>> if ((managed_save)&& (virFileExists(managed_save))) {
>>
>> If managed_save is NULL, then we should be skipping to cleanup
>> (qemuDomainManagedSavePath already reported OOM), rather than silently
>> falling back to normal startup.
>
> No, qemuDomainObjStart is also used by qemuDomainStartWithFlags,
> skipping to cleanup when managed_save is NULL will break the
> starting of all domains which don't have managed state file.
>
> That's risky.
Ignoring OOM is risky. If managed_save is NULL, we are out of memory,
and we should fail the command; that's the only time that
qemuDomainManagedSavePath returns NULL. We don't know if there was a
save file or not. And even if there was not a file, we'd probably run
out of memory again if we attempt normal setup.
--
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/20110406/40a3b60d/attachment-0001.sig>
More information about the libvir-list
mailing list