From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4Z4A-0003B2-KS for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:20:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4Z3t-0007PY-CS for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:20:30 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:47009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4Z3t-0007Os-1B for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:20:13 -0400 Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 Jul 2014 11:20:12 -0600 From: Michael Roth Date: Tue, 8 Jul 2014 12:16:49 -0500 Message-Id: <1404839947-1086-19-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1404839947-1086-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1404839947-1086-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 018/156] block-commit: speed is an optional parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org From: Max Reitz 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 Reviewed-by: Eric Blake Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf (cherry picked from commit 5450466394c95cea8b661fb197ed215a4ab5d700) Signed-off-by: Michael Roth --- blockdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blockdev.c b/blockdev.c index 44755e1..29b44a5 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(); -- 1.9.1