src/backup/datastore.rs: new helper try_shared_chunk_store_lock()

This commit is contained in:
Dietmar Maurer 2020-01-02 11:00:33 +01:00
parent 1e8da0a789
commit 1cf5178ac5
1 changed files with 4 additions and 0 deletions

View File

@ -291,6 +291,10 @@ impl DataStore {
Ok(())
}
pub fn try_shared_chunk_store_lock(&self) -> Result<tools::ProcessLockSharedGuard, Error> {
self.chunk_store.try_shared_lock()
}
pub fn chunk_path(&self, digest:&[u8; 32]) -> (PathBuf, String) {
self.chunk_store.chunk_path(digest)
}