From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 3C3F91FF144 for ; Tue, 10 Mar 2026 18:04:20 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0FACB63D0; Tue, 10 Mar 2026 18:04:14 +0100 (CET) Message-ID: <9bde6dac-6aa7-4dd9-b2df-6502721d599c@proxmox.com> Date: Tue, 10 Mar 2026 18:03:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 proxmox-backup 1/3] api: backup: don't verify total file size for incremental backups To: Robert Obkircher , pbs-devel@lists.proxmox.com References: <20260310160537.182153-1-r.obkircher@proxmox.com> <20260310160537.182153-2-r.obkircher@proxmox.com> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <20260310160537.182153-2-r.obkircher@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1773162186361 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.010 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.408 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.819 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.903 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 4ERK5HGNLSEUOIUKOKFK7VFTJ4EEOSR7 X-Message-ID-Hash: 4ERK5HGNLSEUOIUKOKFK7VFTJ4EEOSR7 X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 > --- > 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()?;