diff options
author | Max Reitz | 2014-04-10 19:36:25 +0200 |
---|---|---|
committer | Kevin Wolf | 2014-04-11 13:59:49 +0200 |
commit | 5450466394c95cea8b661fb197ed215a4ab5d700 (patch) | |
tree | b3eb49751b40bbbc06ae2a0c62aada168cdba23e | |
parent | iscsi: Remember to set ret for iscsi_open in error case (diff) | |
download | qemu-5450466394c95cea8b661fb197ed215a4ab5d700.tar.gz qemu-5450466394c95cea8b661fb197ed215a4ab5d700.tar.xz qemu-5450466394c95cea8b661fb197ed215a4ab5d700.zip |
block-commit: speed is an optional parameter
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.
Cc: qemu-stable@nongnu.org
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | blockdev.c | 4 |
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(); |