public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] applied: [PATCH backup] datastore: gc: avoid unsafe call into libc, use epoch_i64 helper
@ 2020-10-01 10:39 Thomas Lamprecht
  0 siblings, 0 replies; only message in thread
From: Thomas Lamprecht @ 2020-10-01 10:39 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
 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();
-- 
2.27.0





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-01 10:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 10:39 [pbs-devel] applied: [PATCH backup] datastore: gc: avoid unsafe call into libc, use epoch_i64 helper Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal