From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 qemu-server 4/5] vzdump: log 100% percent in case $target is 0
Date: Wed, 19 Aug 2020 17:02:03 +0200 [thread overview]
Message-ID: <20200819150204.9178-5-s.reiter@proxmox.com> (raw)
In-Reply-To: <20200819150204.9178-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
next prev parent reply other threads:[~2020-08-19 15:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 15:01 [pve-devel] [PATCH v2 0/5] improve logging for dirty bitmap PBS backups Stefan Reiter
2020-08-19 15:02 ` [pve-devel] [PATCH v2 qemu 1/5] PVE: add query-pbs-bitmap-info QMP call Stefan Reiter
2020-08-19 15:02 ` [pve-devel] [PATCH v2 qemu-server 2/5] vzdump: improve logging output with dirty bitmaps Stefan Reiter
2020-08-19 15:02 ` [pve-devel] [PATCH v2 qemu-server 3/5] vzdump: display actually uploaded chunks as 'write' speed Stefan Reiter
2020-08-19 15:02 ` Stefan Reiter [this message]
2020-08-19 15:02 ` [pve-devel] [PATCH v2 qemu-server 5/5] vzdump: don't use dirty bitmap when VM was off Stefan Reiter
2020-08-19 17:35 ` [pve-devel] applied-series: [PATCH v2 0/5] improve logging for dirty bitmap PBS backups 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=20200819150204.9178-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 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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal