we don't even know whether $snap exists at all, so the old variant could
be rather misleading..

Signed-off-by: Fabian Grünbichler <[email protected]>
---
 PVE/Storage/ZFSPoolPlugin.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
index 6fa9127..7c180ea 100644
--- a/PVE/Storage/ZFSPoolPlugin.pm
+++ b/PVE/Storage/ZFSPoolPlugin.pm
@@ -476,9 +476,8 @@ sub volume_rollback_is_possible {
     die "can't rollback, no snapshots exist at all\n"
        if !defined($recentsnap);
 
-    if ($snap ne $recentsnap) {
-       die "can't rollback, more recent snapshots exist\n";
-    }
+    die "can't rollback, '$snap' is not most recent snapshot\n"
+       if $snap ne $recentsnap;
 
     return 1;
 }
-- 
2.20.1



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to