qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] block-commit: speed is an optional parameter


From: Max Reitz
Subject: [Qemu-devel] [PATCH] block-commit: speed is an optional parameter
Date: Thu, 10 Apr 2014 19:36:25 +0200

As speed is an optional parameter for the QMP block-commit command, it
should be set to 0 if not given (as it is undefined if has_speed is
false), that is, the speed should not be limited.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
This patch was previously part of the "qemu-img: Implement commit like
QMP" series, but as this is a general bugfix, it has been separated.
---
 blockdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/blockdev.c b/blockdev.c
index c3422a1..5dd01ea 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();
 
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]