backup/datastore: expose insert_chunk method

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-03-06 10:19:07 +01:00
parent 91ebea8262
commit 3b7ade9e78
1 changed files with 12 additions and 0 deletions

View File

@ -243,4 +243,16 @@ impl DataStore {
Ok(())
}
pub fn insert_chunk(&self, chunk: &[u8]) -> Result<(bool, [u8; 32], u64), Error> {
self.chunk_store.insert_chunk(chunk)
}
pub fn insert_chunk_noverify(
&self,
digest: &[u8; 32],
chunk: &[u8],
) -> Result<(bool, u64), Error> {
self.chunk_store.insert_chunk_noverify(digest, chunk)
}
}