Received: from eggs.gnu.org ([2001:4830:134:3::10]:58578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eADBI-0004Ln-6r for qemu-devel@nongnu.org; Thu, 02 Nov 2017 06:57:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eADBF-0002hr-50 for qemu-devel@nongnu.org; Thu, 02 Nov 2017 06:57:04 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:28702) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1eADBE-0002hA-R2 for qemu-devel@nongnu.org; Thu, 02 Nov 2017 06:57:01 -0400 References: <1506954812-6552-1-git-send-email-pradeep.jagadeesh@huawei.com> <1506954812-6552-4-git-send-email-pradeep.jagadeesh@huawei.com> From: Pradeep Jagadeesh Message-ID: Date: Thu, 2 Nov 2017 11:55:26 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v13 3/6] qmp: factor out throttle code to reuse code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , Pradeep Jagadeesh , eric blake , greg kurz Cc: Markus Armbruster , jani kokkonen , qemu-devel@nongnu.org On 10/13/2017 4:29 PM, Alberto Garcia wrote: > On Mon 02 Oct 2017 04:33:29 PM CEST, Pradeep Jagadeesh wrote: > >> - if (arg->has_iops_rd_max_length) { >> - cfg.buckets[THROTTLE_OPS_READ].burst_length = arg->iops_rd_max_length; >> - } >> - if (arg->has_iops_wr_max_length) { >> - cfg.buckets[THROTTLE_OPS_WRITE].burst_length = arg->iops_wr_max_length; >> - } >> - >> - if (arg->has_iops_size) { >> - cfg.op_size = arg->iops_size; >> - } > > The old code takes an empty ThrottleConfig, and initializes it using the > values from a BlockIOThrottle structure... > >> + tlimit = qapi_BlockIOThrottle_base(arg); >> + throttle_config_to_limits(&cfg, tlimit); > > ...but the new code does the exact opposite (?). Its a mistake of a call. It should be throttle_limits_to_config() I will change it. Regards, Pradeep > > Berto >