From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage 2/2] zfs: rollback: improve error message
Date: Tue, 22 Sep 2020 08:56:13 +0200 [thread overview]
Message-ID: <20200922065613.3370253-2-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20200922065613.3370253-1-f.gruenbichler@proxmox.com>
we don't even know whether $snap exists at all, so the old variant could
be rather misleading..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
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
next prev parent 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 [pve-devel] [PATCH storage 1/2] zfs: handle unexpectedly missing snapshots better Fabian Grünbichler
2020-09-22 6:56 ` Fabian Grünbichler [this message]
2020-09-23 13:11 ` [pve-devel] applied-series: " 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-2-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