From nobody Mon Feb 9 00:43:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152089273919437.65379544360269; Mon, 12 Mar 2018 15:12:19 -0700 (PDT) Received: from localhost ([::1]:35859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evVfy-0000cG-7M for importer@patchew.org; Mon, 12 Mar 2018 18:12:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evVcB-0006BJ-1e for qemu-devel@nongnu.org; Mon, 12 Mar 2018 18:08:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evVc9-00013X-Ny for qemu-devel@nongnu.org; Mon, 12 Mar 2018 18:08:19 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57088) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1evVc9-00012s-FS for qemu-devel@nongnu.org; Mon, 12 Mar 2018 18:08:17 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2CM4k2C117932 for ; Mon, 12 Mar 2018 18:08:16 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gnxck082h-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 12 Mar 2018 18:08:16 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Mar 2018 18:08:15 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 12 Mar 2018 18:08:12 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2CM8BwK50462934; Mon, 12 Mar 2018 22:08:11 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 42502112034; Mon, 12 Mar 2018 18:06:46 -0400 (EDT) Received: from farosas.localdomain.com (unknown [9.85.163.92]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP id DAC2E112040; Mon, 12 Mar 2018 18:06:44 -0400 (EDT) From: Fabiano Rosas To: qemu-devel@nongnu.org Date: Mon, 12 Mar 2018 19:07:51 -0300 X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180312220753.20096-1-farosas@linux.vnet.ibm.com> References: <20180312220753.20096-1-farosas@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18031222-0052-0000-0000-000002C790A2 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008662; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01002144; UDB=6.00509896; IPR=6.00781474; MB=3.00019996; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-12 22:08:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031222-0053-0000-0000-00005BF980FF Message-Id: <20180312220753.20096-4-farosas@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-12_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803120240 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH v2 3/5] block/throttle: Remove protocol-related fields 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: kwolf@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The throttle driver is not a protocol so it should implement bdrv_open instead of bdrv_file_open and not provide a protocol_name. Attempts to invoke this driver using protocol syntax (i.e. throttle:) will now fail gracefully: $ qemu-img info throttle:foo qemu-img: Could not open 'throttle:foo': Unknown protocol 'throttle' Signed-off-by: Fabiano Rosas Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia --- block/throttle.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/throttle.c b/block/throttle.c index 5f4d43d0fc..95ed06acd8 100644 --- a/block/throttle.c +++ b/block/throttle.c @@ -215,10 +215,9 @@ static void coroutine_fn throttle_co_drain_end(BlockDr= iverState *bs) =20 static BlockDriver bdrv_throttle =3D { .format_name =3D "throttle", - .protocol_name =3D "throttle", .instance_size =3D sizeof(ThrottleGroupMember), =20 - .bdrv_file_open =3D throttle_open, + .bdrv_open =3D throttle_open, .bdrv_close =3D throttle_close, .bdrv_co_flush =3D throttle_co_flush, =20 --=20 2.13.6