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

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

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]