summaryrefslogtreecommitdiffstats
path: root/migration
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito2022-03-03 16:16:07 +0100
committerKevin Wolf2022-03-04 18:18:25 +0100
commit6b573efec853b84e99cae060dccc6d71e58af511 (patch)
tree80e3d9dbe63dc0f38a8354c4723bcef4163a7e5a /migration
parentassertions for blockdev.h global state API (diff)
downloadqemu-6b573efec853b84e99cae060dccc6d71e58af511.tar.gz
qemu-6b573efec853b84e99cae060dccc6d71e58af511.tar.xz
qemu-6b573efec853b84e99cae060dccc6d71e58af511.zip
include/block/snapshot: global state API + assertions
Snapshots run also under the BQL, so they all are in the global state API. The aiocontext lock that they hold is currently an overkill and in future could be removed. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Message-Id: <20220303151616.325444-23-eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/savevm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index 6b79f9673a..02ed94c180 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2808,6 +2808,8 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate,
g_autoptr(GDateTime) now = g_date_time_new_now_local();
AioContext *aio_context;
+ GLOBAL_STATE_CODE();
+
if (migration_is_blocked(errp)) {
return false;
}