diff options
author | Paolo Bonzini | 2018-11-14 10:48:00 +0100 |
---|---|---|
committer | Paolo Bonzini | 2018-11-27 15:06:14 +0100 |
commit | 5aaac46793828d01c893b9d99d905c657f59541e (patch) | |
tree | 6cffbf47336ee06c5a92c247ee6a779e28120f92 /migration | |
parent | lsi: Reselection needed to remove pending commands from queue (diff) | |
download | qemu-5aaac46793828d01c893b9d99d905c657f59541e.tar.gz qemu-5aaac46793828d01c893b9d99d905c657f59541e.tar.xz qemu-5aaac46793828d01c893b9d99d905c657f59541e.zip |
migration: savevm: consult migration blockers
There is really no difference between live migration and savevm, except
that savevm does not require bdrv_invalidate_cache to be implemented
by all disks. However, it is unlikely that savevm is used with anything
except qcow2 disks, so the penalty is small and worth the improvement
in catching bad usage of savevm.
Only one place was taking care of savevm when adding a migration blocker,
and it can be removed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/savevm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/migration/savevm.c b/migration/savevm.c index ef707b8c43..1c49776a91 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2455,6 +2455,10 @@ int save_snapshot(const char *name, Error **errp) struct tm tm; AioContext *aio_context; + if (migration_is_blocked(errp)) { + return false; + } + if (!replay_can_snapshot()) { error_setg(errp, "Record/replay does not allow making snapshot " "right now. Try once more later."); |