From nobody Tue Apr 15 04:32:16 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589548375; cv=none; d=zohomail.com; s=zohoarc; b=CYjL24fQwzO9+o4YC/+gYTm1o9W+6JmMsfkQbpEt7DW+5MWHr51SabAyWxpENMvh4q4l42yYps0EqmkJ/9hzdVtQU0E4LR8HgJiJz12kyahXHvCvLbHSyboZmxfTULp10PvCygaCDmHx6wj1HEwMOe4N6NyMwuZjFedYHD64IaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589548375; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5yWFrsZNvGraareqe/NUSTnwE5L7vXAW/Cf9K9Gh+KI=; b=C8V06qhmkuQg+pVgp1Rz0P6u3dJBy9NkhXPqJ3jLucCnLsuWnoI6TP+47Yixog3UpItxNo9BmFq7Ex/g/kDvkvLlMaeXG01x4QRb0eOq/29iUGQ+c+A+KqIqJXxYoijtSb1jpNawaNXm0HaC6H77PGA4HJh6g4DtkEzlzeSuaO8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589548375438784.845378618762; Fri, 15 May 2020 06:12:55 -0700 (PDT) Received: from localhost ([::1]:40250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZa90-00035g-KB for importer@patchew.org; Fri, 15 May 2020 09:12:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZZjL-0003Ed-Fe for qemu-devel@nongnu.org; Fri, 15 May 2020 08:46:23 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55016 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZZjK-0002PR-Eh for qemu-devel@nongnu.org; Fri, 15 May 2020 08:46:23 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-223-3Udn3e_9NNydU3lxYUyx0A-1; Fri, 15 May 2020 08:46:19 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 04F4F835B47; Fri, 15 May 2020 12:46:18 +0000 (UTC) Received: from linux.fritz.box.com (ovpn-113-110.ams2.redhat.com [10.36.113.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0CF792E024; Fri, 15 May 2020 12:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589546781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5yWFrsZNvGraareqe/NUSTnwE5L7vXAW/Cf9K9Gh+KI=; b=eChoRuj+QaMdf0ppIwAXJp9KC7oBSm7qY+8eIt/r0ZXBp+L0ytBDoU7t+uIrY3TteW4TED 9wYYlz3FHsfVTreOoscXL7MitFxY9UbGXB0Z+ApXK6IIZGLuC5hGD6vR1RyctT2fzCly+B 1P0v8lxGRVJfp7divGW5V+WI73+BSm4= X-MC-Unique: 3Udn3e_9NNydU3lxYUyx0A-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 33/51] block: Switch child_format users to child_of_bds Date: Fri, 15 May 2020 14:45:03 +0200 Message-Id: <20200515124521.335403-34-kwolf@redhat.com> In-Reply-To: <20200515124521.335403-1-kwolf@redhat.com> References: <20200515124521.335403-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=kwolf@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/14 22:56:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Max Reitz Both users (quorum and blkverify) use child_format for not-really-filtered children, so the appropriate BdrvChildRole in both cases is DATA. (Note that this will cause bdrv_inherited_options() to force-allow format probing.) Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-Id: <20200513110544.176672-22-mreitz@redhat.com> Signed-off-by: Kevin Wolf --- block/blkverify.c | 4 ++-- block/quorum.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index ba4f6d7b7c..1684b7aa2e 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -134,8 +134,8 @@ static int blkverify_open(BlockDriverState *bs, QDict *= options, int flags, =20 /* Open the test file */ s->test_file =3D bdrv_open_child(qemu_opt_get(opts, "x-image"), option= s, - "test", bs, &child_format, 0, false, - &local_err); + "test", bs, &child_of_bds, BDRV_CHILD_D= ATA, + false, &local_err); if (local_err) { ret =3D -EINVAL; error_propagate(errp, local_err); diff --git a/block/quorum.c b/block/quorum.c index d37b77a522..616ac3a927 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -977,7 +977,8 @@ static int quorum_open(BlockDriverState *bs, QDict *opt= ions, int flags, assert(ret < 32); =20 s->children[i] =3D bdrv_open_child(NULL, options, indexstr, bs, - &child_format, 0, false, &local_e= rr); + &child_of_bds, BDRV_CHILD_DATA, f= alse, + &local_err); if (local_err) { ret =3D -EINVAL; goto close_exit; @@ -1053,7 +1054,8 @@ static void quorum_add_child(BlockDriverState *bs, Bl= ockDriverState *child_bs, /* We can safely add the child now */ bdrv_ref(child_bs); =20 - child =3D bdrv_attach_child(bs, child_bs, indexstr, &child_format, 0, = errp); + child =3D bdrv_attach_child(bs, child_bs, indexstr, &child_of_bds, + BDRV_CHILD_DATA, errp); if (child =3D=3D NULL) { s->next_child_index--; goto out; --=20 2.25.4