From: Christian Ebner <c.ebner@proxmox.com>
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 [thread overview]
Message-ID: <20260818075050.86065-4-c.ebner@proxmox.com> (raw)
In-Reply-To: <20260818075050.86065-1-c.ebner@proxmox.com>
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 <c.ebner@proxmox.com>
---
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
next prev parent reply other threads:[~2026-08-18 7:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 7:50 [PATCH pve-qemu qemu-server 0/3] bypass host page cache for restore on zvol Christian Ebner
2026-08-18 7:50 ` [PATCH pve-qemu 1/3] add optional no-cache flag to bypass host page cache on pbs-restore Christian Ebner
2026-08-18 7:50 ` [PATCH qemu-server 2/3] pbs-restore: set 'no-cache' on block devices backed by zfspool Christian Ebner
2026-08-18 7:50 ` Christian Ebner [this message]
2026-08-19 10:02 ` [PATCH pve-qemu qemu-server 0/3] bypass host page cache for restore on zvol Fiona Ebner
2026-08-19 10:43 ` Christian Ebner
2026-08-19 14:47 ` Christian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260818075050.86065-4-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.