From 823867f5b78a896e838ef5fd94abe9eb54130f4e Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 1 Oct 2020 12:38:38 +0200 Subject: [PATCH] datastore: gc: avoid unsafe call into libc, use epoch_i64 helper Signed-off-by: Thomas Lamprecht --- src/backup/datastore.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index f23a8517..1b5f7f8a 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -483,7 +483,7 @@ impl DataStore { // writer" information and thus no safe atime cutoff let _exclusive_lock = self.chunk_store.try_exclusive_lock()?; - let phase1_start_time = unsafe { libc::time(std::ptr::null_mut()) }; + let phase1_start_time = proxmox::tools::time::epoch_i64(); let oldest_writer = self.chunk_store.oldest_writer().unwrap_or(phase1_start_time); let mut gc_status = GarbageCollectionStatus::default();