all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH v4 qemu-server 2/3] pbs-restore: set 'no-cache' on block devices backed by zfspool
Date: Thu, 20 Aug 2026 15:10:48 +0200	[thread overview]
Message-ID: <20260820131049.374072-3-c.ebner@proxmox.com> (raw)
In-Reply-To: <20260820131049.374072-1-c.ebner@proxmox.com>

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.

Version bump in d/control assures feature compatibility for
pbs-restore.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 3:
- drop package version comparison checks
- bump d/control dependency for pve-qemu-kvm

 debian/control        | 2 +-
 src/PVE/QemuServer.pm | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 97049e1d..a9949d5a 100644
--- a/debian/control
+++ b/debian/control
@@ -61,7 +61,7 @@ Depends: conntrack,
          pve-edk2-firmware-ovmf (>= 4.2025.05-2) [amd64],
          pve-firewall (>= 6.0.3),
          pve-ha-manager (>= 5.0.3),
-         pve-qemu-kvm (>= 7.1~),
+         pve-qemu-kvm (>= 11.0.3-3),
          python3-virt-firmware,
          socat,
          swtpm,
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 2f43faa7..317aeaac 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -7090,6 +7090,13 @@ 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);
+
+            if ($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





  parent reply	other threads:[~2026-08-20 13:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 13:10 [PATCH v4 pve-qemu qemu-server 0/3] bypass host page cache for restore on zvol Christian Ebner
2026-08-20 13:10 ` [PATCH v4 pve-qemu 1/3] pbs-restore: add optional no-cache flag to bypass host page cache Christian Ebner
2026-08-20 13:10 ` Christian Ebner [this message]
2026-08-21  7:44   ` [PATCH v4 qemu-server 2/3] pbs-restore: set 'no-cache' on block devices backed by zfspool Lukas Sichert
2026-08-20 13:10 ` [PATCH v4 qemu-server 3/3] vma restore: skip page cache " 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=20260820131049.374072-3-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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal