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

Re: [libvirt] [PATCH v3 1/2] qemu: Resolve data loss and data corruption of domain restoring.

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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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