From patchwork Tue Aug 29 14:23:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pradeep Jagadeesh X-Patchwork-Id: 807109 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mbpiChkc"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xhWGQ4Z62z9t16 for ; Wed, 30 Aug 2017 00:28:46 +1000 (AEST) Received: from localhost ([::1]:45237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmhVU-0005VM-J3 for incoming@patchwork.ozlabs.org; Tue, 29 Aug 2017 10:28:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmhQx-0001g4-Jn for qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:24:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmhQv-0004DU-0Q for qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:24:03 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:33294) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmhQu-0004DF-QL for qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:24:00 -0400 Received: by mail-wr0-x242.google.com with SMTP id k94so2410468wrc.0 for ; Tue, 29 Aug 2017 07:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XJDYqcNKTPJ4bVXu+u8oqSrNjS8+eCzwl09w8KTx0rQ=; b=mbpiChkc4o/ku3qCpOVWcvFDoR9atIFHPvUvvraSB+pVdpOUpjTKW175l4ry2XynkI Ha3+EZkCXD6vxk4VF3MVXbkT17ongxOMjoxmYKGthP9tcZOSZfsfssjY3H3qHxyzUuTP zg29B+FcenXCO/AbMe2oZucykL7+FpveL5oGy2WH6VAVyAYAcr+sybbIfpWGqUuMMH5S OTphXut83gLQ2EmwaUCB7bkgtCBoiggwiPubA+a+B7h9xhPTKwLGZO/t4/WrS1RCxgLp efzpOMl7IeYaY2HPWJg4/9oA7WV8FRQ7hI04mjCGcxYVFcqidgL/I5qo5z9WWFsIWO9v XVbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XJDYqcNKTPJ4bVXu+u8oqSrNjS8+eCzwl09w8KTx0rQ=; b=VXYFiEgV8VN6RsXaQwQm5ghd4fMusGfH1L6Yo3Nd/JBhCCWWdEhIMjqPcbeZfVrRec I/exV26/xDP9atXARs5sG80GpnAEnGZglXeCR6dwDTRs4bhPFMRFYF/y8H4Htf0CNfGg grZPMxjfAnvPXpHmUi7Pz8z3+lUqKMZ9sFUNDNwPEGSX2i9/3Ra/fn8VuYTUuJzdxiUI PdiekS9IWvaZaHE4H/kmPVsczWn4TWL6vYE1BkuVfLvwKkF2VPn90lvU4btAFFzKwyZh A9+CqlRyIFPCsCSPb9Gu7FlczJDkPhnP6HDY5TQTFiG31WcWcIiMUUOptmhcghj/9LSV DV7A== X-Gm-Message-State: AHYfb5gZ68OrMRdcvkvNbkJ3RKj2A+xzJ3p7lBIuChddXkfitKUM+6So 2Ma/KNW+cSUQDQ== X-Received: by 10.223.173.46 with SMTP id p43mr396523wrc.23.1504016639751; Tue, 29 Aug 2017 07:23:59 -0700 (PDT) Received: from localhost.localdomain.localdomain ([217.110.131.66]) by smtp.gmail.com with ESMTPSA id 15sm2540487wmv.45.2017.08.29.07.23.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Aug 2017 07:23:59 -0700 (PDT) From: Pradeep Jagadeesh X-Google-Original-From: Pradeep Jagadeesh To: "eric blake" , "greg kurz" Date: Tue, 29 Aug 2017 10:23:03 -0400 Message-Id: <1504016587-39779-3-git-send-email-pradeep.jagadeesh@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1504016587-39779-1-git-send-email-pradeep.jagadeesh@huawei.com> References: <1504016587-39779-1-git-send-email-pradeep.jagadeesh@huawei.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PATCH v8 2/6] qmp: Create IOThrottle structure X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani kokkonen , alberto garcia , Pradeep Jagadeesh , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This patch enables qmp interfaces for the fsdev devices. This provides two interfaces one for querying info of all the fsdev devices. The second one to set the IO limits for the required fsdev device. Signed-off-by: Pradeep Jagadeesh Reviewed-by: Greg Kurz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- qapi/block-core.json | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 833c602..95bbc5e 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1819,11 +1819,13 @@ 'data': 'BlockIOThrottle' } ## -# @BlockIOThrottle: -# -# A set of parameters describing block throttling. +# == QAPI IOThrottle definitions +## + +## +# @IOThrottle: # -# @device: Block device name (deprecated, use @id instead) +# A set of parameters describing IO throttling # # @id: The name or QOM path of the guest device (since: 2.8) # @@ -1889,12 +1891,11 @@ # # @iops_size: an I/O size in bytes (Since 1.7) # -# @group: throttle group name (Since 2.4) # -# Since: 1.1 +# Since: 2.11 ## -{ 'struct': 'BlockIOThrottle', - 'data': { '*device': 'str', '*id': 'str', 'bps': 'int', 'bps_rd': 'int', +{ 'struct': 'IOThrottle', + 'data': { '*id': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int', '*bps_max': 'int', '*bps_rd_max': 'int', '*bps_wr_max': 'int', '*iops_max': 'int', @@ -1902,7 +1903,22 @@ '*bps_max_length': 'int', '*bps_rd_max_length': 'int', '*bps_wr_max_length': 'int', '*iops_max_length': 'int', '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int', - '*iops_size': 'int', '*group': 'str' } } + '*iops_size': 'int' } } + +## +# @BlockIOThrottle: +# +# A set of parameters describing block throttling. +# +# @device: Block device name (deprecated, use @id instead) +# +# @group: throttle group name (Since 2.4) +# +# Since: 1.1 +## +{ 'struct': 'BlockIOThrottle', + 'base': 'IOThrottle', + 'data': { '*device': 'str', '*group': 'str' } } ## # @block-stream: