From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 8B9BD1FF0A7 for ; Wed, 19 Aug 2026 16:47:04 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 4AEDB21536; Wed, 19 Aug 2026 16:47:02 +0200 (CEST) From: Christian Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH v2 qemu-server 4/5] pbs-restore: set 'no-cache' on block devices backed by zfspool Date: Wed, 19 Aug 2026 16:46:41 +0200 Message-ID: <20260819144642.453513-5-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260819144642.453513-1-c.ebner@proxmox.com> References: <20260819144642.453513-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787150794499 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.790 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: FLCETVEX6VSK52BJZQSNK6KBGGNKJ6JF X-Message-ID-Hash: FLCETVEX6VSK52BJZQSNK6KBGGNKJ6JF X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Skip the host page cache for restores on zvols, as page writeback after filling the buffers can cause I/O delay on other ZFS-backed VMs on certain setups, as reported in enterprise support and reproduced internally. The restored data is not to be read back from cache during restore anyways. Keep for other storage types for now to reduce regression potential. Signed-off-by: Christian Ebner --- changes: - add version check for compatible pbs-restore by using pve-qemu package version - added comment to extend this to other storage types in the future - hinted further that page writeback only kicks in after buffers are filled src/PVE/QemuServer.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm index 2f43faa7..b0edbbe6 100644 --- a/src/PVE/QemuServer.pm +++ b/src/PVE/QemuServer.pm @@ -7090,6 +7090,20 @@ sub restore_proxmox_backup_archive { if (PVE::Storage::volume_has_feature($storecfg, 'sparseinit', $volid)) { push @$pbs_restore_cmd, '--skip-zero'; } + my ($target_storeid) = PVE::Storage::parse_volume_id($volid, 1); + my $target_scfg = PVE::Storage::storage_config($storecfg, $target_storeid); + + my $kvm_package_version = kvm_user_version(undef, 1); + + if ( + PVE::QemuServer::Helpers::min_package_version( + $kvm_package_version, 11, 0, 3, 0, 3, + ) + && $target_scfg->{type} eq 'zfspool' + ) { + #TODO: potentially extend to other storage types + push @$pbs_restore_cmd, '--no-cache'; + } my $dbg_cmdstring = PVE::Tools::cmd2string($pbs_restore_cmd); print "restore proxmox backup image: $dbg_cmdstring\n"; -- 2.47.3