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 9BDB01FF0A8 for ; Tue, 18 Aug 2026 09:51:17 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1A59B2158C; Tue, 18 Aug 2026 09:51:09 +0200 (CEST) From: Christian Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server 3/3] vma restore: skip page cache on block devices backed by zfspool Date: Tue, 18 Aug 2026 09:50:50 +0200 Message-ID: <20260818075050.86065-4-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260818075050.86065-1-c.ebner@proxmox.com> References: <20260818075050.86065-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: 1787039443835 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.813 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: NS4NOL4TZQPJ24NWEJEC2H7LXL2RS6JJ X-Message-ID-Hash: NS4NOL4TZQPJ24NWEJEC2H7LXL2RS6JJ 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 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 to reduce regression potential. Signed-off-by: Christian Ebner --- src/PVE/QemuServer.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm index 70d7d880..8ff52def 100644 --- a/src/PVE/QemuServer.pm +++ b/src/PVE/QemuServer.pm @@ -7672,8 +7672,15 @@ sub restore_vma_archive { } my $path = PVE::Storage::path($cfg, $volid); + my $scfg = PVE::Storage::storage_config($cfg, $storeid); - print $fifofh "${map_opts}format=$d->{format}:${write_zeros}:$d->{devname}=$path\n"; + my $cache_none = ''; + if ($scfg->{type} eq 'zfspool') { + $cache_none = ':cache=none'; + print "skipping page cache for '$d->{devname}'\n"; + } + + print $fifofh "${map_opts}format=$d->{format}${cache_none}:${write_zeros}:$d->{devname}=$path\n"; print "map '$d->{devname}' to '$path' (write zeros = ${write_zeros})\n"; } -- 2.47.3