[pbs-devel] [PATCH proxmox-backup 3/9] datastore: move utimensat() related constants to module scope
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon Mar 3 14:03:45 CET 2025
On February 19, 2025 5:48 pm, Christian Ebner wrote:
> Move the UTIME_NOW and UTIME_OMIT constants from the current function
> scope to the module scope in order to allow to reuse them.
>
> This is in preparation for adding a check to test if the filesystem
> backing the chunk store honors immediate atime updates by calling
> utimensat().
>
> Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
> ---
> changes since version 1:
> - not present in previous version
>
> pbs-datastore/src/chunk_store.rs | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/pbs-datastore/src/chunk_store.rs b/pbs-datastore/src/chunk_store.rs
> index 29d5874a1..7bdcb0297 100644
> --- a/pbs-datastore/src/chunk_store.rs
> +++ b/pbs-datastore/src/chunk_store.rs
> @@ -18,6 +18,9 @@ use crate::file_formats::{
> };
> use crate::DataBlob;
>
> +const UTIME_NOW: i64 = (1 << 30) - 1;
> +const UTIME_OMIT: i64 = (1 << 30) - 2;
these are exported by libc, couldn't we just use the definition from
there?
> +
> /// File system based chunk store
> pub struct ChunkStore {
> name: String, // used for error reporting
> @@ -220,9 +223,6 @@ 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 {
> --
> 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