aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blockdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c
index c3422a1d41..5dd01ea147 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1876,6 +1876,10 @@ void qmp_block_commit(const char *device,
*/
BlockdevOnError on_error = BLOCKDEV_ON_ERROR_REPORT;
+ if (!has_speed) {
+ speed = 0;
+ }
+
/* drain all i/o before commits */
bdrv_drain_all();