diff --git a/block/io.c b/block/io.c index d87788dfbb..a09b1b34ab 100644 --- a/block/io.c +++ b/block/io.c @@ -506,6 +506,15 @@ void bdrv_drain_all_begin(void) return; } + /* + * bdrv queue is managed by record/replay, + * waiting for finishing the I/O requests may + * be infinite + */ + if (replay_events_enabled()) { + return; + } + bdrv_drain_all_begin_nopoll(); /* Now poll the in-flight requests */