Laurent Vivier <lviv...@redhat.com> wrote:
> On 24/05/2017 10:55, Juan Quintela wrote:
>> From: Juan Quintela <quint...@trasno.org>
>> 
>> There is no reason for having the loadvm_handlers at all.  There is
>> only one use, and we can use the savevm handlers.
>> 
>> We will remove the loadvm handlers on a following patch.
>> 
>> Signed-off-by: Juan Quintela <quint...@redhat.com>


>> +    QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
>> +        if (se->section_id == section_id) {
>>              break;
>>          }
>>      }
>> -    if (le == NULL) {
>> +    if (se == NULL) {
>>          error_report("Unknown savevm section %d", section_id);
>>          return -EINVAL;
>>      }
>>  
>> -    ret = vmstate_load(f, le->se, le->version_id);
>> +    ret = vmstate_load(f, se, se->version_id);
> Are you sure you can replace le->version_id by se->version?
>
> Because according to code in qemu_loadvm_section_start_full(),
> we can have le->version_id <= se->version_id.

You are right.  We don't use basically anymore version_id, but we used
to use it.

I will arrive to a different solution.  Thanks a lot.

Later, Juan.

Reply via email to