@@ -942,9 +942,10 @@ static int do_vm_stop(RunState state)
qapi_event_send_stop(&error_abort);
}
- bdrv_drain_all();
- replay_disable_events();
- ret = bdrv_flush_all();
+ if (!replay_events_enabled()) {
+ bdrv_drain_all();
+ ret = bdrv_flush_all();
+ }
return ret;
}
@@ -2143,8 +2143,8 @@ int save_snapshot(const char *name, Error **errp)
AioContext *aio_context;
if (!replay_can_snapshot()) {
- monitor_printf(mon, "Record/replay does not allow making snapshot "
- "right now. Try once more later.\n");
+ error_report("Record/replay does not allow making snapshot "
+ "right now. Try once more later.\n");
return ret;
}