From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 4/4] vzdump: log 100% percent in case $target is 0
Date: Thu, 13 Aug 2020 14:03:34 +0200 [thread overview]
Message-ID: <20200813120334.20928-5-s.reiter@proxmox.com> (raw)
In-Reply-To: <20200813120334.20928-1-s.reiter@proxmox.com>
When $target is 0, that means we don't have to upload any data, in which
case we're immediately done.
Otherwise incremental backups with no changes display a really weird
status: 0% (0.0 B of 0.0 B), duration 0, read: 0 B/s, write: 0 B/s
when they're actually done already.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
---
PVE/VZDump/QemuServer.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index 5edc62b..c919aa9 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -340,7 +340,7 @@ my $query_backup_status_loop = sub {
$target = $total if !$has_query_bitmap;
$transferred = $status->{transferred} || 0;
$reused = $status->{reused};
- my $percent = $target ? int(($transferred * 100)/$target) : 0;
+ my $percent = $target ? int(($transferred * 100)/$target) : 100;
my $zero = $status->{'zero-bytes'} || 0;
die "got unexpected uuid\n" if !$status->{uuid} || ($status->{uuid} ne $job_uuid);
--
2.20.1
prev parent reply other threads:[~2020-08-13 12:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 12:03 [pve-devel] [PATCH 0/4] improve logging for dirty bitmap PBS backups Stefan Reiter
2020-08-13 12:03 ` [pve-devel] [PATCH qemu 1/4] PVE: add query-pbs-bitmap-info QMP call Stefan Reiter
2020-08-19 9:41 ` Thomas Lamprecht
2020-08-13 12:03 ` [pve-devel] [PATCH qemu-server 2/4] vzdump: improve logging output with dirty bitmaps Stefan Reiter
2020-08-13 12:03 ` [pve-devel] [PATCH qemu-server 3/4] vzdump: display actually uploaded chunks as 'write' speed Stefan Reiter
2020-08-13 12:03 ` Stefan Reiter [this message]
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=20200813120334.20928-5-s.reiter@proxmox.com \
--to=s.reiter@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