Avihai Horon <[email protected]> wrote:
> On 10/05/2023 11:54, Juan Quintela wrote:
>> External email: Use caution opening links or attachments
>>
>>> +static bool initial_data_loaded_acked(MigrationState *s)
>>> +{
>>> + if (!migrate_precopy_initial_data()) {
>>> + return true;
>>> + }
>>> +
>>> + /* No reason to wait for precopy initial data loaded ACK if VM is
>>> stopped */
>>> + if (!runstate_is_running()) {
>>> + return true;
>>> + }
>> Thinking loud here.
>>
>> What happens if we start a migration. Guest is running.
>> We enable precopy_initial_data().
>>
>> And then we stop the guest.
>>
>> Are we going to receive data that expect this return false? Or it is
>> handled somewhere else?
>
> Not sure I fully understand what you mean here, could you elaborate?
>
static bool initial_data_loaded_acked(MigrationState *s)
{
if (!migrate_precopy_initial_data()) {
return true;
}
/* No reason to wait for precopy initial data loaded ACK if VM is stopped */
if (!runstate_is_running()) {
return true;
}
return s->initial_data_loaded_acked;
****** here we are only returning a value. I mis-read we were
calling a function. Sorry for the noise.
Later, Juan.