[pbs-devel] applied: [PATCH v3 proxmox-backup 3/9] datastore: use libc's timespec constants instead of redefinition
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Mar 5 10:41:32 CET 2025
applied this one already :)
On March 4, 2025 7:35 pm, Christian Ebner wrote:
> Use the UTIME_NOW and UTIME_OMIT constants defined in libc crate
> instead of redefining them. This improves consistency, as utimesat
> and its timespec parameter are also defined via the libc crate.
>
> Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
> ---
> changes since version 2:
> - use libc's constants instead of re-defining them
>
> pbs-datastore/src/chunk_store.rs | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/pbs-datastore/src/chunk_store.rs b/pbs-datastore/src/chunk_store.rs
> index 29d5874a1..5e02909a1 100644
> --- a/pbs-datastore/src/chunk_store.rs
> +++ b/pbs-datastore/src/chunk_store.rs
> @@ -220,19 +220,16 @@ impl ChunkStore {
> // unwrap: only `None` in unit tests
> assert!(self.locker.is_some());
>
> - const UTIME_NOW: i64 = (1 << 30) - 1;
> - const UTIME_OMIT: i64 = (1 << 30) - 2;
> -
> let times: [libc::timespec; 2] = [
> // access time -> update to now
> libc::timespec {
> tv_sec: 0,
> - tv_nsec: UTIME_NOW,
> + tv_nsec: libc::UTIME_NOW,
> },
> // modification time -> keep as is
> libc::timespec {
> tv_sec: 0,
> - tv_nsec: UTIME_OMIT,
> + tv_nsec: libc::UTIME_OMIT,
> },
> ];
>
> --
> 2.39.5
>
>
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
>
>
>
More information about the pbs-devel
mailing list