From nobody Sat Oct 25 20:15:41 2025 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 1520620752250151.58223768669177; Fri, 9 Mar 2018 10:39:12 -0800 (PST) Received: from localhost ([::1]:47354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euMuw-0000bx-Pm for importer@patchew.org; Fri, 09 Mar 2018 13:38:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euMfH-0005Xj-HV for qemu-devel@nongnu.org; Fri, 09 Mar 2018 13:22:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euMfF-0001lK-4D for qemu-devel@nongnu.org; Fri, 09 Mar 2018 13:22:47 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33930) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euMfE-0001ku-Sy for qemu-devel@nongnu.org; Fri, 09 Mar 2018 13:22:45 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w29IKJVZ140273 for ; Fri, 9 Mar 2018 13:22:43 -0500 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gku3aksjs-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 09 Mar 2018 13:22:43 -0500 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Mar 2018 13:22:41 -0500 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 9 Mar 2018 13:22:38 -0500 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w29IMcih58327108; Fri, 9 Mar 2018 18:22:38 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 70317AC03A; Fri, 9 Mar 2018 13:23:52 -0500 (EST) Received: from farosas.localdomain.com (unknown [9.85.169.23]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id 32144AC041; Fri, 9 Mar 2018 13:23:51 -0500 (EST) From: Fabiano Rosas To: qemu-devel@nongnu.org Date: Fri, 9 Mar 2018 15:21:58 -0300 X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180309182202.31206-1-farosas@linux.vnet.ibm.com> References: <20180309182202.31206-1-farosas@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18030918-0048-0000-0000-000002479DED X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008642; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01000629; UDB=6.00508989; IPR=6.00779959; MB=3.00019943; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-09 18:22:40 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030918-0049-0000-0000-00004463016B Message-Id: <20180309182202.31206-3-farosas@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-09_09:, , 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=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803090223 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 2/5] block/quorum: 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, Alberto Garcia , 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 quorum 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. quorum:) will now fail gracefully: $ qemu-img info quorum:foo qemu-img: Could not open 'quorum:foo': Unknown protocol 'quorum' Signed-off-by: Fabiano Rosas Reviewed-by: Max Reitz --- block/quorum.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index 14333c18aa..cfe484a945 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -1098,11 +1098,10 @@ static void quorum_refresh_filename(BlockDriverStat= e *bs, QDict *options) =20 static BlockDriver bdrv_quorum =3D { .format_name =3D "quorum", - .protocol_name =3D "quorum", =20 .instance_size =3D sizeof(BDRVQuorumState), =20 - .bdrv_file_open =3D quorum_open, + .bdrv_open =3D quorum_open, .bdrv_close =3D quorum_close, .bdrv_refresh_filename =3D quorum_refresh_filename, =20 --=20 2.13.6