From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage 1/2] zfs: handle unexpectedly missing snapshots better
Date: Tue, 22 Sep 2020 08:56:12 +0200 [thread overview]
Message-ID: <20200922065613.3370253-1-f.gruenbichler@proxmox.com> (raw)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
PVE/Storage/ZFSPoolPlugin.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
index 10354b3..6fa9127 100644
--- a/PVE/Storage/ZFSPoolPlugin.pm
+++ b/PVE/Storage/ZFSPoolPlugin.pm
@@ -472,6 +472,10 @@ sub volume_rollback_is_possible {
my ($class, $scfg, $storeid, $volname, $snap) = @_;
my $recentsnap = $class->zfs_get_latest_snapshot($scfg, $volname);
+
+ 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";
}
--
2.20.1
next reply other threads:[~2020-09-22 6:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 6:56 Fabian Grünbichler [this message]
2020-09-22 6:56 ` [pve-devel] [PATCH storage 2/2] zfs: rollback: improve error message Fabian Grünbichler
2020-09-23 13:11 ` [pve-devel] applied-series: [PATCH storage 1/2] zfs: handle unexpectedly missing snapshots better Thomas Lamprecht
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=20200922065613.3370253-1-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox