diff options
author | Max Reitz <mreitz@redhat.com> | 2014-04-10 19:36:25 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2014-06-25 15:39:13 -0500 |
commit | 3239a20294691eaaa81f41654e57fc9543234eee (patch) | |
tree | 9a3ffcc8da9fbfe2e7a06df8b9ff39f7c790a230 /blockdev.c | |
parent | a8b7e73901487ed4f3e2794815945437585881af (diff) |
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>
(cherry picked from commit 5450466394c95cea8b661fb197ed215a4ab5d700)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c index 44755e1a5d..29b44a576e 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1786,6 +1786,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(); |