datastore: gc: avoid unsafe call into libc, use epoch_i64 helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
c6772c92b8
commit
823867f5b7
|
@ -483,7 +483,7 @@ impl DataStore {
|
||||||
// writer" information and thus no safe atime cutoff
|
// writer" information and thus no safe atime cutoff
|
||||||
let _exclusive_lock = self.chunk_store.try_exclusive_lock()?;
|
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 oldest_writer = self.chunk_store.oldest_writer().unwrap_or(phase1_start_time);
|
||||||
|
|
||||||
let mut gc_status = GarbageCollectionStatus::default();
|
let mut gc_status = GarbageCollectionStatus::default();
|
||||||
|
|
Loading…
Reference in New Issue