[pbs-devel] [RFC proxmox-backup 4/4] gc: don't limit index listing to same filesystem

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Nov 30 16:22:20 CET 2020


WalkDir does not follow symlinks by default anyway, and this behaviour
is not documented anywhere. e.g., if a sysadmin mounts 'extra storage'
for some backup group or type (not knowing that only metadata is stored
in those directories), GC will ignore all the indices contained within
and happily garbage collect their chunks..

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---

Notes:
    RFC since I am not 100% sure, but the current behaviour seems like a timebomb
    waiting to bite someone's behind..

 src/backup/datastore.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs
index 8ea0a753..a4c437e1 100644
--- a/src/backup/datastore.rs
+++ b/src/backup/datastore.rs
@@ -380,7 +380,7 @@ impl DataStore {
 
         use walkdir::WalkDir;
 
-        let walker = WalkDir::new(&base).same_file_system(true).into_iter();
+        let walker = WalkDir::new(&base).into_iter();
 
         // make sure we skip .chunks (and other hidden files to keep it simple)
         fn is_hidden(entry: &walkdir::DirEntry) -> bool {
-- 
2.20.1






More information about the pbs-devel mailing list