public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Shan Shaji <s.shaji@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [RFC PATCH proxmox-backup 2/6] fix #7024: pxar: show archiver summary for legacy and data mode
Date: Mon, 29 Jun 2026 10:37:58 +0200	[thread overview]
Message-ID: <88319e84-0f2b-4a76-a7f1-fae5774138c6@proxmox.com> (raw)
In-Reply-To: <20260610180208.801614-3-s.shaji@proxmox.com>

On 6/10/26 8:02 PM, Shan Shaji wrote:
> earlier, the archiver summary was only being shown when the change
> detection mode is metadata. To improve this, log the total number of
> files and the amount of data re-encoded for legacy and data modes
> as well.
> 
> Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
> ---
>   pbs-client/src/pxar/create.rs | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/pbs-client/src/pxar/create.rs b/pbs-client/src/pxar/create.rs
> index c7f26879e..9100ac1a3 100644
> --- a/pbs-client/src/pxar/create.rs
> +++ b/pbs-client/src/pxar/create.rs
> @@ -348,6 +348,15 @@ where
>               ),
>               archiver.progress_stats.partial_chunks_count,
>           );
> +    } else {
> +        info!("Processing summary:");
> +        info!(
> +            "- {} total files ({} hardlinks) with {} data",
> +            archiver.progress_stats.files_reencoded_count
> +                + archiver.progress_stats.files_hardlink_count,

nit: the total here is basically the same as for the metadata mode above 
(since reuse being 0)

this could therefore be defined as common helper (see suggested diff below).

But maybe even better, since you move these to atomic counters in patch 
3 anyways, maybe reorder them and do the conversion first, then you 
already have the helper you need at hand anyways.

> +            archiver.progress_stats.files_hardlink_count,
> +            HumanByte::from(archiver.progress_stats.total_reencoded_size),
> +        );
>       }
>       Ok(())
>   }


diff --git a/pbs-client/src/pxar/create.rs b/pbs-client/src/pxar/create.rs
index 56296171e..e541b829b 100644
--- a/pbs-client/src/pxar/create.rs
+++ b/pbs-client/src/pxar/create.rs
@@ -161,6 +161,14 @@ struct PxarArchiverProgressStats {
      total_reencoded_size: u64,
  }

+impl PxarArchiverProgressStats {
+    fn total_files_processed(&self) -> u64 {
+        self.files_reused_count
+            + self.files_reencoded_count
+            + self.files_hardlink_count
+    }
+}
+
  #[derive(Serialize, Deserialize)]
  #[serde(rename_all = "kebab-case")]
  pub(crate) struct PbsClientPrelude {
@@ -325,9 +333,7 @@ where
          info!("Change detection summary:");
          info!(
              " - {} total files ({} hardlinks)",
-            archiver.progress_stats.files_reused_count
-                + archiver.progress_stats.files_reencoded_count
-                + archiver.progress_stats.files_hardlink_count,
+            archiver.progress_stats.total_files_processed(),
              archiver.progress_stats.files_hardlink_count,
          );
          info!(
@@ -352,8 +358,7 @@ where
          info!("Processing summary:");
          info!(
              "- {} total files ({} hardlinks) with {} data",
-            archiver.progress_stats.files_reencoded_count
-                + archiver.progress_stats.files_hardlink_count,
+            archiver.progress_stats.total_files_processed(),
              archiver.progress_stats.files_hardlink_count,
              HumanByte::from(archiver.progress_stats.total_reencoded_size),
          );




  reply	other threads:[~2026-06-29  8:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 18:02 [RFC PATCH proxmox-backup 0/6] fix #7024: client: add file statistics inside logs Shan Shaji
2026-06-10 18:02 ` [RFC PATCH proxmox-backup 1/6] refactor: rename `ReuseStats` struct to `PxarArchiverProgressStats` Shan Shaji
2026-06-29  8:37   ` Christian Ebner
2026-06-10 18:02 ` [RFC PATCH proxmox-backup 2/6] fix #7024: pxar: show archiver summary for legacy and data mode Shan Shaji
2026-06-29  8:37   ` Christian Ebner [this message]
2026-06-10 18:02 ` [RFC PATCH proxmox-backup 3/6] refactor: use atomic values in `PxarArchiverProgressStats` Shan Shaji
2026-06-29  8:38   ` Christian Ebner
2026-06-10 18:02 ` [RFC PATCH proxmox-backup 4/6] fix #7024: cli: show number of processed files during backup Shan Shaji
2026-06-29  8:38   ` Christian Ebner
2026-06-10 18:02 ` [RFC PATCH proxmox-backup 5/6] refactor: rename `UploadCounters` to `UploadProgress` Shan Shaji
2026-06-29  8:38   ` Christian Ebner
2026-06-10 18:02 ` [RFC PATCH proxmox-backup 6/6] fix #7024: cli: add option to enable verbose logs Shan Shaji
2026-06-29  8:38   ` Christian Ebner

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=88319e84-0f2b-4a76-a7f1-fae5774138c6@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=s.shaji@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal