[pbs-devel] [PATCH backup 1/2] debug: Show if chunks are compressed during inspect

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Nov 7 10:13:08 CET 2023


Am 03/11/2023 um 14:46 schrieb Maximiliano Sandoval R:
> Signed-off-by: Maximiliano Sandoval R <m.sandoval at proxmox.com>
> ---
>  src/bin/proxmox_backup_debug/inspect.rs | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/bin/proxmox_backup_debug/inspect.rs b/src/bin/proxmox_backup_debug/inspect.rs
> index 29265e26..f3a13f3d 100644
> --- a/src/bin/proxmox_backup_debug/inspect.rs
> +++ b/src/bin/proxmox_backup_debug/inspect.rs
> @@ -190,17 +190,20 @@ fn inspect_chunk(
>          Some(references) => json!({
>              "crc": crc_status,
>              "encryption": blob.crypt_mode()?,
> +            "is_compressed": blob.is_compressed(),

please use kebab-case, as the entry below does...

>              "referenced-by": references
>          }),
>          None => json!({
>               "crc": crc_status,
>               "encryption": blob.crypt_mode()?,
> +             "is_compressed": blob.is_compressed(),

same

>          }),
>      };
>  
>      if output_format == "text" {
>          println!("CRC: {}", val["crc"]);
>          println!("encryption: {}", val["encryption"]);
> +        println!("is_compressed: {}", val["is_compressed"]);

same

>          if let Some(refs) = val["referenced-by"].as_array() {
>              println!("referenced by:");
>              for reference in refs {






More information about the pbs-devel mailing list