From nobody Mon Sep 8 21:39:50 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=1749129795; cv=none; d=zohomail.com; s=zohoarc; b=iGQ7MDLJFF4gSVrHIOR1vzVvC39mW/vOdMUdd4Xp+3JBMbbKz9LQR0hA1kUrgh5iJb4Dh86ux2C0ShTm5aRXCNDkPKHFf/bxY48BFHfshP6t89j1+j+GH5sR7Rr1MP4wagCh6x7orYKHbb8UoTn7mngJpf05W162dVG//G9OwkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749129795; 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=EbhDJubNja6A4bH3295p9w+oA30buZu8Vgi8b7ajKLU=; b=jCWcy5Sf38KcFQbQQj+EAg0T3+W+xd6VXF9u5D1QA26m56uMUimJylgScAo/+Qy/ns4nBwDM1qMcJbY7IYS6i7ucv//8PwSQmu488KnZcTpJ8BBvXDSs1RXVNvB90bIvE1gRduXc9Ob0ZjG1VTbxu3rIllMxh/eCFTyaibrGz3A= 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 1749129795652942.5773117579029; Thu, 5 Jun 2025 06:23:15 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B99181200; Thu, 5 Jun 2025 09:23:14 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 2D21A10F2; Thu, 5 Jun 2025 09:22:56 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D2941C32; Thu, 5 Jun 2025 09:22:52 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 98D7A10A2 for ; Thu, 5 Jun 2025 09:22:51 -0400 (EDT) Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-b-oZWKFuOfu-HGzY9ECutg-1; Thu, 05 Jun 2025 09:22:14 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5629219560B3 for ; Thu, 5 Jun 2025 13:22:09 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.44.22.3]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8628E180049D for ; Thu, 5 Jun 2025 13:22:08 +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=2.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_SBL_CSS,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749129767; 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=ATcFuGORN7vzgepQYS9SRmTSfQKnLJLBHqBw3EuXn00=; b=fx6tZ9haYKj4a09UfDLQMT6nKYfJVE4wmAK/YTwKeB+iiUhN6l5u5+JhNOsE2IC93/zj3t PnieZ2isdRPqFXFIAMKWt/joCRKBXSVv4xZF12iybE5g9dTkAhlUUqDMUXsl11GUZmsHHv ZjwzXnqItuoDnqSXmHM80Ro1k7ZEsBY= X-MC-Unique: b-oZWKFuOfu-HGzY9ECutg-1 X-Mimecast-MFC-AGG-ID: b-oZWKFuOfu-HGzY9ECutg_1749129729 To: devel@lists.libvirt.org Subject: [PATCH 1/2] Revert "docs: Add warning about using a cleared image with VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES_ZEROES" Date: Thu, 5 Jun 2025 15:22:04 +0200 Message-ID: <3b76a1f40393381ba3bc64cbbc025bc0441a4ffe.1749129674.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: T5lE2uqD02lxh3HsOBoAdQYFvDUeGAdRNMb261qdr0Q_1749129729 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ESMBRTQQ7ULYLZ47E6HEMMH3DQFHOWZM X-Message-ID-Hash: ESMBRTQQ7ULYLZ47E6HEMMH3DQFHOWZM 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: 1749129797062116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa QEMU clears the images even when sparse mode is required so asking the users to do so is not needed. Remove the docs. This reverts commit 332ee4931a84ec23e7f6fcb963083318c1307dc7 Signed-off-by: Peter Krempa Acked-by: Eric Blake --- docs/manpages/virsh.rst | 4 +--- include/libvirt/libvirt-domain.h | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 895a905b08..9b571761b8 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -3642,9 +3642,7 @@ transfer via the comma separated ``disk-list`` argume= nt. The *--migrate-disks-detect-zeroes* option which takes a comma separated l= ist of disk target names enables zeroed block detection for the listed migrated d= isks. These blocks are not transferred or allocated on destination, effectively -sparsifying the disk at the cost of CPU overhead. Users must ensure that a= ny -pre-created storage source is cleared and thus reads all-zeroes before usi= ng -this option as otherwise the destination image may become corrupted. +sparsifying the disk at the cost of CPU overhead. With *--copy-storage-synchronous-writes* flag used the disk data migration= will synchronously handle guest disk writes to both the original source and the destination to ensure that the disk migration converges at the price of po= ssibly diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index ac5daf7d0c..1af5045571 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1276,10 +1276,7 @@ typedef enum { * * virDomainMigrate* params multiple field: The multiple values that list * the block devices for which zero detection (to avoid transferring zero = blocks) - * is to be enabled. Users must ensure that any pre-created storage source= on - * the destination will be cleared and thus read all-zeroes before using t= his - * feature, otherwise the destination image may become corrupted. - * This may increase CPU overhead of the migration. At the + * is to be enabled. This may increase CPU overhead of the migration. At t= he * moment this is only supported by the QEMU driver but not for the tunnel= led * migration. * --=20 2.49.0 From nobody Mon Sep 8 21:39:50 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=1749129770; cv=none; d=zohomail.com; s=zohoarc; b=DX396HORRZNt9zjtimvP/g2pp0uWVLYlPGBJlUaY5cblKFxICiHjdu0MsieqQiEo+97cqB0cl11DAjDUVcQ3MzK8mQ15MW/3IOuFRr/jwou/85A7tXTICfzmB3SBDWSbWnmEMnhGfX/iFx69YigpSj2kAJo69Pm3Vk0iYoNzRqQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749129770; 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=cHrsLOjPzhabUx/SPeNYQP8aHigyIc8XGH4Esxwyq+Q=; b=QoDK8ZclISn923ajZkz/nYkyeWfvJ4gGMoHSSWVqgv0I/keV1BSOjt9ruYrpacynhzulihrXILpcRYMwwZQaJmgCmhA1h60vvQAMORW8nmCtbMYTAx+A+UUSQpHc0AtpqVnl6VBQW/2mFvjSiEvZAfn99TU0UAc3YrHrDNwh4dY= 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 174912977089167.08124982017284; Thu, 5 Jun 2025 06:22:50 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id DDA3AEA1; Thu, 5 Jun 2025 09:22:49 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 5A1F81186; Thu, 5 Jun 2025 09:22:17 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 291E6CAB; Thu, 5 Jun 2025 09:22:13 -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 A3262C97 for ; Thu, 5 Jun 2025 09:22:12 -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-271-CJJehEWtOwCzHmQ0L4rs9g-1; Thu, 05 Jun 2025 09:22:11 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 93CA11800DA5 for ; Thu, 5 Jun 2025 13:22:10 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.44.22.3]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CE582180045C for ; Thu, 5 Jun 2025 13:22:09 +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=1749129732; 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=M9+//eS8q/+WdudPk1DddAMdhNeKdeiL8Klp94W50pk=; b=RTeXZDqN+3a7oI71dv56BNapDZHRpq7Fb2+jMxYlDx1Q/cm8ALeZBnKY87UHi+HRNiw7/s 3/cPBfT3XmtAh2vicTv0SOTTNZ9kxdiUW2sTXwtV6uZORLBrwFjfCs4y+62ysPJNKGeDFH 4fe9h6pw+yFrqwczwRHXinb/YvYgQL8= X-MC-Unique: CJJehEWtOwCzHmQ0L4rs9g-1 X-Mimecast-MFC-AGG-ID: CJJehEWtOwCzHmQ0L4rs9g_1749129730 To: devel@lists.libvirt.org Subject: [PATCH 2/2] docs: Note that zero detection on migration sparsifies image only when discard='unmap' is set Date: Thu, 5 Jun 2025 15:22:05 +0200 Message-ID: <22477d563c395d4352c1eb81a37418e0db945e49.1749129674.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: KGfEtRrynsxM2NvnUTBfx_ha212e6Uqsai36__WhEGw_1749129730 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 5T2ZTHRAQM67ELD2AJXWVSCXDLA5FUET X-Message-ID-Hash: 5T2ZTHRAQM67ELD2AJXWVSCXDLA5FUET 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: 1749129772915116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The mirroring job clears the destination to ensure that the guest visible disk contents are identical to the state on the source. The image itself is kept sparse only when the disk 'discard' option is set to 'unmap' (Also the disks would eventually desparsify itself anyways with disabled discards). Note it in the docs for the user. Signed-off-by: Peter Krempa Acked-by: Eric Blake --- docs/manpages/virsh.rst | 5 +++-- include/libvirt/libvirt-domain.h | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 9b571761b8..a2dab293ad 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -3641,8 +3641,9 @@ host. By default only non-shared non-readonly images = are transferred. Use transfer via the comma separated ``disk-list`` argument. The *--migrate-disks-detect-zeroes* option which takes a comma separated l= ist of disk target names enables zeroed block detection for the listed migrated d= isks. -These blocks are not transferred or allocated on destination, effectively -sparsifying the disk at the cost of CPU overhead. +These blocks are not transferred or allocated (requires that 'discard' opt= ion +on given disk is set to 'unmap') on destination, effectively sparsifying t= he +disk at the cost of CPU overhead. With *--copy-storage-synchronous-writes* flag used the disk data migration= will synchronously handle guest disk writes to both the original source and the destination to ensure that the disk migration converges at the price of po= ssibly diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 1af5045571..3d05ffc5aa 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1275,10 +1275,11 @@ typedef enum { * VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES: * * virDomainMigrate* params multiple field: The multiple values that list - * the block devices for which zero detection (to avoid transferring zero = blocks) - * is to be enabled. This may increase CPU overhead of the migration. At t= he - * moment this is only supported by the QEMU driver but not for the tunnel= led - * migration. + * the block devices for which zero detection (to avoid transferring zero = blocks, + * for storage where it can't be probed) is to be enabled. This may increa= se CPU + * overhead of the migration. Destination image will be sparse only when t= he + * disk 'discard' option is set to 'unmap'. At the moment this is only sup= ported + * by the QEMU driver but not for the tunnelled migration. * * Since: 10.9.0 */ --=20 2.49.0