From c6772c92b8da769cd621d390fc3c58bc3ac6d537 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 1 Oct 2020 12:38:04 +0200 Subject: [PATCH] datastore: gc: comment exclusive process lock Signed-off-by: Thomas Lamprecht --- src/backup/datastore.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index d24645a7..f23a8517 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -478,6 +478,9 @@ impl DataStore { if let Ok(ref mut _mutex) = self.gc_mutex.try_lock() { + // avoids that we run GC if an old daemon process has still a + // running backup writer, which is not save as we have no "oldest + // 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()) };