From nobody Mon Nov 17 03:48:21 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602525252; cv=none; d=zohomail.com; s=zohoarc; b=ToqomZawJ60lXCJXIh+Vf7NWamYjEIQ93EOzKkrOWTAdbIuebqDLJN185RKBuMpyr5IVdzP8rlHfK3cZ3O7qXvxjLsKU2QF5fweaCHJpC8+C1k60VpX9sp62+70l85ILmxo988n01hWvHqPAkQc5bWiE1bVIYfVuSCHO2kMJ+zY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602525252; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=In+4Q+1B0gu3WzohGX7v1F3FpmGrBq9r6Io+Oa1hbZM=; b=U3h+4DyE0ArZOI1VUeEBxfs2DIvgtq19IGJ8KuLghrHF5QPLT14yEJugGnHL8TRF7EOupANX9F4nm1etSmVabwf51k4qOl7Q16UC6tZW80TTPImISPHlLO7mmo2S1lfqG8IFiN5Rvymi0wGmiXb/9jFRhOVUoAp1oZgj3P4hV7s= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 1602525252207980.4585801552796; Mon, 12 Oct 2020 10:54:12 -0700 (PDT) Received: from localhost ([::1]:50414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS21T-00012K-6b for importer@patchew.org; Mon, 12 Oct 2020 13:54:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS1zd-0007XZ-Hr; Mon, 12 Oct 2020 13:52:17 -0400 Received: from relay.sw.ru ([185.231.240.75]:34648 helo=relay3.sw.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS1zc-00089L-1u; Mon, 12 Oct 2020 13:52:17 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay3.sw.ru with esmtp (Exim 4.94) (envelope-from ) id 1kS1yg-0047iC-6U; Mon, 12 Oct 2020 20:51:18 +0300 To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, kwolf@redhat.com, mreitz@redhat.com, fam@euphon.net, stefanha@redhat.com, armbru@redhat.com, jsnow@redhat.com, libvir-list@redhat.com, eblake@redhat.com, den@openvz.org, vsementsov@virtuozzo.com, andrey.shinkevich@virtuozzo.com Subject: [PATCH v11 10/13] stream: skip filters when writing backing file name to QCOW2 header Date: Mon, 12 Oct 2020 20:43:22 +0300 Message-Id: <1602524605-481160-11-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602524605-481160-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1602524605-481160-1-git-send-email-andrey.shinkevich@virtuozzo.com> 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=185.231.240.75; envelope-from=andrey.shinkevich@virtuozzo.com; helo=relay3.sw.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/12 13:44:17 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: Andrey Shinkevich From: Andrey Shinkevich via Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Avoid writing a filter JSON-name to QCOW2 image when the backing file is changed after the block stream job. Signed-off-by: Andrey Shinkevich --- block/stream.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block/stream.c b/block/stream.c index e0540ee..51462bd 100644 --- a/block/stream.c +++ b/block/stream.c @@ -65,6 +65,7 @@ static int stream_prepare(Job *job) BlockDriverState *bs =3D blk_bs(bjob->blk); BlockDriverState *unfiltered_bs =3D bdrv_skip_filters(bs); BlockDriverState *base =3D bdrv_filter_or_cow_bs(s->above_base); + BlockDriverState *base_unfiltered =3D bdrv_skip_filters(base); Error *local_err =3D NULL; int ret =3D 0; =20 @@ -73,10 +74,10 @@ static int stream_prepare(Job *job) =20 if (bdrv_cow_child(unfiltered_bs)) { const char *base_id =3D NULL, *base_fmt =3D NULL; - if (base) { - base_id =3D s->backing_file_str; - if (base->drv) { - base_fmt =3D base->drv->format_name; + if (base_unfiltered) { + base_id =3D base_unfiltered->filename; + if (base_unfiltered->drv) { + base_fmt =3D base_unfiltered->drv->format_name; } } bdrv_set_backing_hd(unfiltered_bs, base, &local_err); --=20 1.8.3.1