On 2020/2/4 17:14, Juan Quintela wrote:
> Keqian Zhu <zhukeqi...@huawei.com> wrote:
>> qemu_savevm_nr_failover_devices() is originally designed to
>> get the number of failover devices, but it actually returns
>> the number of "unplug-pending" failover devices now. Moreover,
>> what drives migration state to wait-unplug should be the number
>> of "unplug-pending" failover devices, not all failover devices.
>>
>> We can also notice that qemu_savevm_state_guest_unplug_pending()
>> and qemu_savevm_nr_failover_devices() is equivalent almost (from
>> the code view). So the latter is incorrect semantically and
>> useless, just delete it.
>>
>> In the qemu_savevm_state_guest_unplug_pending(), once hit a
>> unplug-pending failover device, then it can return true right
>> now to save cpu time.
>>
>> Signed-off-by: Keqian Zhu <zhukeqi...@huawei.com>
>
> Reviewed-by: Juan Quintela <quint...@redhat.com>
>
> For my reading you are right:
> - 1st function naming is not right
> - 2nd function achieves exactly the same effect
>
> I will wait until Jens says anything, but then I will queue it.
>
> Thanks, Juan.
>
>
> .
>
Thanks,
Keqian.