all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH storage 1/3] zfspool plugin: fix regression for rollback with refquota=none
Date: Mon,  6 Jul 2026 11:40:32 +0200	[thread overview]
Message-ID: <20260706094223.54701-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260706094223.54701-1-f.ebner@proxmox.com>

As reported in the community forum [0], rollback of a container with a
ZFS dataset with 'refquota=none' would fail. Since commit a9315a0
("fix #6561: zfspool: track refquota for subvolumes via user
properties"), when creating a snapshot, the current refquota is saved
as a user property on the snapshot. The value is queried with '-p' to
get the exact parsable value. In case of 'none', it will be returned
as 0. However, 'zfs set' does not accept an explicit 0 value, but
requires 'none', so restoring the refquota from the user property upon
rollback would fail. Special case the value 0 to fix the issue.

[0]: https://forum.proxmox.com/threads/184113/

Fixes: a9315a0 ("fix #6561: zfspool: track refquota for subvolumes via user properties")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/Storage/ZFSPoolPlugin.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index 8630744..0531a5d 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -562,6 +562,7 @@ sub volume_snapshot_rollback {
         my $refquota = $class->zfs_get_properties($scfg, 'pve-storage:refquota', $snapshot_name);
 
         if ($refquota =~ m/^\d+$/) {
+            $refquota = 'none' if $refquota == 0; # zfs does not accept 0 for refquota property
             $class->zfs_request(
                 $scfg, undef, 'set', "refquota=${refquota}", "$scfg->{pool}/$vname",
             );
-- 
2.47.3





  reply	other threads:[~2026-07-06  9:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06  9:40 [PATCH-SERIES storage 0/3] zfspool plugin: fix container rollback and linked clone with refquota=none Fiona Ebner
2026-07-06  9:40 ` Fiona Ebner [this message]
2026-07-06  9:40 ` [PATCH storage 2/3] zfspool plugin: clone image: use zfs_get_properties() helper Fiona Ebner
2026-07-06  9:40 ` [PATCH storage 3/3] zfspool plugin: clone: fix linked clone of container subvol with refquota=none Fiona Ebner
2026-07-06 10:22 ` [PATCH-SERIES storage 0/3] zfspool plugin: fix container rollback and linked clone " Filip Schauer

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=20260706094223.54701-2-f.ebner@proxmox.com \
    --to=f.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