From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/2] cleanup keep-all handling
Date: Mon, 23 Nov 2020 15:54:15 +0100 [thread overview]
Message-ID: <20201123145415.16434-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20201123145415.16434-1-f.ebner@proxmox.com>
If keep-all is set to 0, adding it doesn't make a difference,
if the key is not in the hash, it won't show up in the 'values'.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
PVE/VZDump.pm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 178f37f5..c37fa513 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -737,10 +737,7 @@ sub exec_backup_task {
my $prune_options = $opts->{'prune-backups'};
my $backup_limit = 0;
- my $keep_all = delete $prune_options->{'keep-all'};
- if ($keep_all) {
- $prune_options = { 'keep-all' => 1 };
- } else {
+ if (!$prune_options->{'keep-all'}) {
foreach my $keep (values %{$prune_options}) {
$backup_limit += $keep;
}
--
2.20.1
next prev parent reply other threads:[~2020-11-23 14:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 14:54 [pve-devel] [PATCH storage 1/2] avoid auto-vivication Fabian Ebner
2020-11-23 14:54 ` Fabian Ebner [this message]
2020-11-23 14:57 ` [pve-devel] applied: " 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=20201123145415.16434-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.