]> git.proxmox.com Git - proxmox-backup.git/commitdiff
move sweep_used_chunks to chunk_store
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 18 Dec 2018 10:18:55 +0000 (11:18 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 18 Dec 2018 10:18:55 +0000 (11:18 +0100)
src/backup/chunk_store.rs
src/backup/datastore.rs

index 18a7285dc37d97fb2554f8c1002f7e36b1073aa9..2975ee7aa48335f49d96fd9dce1103b5e536b830 100644 (file)
@@ -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();
index 6767f7be4f89c3c59670e7acb672694fac6b513e..86ab443427b0d0df4efcb4e0942c2a180094b3af 100644 (file)
@@ -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(())
     }