From 6b573efec853b84e99cae060dccc6d71e58af511 Mon Sep 17 00:00:00 2001 From: Emanuele Giuseppe Esposito Date: Thu, 3 Mar 2022 10:16:07 -0500 Subject: 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 Message-Id: <20220303151616.325444-23-eesposit@redhat.com> Signed-off-by: Kevin Wolf --- migration/savevm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'migration') 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; } -- cgit v1.2.3-55-g7522