From nobody Mon Feb 9 10:12:15 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589368966; cv=none; d=zohomail.com; s=zohoarc; b=C8VNyeCQ+b3151vJ3+ZwdhgL32lRGCa3bFDbDVM5Z3CCVcx+dqo/lwbdzJ3M8gPgCXz9mc5fin94ajjxIPkfKOvg8K29wZTY36+pfpM8nHglugSgTQ1eztX2RmTG2K8B69t12lT+UDV0g34dcPDr5SPudmP32Kctpa8nRYPNFmQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589368966; 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=jiX1JoSl22iGBF2AQe+urEYSDM5hXwhOa/rnd7TcN/s=; b=oI6SvQ910r4wS4h7neZfiwBm5hCYLYnsRyW8rRkoUAC7wXC4MCDRa4wJBGi9hCKePmvCAzgTRcqisGa3htHIck6zgaoDIP7Bs86pRmrGfrUFK8yZjVdg719IOl4z0EZBWsGctAvZq+MgjtOuyPvT06ajt1FgRzPky4rxEDx32j0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail 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 1589368966971766.2938452346388; Wed, 13 May 2020 04:22:46 -0700 (PDT) Received: from localhost ([::1]:48704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYpTJ-0003kn-Oe for importer@patchew.org; Wed, 13 May 2020 07:22:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYpDt-0002S7-98 for qemu-devel@nongnu.org; Wed, 13 May 2020 07:06:49 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:39230) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jYpDq-0003VC-G7 for qemu-devel@nongnu.org; Wed, 13 May 2020 07:06:48 -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-7-z6uP1-F0OAahUwc5jlFhDA-1; Wed, 13 May 2020 07:06:44 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 19F5953; Wed, 13 May 2020 11:06:43 +0000 (UTC) Received: from localhost (unknown [10.40.193.218]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A64661000337; Wed, 13 May 2020 11:06:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589368005; 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=jiX1JoSl22iGBF2AQe+urEYSDM5hXwhOa/rnd7TcN/s=; b=UMvcJ7Fwh3XMfknaW/ZRQX14P/iCanHQFW5ky4+/4iby0iDnabgVgU0epjNlvqayz5hOsM Nkw7BwSkVbY9bnCmiO1jmMyc11/fSORAAbXSGCLHyBahrWoPmW3Je39ZkE2I8eHxHh67Ug qulk2cGlD6nCAWr93eYntmHjsuvYQ4Q= X-MC-Unique: z6uP1-F0OAahUwc5jlFhDA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v4 21/34] block: Switch child_format users to child_of_bds Date: Wed, 13 May 2020 13:05:31 +0200 Message-Id: <20200513110544.176672-22-mreitz@redhat.com> In-Reply-To: <20200513110544.176672-1-mreitz@redhat.com> References: <20200513110544.176672-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.81; envelope-from=mreitz@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 04:17:42 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: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 --- 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.26.2