于 2011年04月07日 10:21, Eric Blake 写道:
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.
Oh, I misunderstand your meaning here, forget about it, v5 comes. :)