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: Daniel Henrique Barboza
Subject: Re: [Qemu-devel] [PATCH 2/4] migration/savevm: use migration_is_blocked to validate
Date: Thu, 25 Apr 2019 17:55:15 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1



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.


DHB



Signed-off-by: Wei Yang <address@hidden>
---
  migration/savevm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/savevm.c b/migration/savevm.c
index 2eea604624..6c61056cde 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2406,7 +2406,7 @@ int qemu_loadvm_state(QEMUFile *f)
      unsigned int v;
      int ret;
- if (qemu_savevm_state_blocked(&local_err)) {
+    if (migration_is_blocked(&local_err)) {
          error_report_err(local_err);
          return -EINVAL;
      }




reply via email to

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