public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Robert Obkircher <r.obkircher@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH v1 proxmox-backup 1/3] api: backup: don't verify total file size for incremental backups
Date: Tue, 10 Mar 2026 18:03:39 +0100	[thread overview]
Message-ID: <9bde6dac-6aa7-4dd9-b2df-6502721d599c@proxmox.com> (raw)
In-Reply-To: <20260310160537.182153-2-r.obkircher@proxmox.com>

On 3/10/26 5:09 PM, Robert Obkircher wrote:
> This fixes incremental qemu backups, where the submitted value is the
> upload size instead of the total size.

Should we fix the `size` in the close_image() call on 
proxmox-backup-qemu as well? This is documented as the file size, not 
the upload size after all. Didn't look into it to deep, but 
`info.device_size` should be the correct value there. This can be a 
followup though and should not block/delay this crucial bugfix.

> 
> Avoiding the check is preferable over breaking backwards compatability
> of the API because it was only relevant for detecting potential bugs.
> 

It is best practice to blame the commit introducing the issue for reference:

Fixes: 760f40de ("api: verify fixed index writer size on close")

> Signed-off-by: Robert Obkircher <r.obkircher@proxmox.com>
> ---
>   src/api2/backup/environment.rs | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/src/api2/backup/environment.rs b/src/api2/backup/environment.rs
> index 657daa41..ab623f1f 100644
> --- a/src/api2/backup/environment.rs
> +++ b/src/api2/backup/environment.rs
> @@ -632,14 +632,14 @@ impl BackupEnvironment {
>                       );
>                   }
>               }
> -        }
>   
> -        let writer_size = data.index.size();
> -        if size != writer_size {
> -            bail!(
> -                "fixed writer '{}' close failed - unexpected size ({size} != {writer_size})",
> -                data.name,
> -            );
> +            let writer_size = data.index.size();
> +            if size != writer_size {
> +                bail!(
> +                    "fixed writer '{}' close failed - unexpected size ({size} != {writer_size})",
> +                    data.name,
> +                );
> +            }
>           }
>   
>           let expected_csum = data.index.close()?;





  reply	other threads:[~2026-03-10 17:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 16:03 [PATCH v1 proxmox-backup 0/3] fix incremental qemu backup Robert Obkircher
2026-03-10 16:03 ` [PATCH v1 proxmox-backup 1/3] api: backup: don't verify total file size for incremental backups Robert Obkircher
2026-03-10 17:03   ` Christian Ebner [this message]
2026-03-10 18:23     ` Thomas Lamprecht
2026-03-10 16:03 ` [PATCH v1 proxmox-backup 2/3] api: backup: improve schema documentation of fixed_close Robert Obkircher
2026-03-10 17:09   ` Christian Ebner
2026-03-10 16:04 ` [PATCH v1 proxmox-backup 3/3] api: backup: disallow incremental backups with different index length Robert Obkircher
2026-03-10 17:16   ` Christian Ebner
2026-03-10 18:40     ` Thomas Lamprecht
2026-03-10 17:11 ` [PATCH v1 proxmox-backup 0/3] fix incremental qemu backup Stoiko Ivanov
2026-03-10 17:34 ` Christian Ebner
2026-03-10 18:59 ` 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=9bde6dac-6aa7-4dd9-b2df-6502721d599c@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=r.obkircher@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