qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/4] migration/savevm: use migration_is_blocked


From: Wei Yang
Subject: Re: [Qemu-devel] [PATCH 2/4] migration/savevm: use migration_is_blocked to validate
Date: Fri, 26 Apr 2019 08:51:33 +0800
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Apr 25, 2019 at 05:55:15PM -0300, Daniel Henrique Barboza wrote:
>
>
>On 4/23/19 9:46 PM, Wei Yang wrote:
>> migration_is_blocked() is used in migrate_prepare() and
>> save_snapshot(), this is more proper to use this instead of
>> qemu_savevm_state_blocked() in qemu_loadvm_state().
>
>
>migration_is_blocked() does an additional verification:
>
>"if (migration_blockers)"
>
>comparing to what was previously done in qemu_loadvm_state.
>
>I've checked what migration_blockers does and it is a GList used
>for callers to block the migration process. This is used via
>'migration_add_blocker', from migration.c.
>
>'migration_add_blocker' is called all over the place, most notably
>in  _realize() functions  and _open() functions from block.
>
>Thus, I am not sure if this change will impact the use of
>qemu_loadvm_state() from load_snapshot() (i.e. can load_snapshot
>be called with migration_blockers?). It's better to someone
>with a better understanding of this code to comment on that.
>

Well, when you look into the source side of migration:

qmp_migrate
  migrate_prepare
    migration_is_blocked

This means if migration_is_blocked fails, the source will not start migration.
And it is the same as save_snapshot.

>From my understanding, when we load a vm, it should check the same
requirement.

-- 
Wei Yang
Help you, Help me



reply via email to

[Prev in Thread] Current Thread [Next in Thread]