From: Dominik Csapak <d.csapak@proxmox.com>
To: Robert Obkircher <r.obkircher@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH v1 proxmox-backup 1/3] datastore: read ctime from didx header instead of using current time
Date: Tue, 28 Apr 2026 16:13:50 +0200 [thread overview]
Message-ID: <b65b8613-b714-4349-80a5-432889a4d1af@proxmox.com> (raw)
In-Reply-To: <20260428122544.19899-2-r.obkircher@proxmox.com>
On 4/28/26 2:25 PM, Robert Obkircher wrote:
> It looks like this was accidentally changed during a refactor in 2020.
>
> The ctime field is public, so it is not obvious whether anyone depends
> on the broken behavior. The index_ctime accessor only seems to be used
> by inspect_file in proxmox_backup_debug.
not a review, but I made the ctime field private and
compiled with `cargo build --all` and `cargo test --all`
and it showed now errors, so we can assume this field was never used
directly only via the index_ctime accessor
that said, the fix LGTM
>
> Fixes: 6a7be83efe ("avoid chrono dependency, depend on proxmox 0.3.8")
> Signed-off-by: Robert Obkircher <r.obkircher@proxmox.com>
> ---
> pbs-datastore/src/dynamic_index.rs | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/pbs-datastore/src/dynamic_index.rs b/pbs-datastore/src/dynamic_index.rs
> index e1ca0eae..288f38b5 100644
> --- a/pbs-datastore/src/dynamic_index.rs
> +++ b/pbs-datastore/src/dynamic_index.rs
> @@ -119,8 +119,6 @@ impl DynamicIndexReader {
> bail!("got unknown magic number");
> }
>
> - let ctime = proxmox_time::epoch_i64();
> -
> let index_size = stat.st_size as usize - header_size;
> let index_count = index_size / 40;
> if index_count * 40 != index_size {
> @@ -141,7 +139,7 @@ impl DynamicIndexReader {
> _file: file,
> size,
> index,
> - ctime,
> + ctime: header.ctime,
> uuid: header.uuid,
> index_csum: header.index_csum,
> })
next prev parent reply other threads:[~2026-04-28 14:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 12:21 [PATCH v1 proxmox-backup 0/3] index file inspection fixes Robert Obkircher
2026-04-28 12:21 ` [PATCH v1 proxmox-backup 1/3] datastore: read ctime from didx header instead of using current time Robert Obkircher
2026-04-28 14:13 ` Dominik Csapak [this message]
2026-04-28 12:21 ` [PATCH v1 proxmox-backup 2/3] datastore: remove unnecessary pointer dereference in didx reader Robert Obkircher
2026-04-28 12:21 ` [PATCH v1 proxmox-backup 3/3] bin: debug: produce deterministic output when inspecting index files Robert Obkircher
2026-04-28 13:59 ` applied: [PATCH v1 proxmox-backup 0/3] index file inspection fixes 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=b65b8613-b714-4349-80a5-432889a4d1af@proxmox.com \
--to=d.csapak@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 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.