From: Robert Obkircher <r.obkircher@proxmox.com>
To: Christian Ebner <c.ebner@proxmox.com>,
Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH v4 proxmox-backup 09/11] datastore: use u64 instead of usize for fidx writer content size
Date: Fri, 30 Jan 2026 14:56:09 +0100 [thread overview]
Message-ID: <0ebe7911-98b4-4dda-90cd-1682bea7e2b0@proxmox.com> (raw)
In-Reply-To: <02bfc738-fb21-4d14-a982-67cb42b5690e@proxmox.com>
On 1/26/26 15:01, Christian Ebner wrote:
> On 1/26/26 2:19 PM, Robert Obkircher wrote:
>>
>> On 1/26/26 12:38, Christian Ebner wrote:
>>> Not sure about these changes, maybe other devs have a stronger
>>> opinion on this one.
>>>
>>> If we do want to adapt this, then IMHO this should however be done
>>> throughout the whole codebase, for the dynamic index as well.
>> The dynamic reader/writer and the FixedIndexReader already use u64 for
>> content
>> size and offsets. The API only supports 4 MiB chunks anyway, so it
>> shouldn't matter
>> if we keep using u32 there.
>
> Disregard that comment with respect to the dynamic index in that
> case, seems indeed to be the case and I got sidetracked by the index
> positions which are usize.
>
> But still this would be nice to have consistent, e.g. there is the
> check for chunk size used on the client side [0].
>
> [0]
> https://git.proxmox.com/?p=proxmox-backup.git;a=blob;f=pbs-datastore/src/chunk_store.rs;h=bd1dc353b5e8f5f0e7b8f2d6788f4d29433e2a9e;hb=HEAD#l42
There is a slight difference between these two.
IMO the index file readers/writers should accurately represent
the file format. For example, a 32-bit system might still want
to process an index file, even if the referenced contents are
huge.
The linked client code on the other hand actually needs to
load the contents into memory, so isize::MAX is a also real
limitation.
At the moment, this specific option also isn't relevant for fidx
backups, because the chunk size is hard-coded to 4 MiB on
the server. Specifying one of the other values actually leads
to a rather confusing error:
$ proxmox-backup-client backup --chunk-size 1024 big.img:big
...
Upload image 'big' to 'root@pam!tok@localhost:8007:test' as
big.img.fidx
Previous manifest does not contain an archive called 'big.img.fidx',
skipping download..
Error: fixed writer '1' - detected multiple end chunks (chunk size too
small)
I do agree that the inconsistent types on the server are not
ideal though. u64 makes sense for the chunk_size, because
that's what we store in the file header and it's the same type
as the total size, but u32 is also reasonable, because DataBlob
is documented to be < 128MB. Using u32 everywhere might
actually be the best option.
next prev parent reply other threads:[~2026-01-30 13:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 15:37 [pbs-devel] [PATCH v4 proxmox-backup 00/11] fix: #3847 pipe from STDIN to proxmox-backup-client Robert Obkircher
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 01/11] datastore: support writing fidx files of unknown size Robert Obkircher
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 02/11] datastore: remove Arc<ChunkStore> from FixedIndexWriter Robert Obkircher
2026-01-26 10:47 ` Christian Ebner
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 03/11] datastore: test FixedIndexWriter Robert Obkircher
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 04/11] api: backup: make fixed index file size optional Robert Obkircher
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 05/11] api: verify fixed index writer size on close Robert Obkircher
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 06/11] fix #3847: client: support fifo pipe inputs for images Robert Obkircher
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 07/11] client: treat minus sign as stdin Robert Obkircher
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 08/11] datastore: combine public FixedIndexWriter methods into add_chunk Robert Obkircher
2026-01-26 11:22 ` Christian Ebner
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 09/11] datastore: use u64 instead of usize for fidx writer content size Robert Obkircher
2026-01-26 11:39 ` Christian Ebner
2026-01-26 13:20 ` Robert Obkircher
2026-01-26 14:02 ` Christian Ebner
2026-01-30 13:56 ` Robert Obkircher [this message]
2026-01-30 14:46 ` Christian Ebner
2026-01-26 11:57 ` Christian Ebner
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 10/11] datastore: compute fidx file size with overflow checks Robert Obkircher
2026-01-23 15:37 ` [pbs-devel] [PATCH v4 proxmox-backup 11/11] datastore: support writing fidx files on systems with larger page size Robert Obkircher
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=0ebe7911-98b4-4dda-90cd-1682bea7e2b0@proxmox.com \
--to=r.obkircher@proxmox.com \
--cc=c.ebner@proxmox.com \
--cc=pbs-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.