[pbs-devel] [PATCH proxmox-backup 3/9] datastore: move utimensat() related constants to module scope
Christian Ebner
c.ebner at proxmox.com
Wed Feb 19 17:48:41 CET 2025
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;
+
/// 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
More information about the pbs-devel
mailing list