From nobody Fri Dec 19 20:37:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1742232528; cv=none; d=zohomail.com; s=zohoarc; b=lZRkGHCSD1yTaqIZHvvikz2KEF/ubhJi3aSyd5iZN2LTwZSqUFZdziO2BI02C68qzFp1Q8f5wA6S0ttRs7E7+zETwV8J6X1jh4bxMB+vLYHWTYoL1GEpX0CD4K6vWbkF2V6vbO6Sc6kGBFx65aoE+wcvePfPWHXguj7Sb+45zDU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742232528; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=evTT+TFTFYvwTbEz+FG85YUqvhdTqpJL0TIlYCFL/DU=; b=XQznzEfEy5k9QCkU4E/9BWGKN9Fq/0DzTP9MLSf0ItSMfQm1bEdWrffaeESa7zwSMPpC47dFYzl4yVmlBlOL5jJhSDJrrkmHVgNnkjR3PHaodNt4RDX1agym1Y/yKVKVOMuONNxdYVRTVMxrPlG3ZJbOa4B1rsblC5d2CQ/0Vpw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1742232528399575.8044689154327; Mon, 17 Mar 2025 10:28:48 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id C16DA22C9; Mon, 17 Mar 2025 13:28:47 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 7332823A8; Mon, 17 Mar 2025 13:27:46 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 041B8223C; Mon, 17 Mar 2025 13:27:41 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 8038B1C79 for ; Mon, 17 Mar 2025 13:27:41 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-235-DkKN-Fl1OPW0sf6KXLI0ew-1; Mon, 17 Mar 2025 13:27:39 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 39EB91801A00 for ; Mon, 17 Mar 2025 17:27:38 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 61C9018001F6 for ; Mon, 17 Mar 2025 17:27:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1742232461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=99WuTB0fNPUyX7y/p8RxTNE5LMZKAtUDrEJBvgWlFQ0=; b=NyT2ubILEjIQosmeCYREefgcQuG5HK5/4BwW7tc26fAoxqjjeu/o7jZSlGTF8/ctXs8m9I i0T17cCArngyysfqTkjyxpfNwlbSyt7/UXIFxM0kedG5hhkmuI1ujNEBT2iYeiQ+1pHHoD r4B4BAymnciKtbGbRFgTDUEdvFghQR4= X-MC-Unique: DkKN-Fl1OPW0sf6KXLI0ew-1 X-Mimecast-MFC-AGG-ID: DkKN-Fl1OPW0sf6KXLI0ew_1742232458 To: devel@lists.libvirt.org Subject: [PATCH 2/5] qemu: Do not replace filter nodes with virDomainBlockCopy Date: Mon, 17 Mar 2025 18:27:29 +0100 Message-ID: <0c07341e46129136018081b2a56108d1e07a0fca.1742232359.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: B03HdVG7Pjuc4OJ37Yog1t_kiaLeVO6FisrS88i0QQ0_1742232458 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ZLUL7YDAXK6PEO5ZC7GP7IHJZK4FAATT X-Message-ID-Hash: ZLUL7YDAXK6PEO5ZC7GP7IHJZK4FAATT X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1742232529807019000 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The block copy operation is supposed to just move the disk to a new destination. While in certain scenarios it'd make sense to drop the copy-on-read layer, the definition would not correspond to it. This was caused by a fix to the behaviour of the block job after conversion to -blockdev as 'blockdev-mirror' requires the top node of the disk to be selected. This also causes that the 'copy-on-read' filter is ejected but libvirt doesn't unplug it. Instead we need to use the 'replaces' argument of 'blockdev-mirror' which allows to keep filters in place. This will preserve the configuration (which can be optimized later) and also fixes a spurious error logged when trying to unplug the first real file node after copy-on-read which still looks used to qemu. This is also needed for the upcoming feature which adds 'throttle' filter layers as we need to keep those in place too to facilitate the throttling. Resolves: https://issues.redhat.com/browse/RHEL-40077 Fixes: e3137539a9c4af25ab085506d5467ec0847b0ecc Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 84564b0658..cf7069a34a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14363,7 +14363,7 @@ qemuDomainBlockCopyCommon(virDomainObj *vm, ret =3D qemuMonitorBlockdevMirror(priv->mon, job->name, true, qemuDomainDiskGetTopNodename(disk), qemuBlockStorageSourceGetEffectiveNode= name(mirror), - NULL, + qemuBlockStorageSourceGetEffectiveNode= name(disk->src), bandwidth, granularity, buf_size, mirror_shallow, syncWrites); --=20 2.48.1