@@ -899,6 +899,10 @@ static void virtio_blk_reset(VirtIODevice *vdev)
AioContext *ctx;
VirtIOBlockReq *req;
+ if (blk_iohang_is_enabled(s->blk)) {
+ blk_rehandle_pause(s->blk);
+ }
+
ctx = blk_get_aio_context(s->blk);
aio_context_acquire(ctx);
blk_drain(s->blk);
@@ -916,6 +920,10 @@ static void virtio_blk_reset(VirtIODevice *vdev)
assert(!s->dataplane_started);
blk_set_enable_write_cache(s->blk, s->original_wce);
+
+ if (blk_iohang_is_enabled(s->blk)) {
+ blk_rehandle_unpause(s->blk);
+ }
}
/* coalesce internal state, copy to pci i/o region 0