gc: don't limit index listing to same filesystem

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@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2020-11-30 16:22:20 +01:00 committed by Dietmar Maurer
parent efcac39d34
commit 844660036b

View File

@ -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 {