[pbs-devel] [PATCH proxmox-backup v6 21/21] GC: clean up bad chunks from the filesystem only
Christian Ebner
c.ebner at proxmox.com
Fri Nov 14 14:19:01 CET 2025
Bad chunks are not present in the in-memory LRU cache, so only clean
up the bad chunk file from the filesystem.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
pbs-datastore/src/datastore.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index b91e90638..fa8212760 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -1703,7 +1703,11 @@ impl DataStore {
&mut gc_status,
|| {
if let Some(cache) = self.cache() {
- cache.remove(&digest)?;
+ if !bad {
+ cache.remove(&digest)?;
+ } else {
+ std::fs::remove_file(chunk_path)?;
+ }
}
delete_list.push((content.key, _chunk_guard));
Ok(())
--
2.47.3
More information about the pbs-devel
mailing list