From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYGAX-0005W8-Vy for qemu-devel@nongnu.org; Thu, 10 Apr 2014 10:41:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYGAS-0004Qg-8q for qemu-devel@nongnu.org; Thu, 10 Apr 2014 10:41:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYGAR-0004QZ-Vw for qemu-devel@nongnu.org; Thu, 10 Apr 2014 10:41:28 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s3AEfQdv022610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 10 Apr 2014 10:41:27 -0400 Message-ID: <5346AD92.5020009@redhat.com> Date: Thu, 10 Apr 2014 16:41:22 +0200 From: Max Reitz MIME-Version: 1.0 References: <1396961442-24046-1-git-send-email-mreitz@redhat.com> <1396961442-24046-3-git-send-email-mreitz@redhat.com> <20140408150745.GC6262@noname.str.redhat.com> In-Reply-To: <20140408150745.GC6262@noname.str.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/6] block-commit: speed is an optional parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, Stefan Hajnoczi On 08.04.2014 17:07, Kevin Wolf wrote: > Am 08.04.2014 um 14:50 hat Max Reitz geschrieben: >> 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 > Should this be Cc: qemu-stable@nongnu.org? Probably, yes. I'll swap this and the first patch for this, so there are no contextual conflicts; or even better, I'll exclude this patch from this series. Max > Kevin > >> blockdev.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/blockdev.c b/blockdev.c >> index b988cc5..9d7bd04 100644 >> --- a/blockdev.c >> +++ b/blockdev.c >> @@ -1876,6 +1876,9 @@ void qmp_block_commit(const char *device, >> */ >> BlockdevOnError on_error = BLOCKDEV_ON_ERROR_REPORT; >> >> + if (!has_speed) { >> + speed = 0; >> + } >> if (!has_granularity) { >> granularity = 0; >> } >> -- >> 1.9.1 >>