move sweep_used_chunks to chunk_store
This commit is contained in:
parent
3d5c11e5d2
commit
6ea3a0b7fc
@ -163,6 +163,11 @@ impl ChunkStore {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn sweep_used_chunks(&mut self) -> Result<(), Error> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn insert_chunk(&mut self, chunk: &[u8]) -> Result<(bool, [u8; 32]), Error> {
|
||||
|
||||
self.hasher.reset();
|
||||
|
@ -61,11 +61,6 @@ impl DataStore {
|
||||
Ok(list)
|
||||
}
|
||||
|
||||
fn sweep_used_chunks(&mut self) -> Result<(), Error> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn mark_used_chunks(&mut self) -> Result<(), Error> {
|
||||
|
||||
let image_list = self.list_images()?;
|
||||
@ -81,7 +76,8 @@ impl DataStore {
|
||||
pub fn garbage_collection(&mut self) -> Result<(), Error> {
|
||||
|
||||
self.mark_used_chunks()?;
|
||||
self.sweep_used_chunks()?;
|
||||
|
||||
self.chunk_store.sweep_used_chunks()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user