From 0d69dcb497c27ea1ee0e5777ef3b10666d9dc52c Mon Sep 17 00:00:00 2001 From: Hannes Laimer Date: Tue, 12 Sep 2023 11:18:49 +0200 Subject: [PATCH] gc: fix ignoring if `lost+found` can't be accessed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hannes Laimer Fixes: e2516f61a860eae59395a3a990d9abe4c445ce8c Signed-off-by: Fabian Grünbichler --- pbs-datastore/src/datastore.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs index d0c2b90a..cc7a39bd 100644 --- a/pbs-datastore/src/datastore.rs +++ b/pbs-datastore/src/datastore.rs @@ -874,7 +874,7 @@ impl DataStore { (Some(inner), None) => bail!("unexpected error on datastore traversal: {inner}"), }; if inner.kind() == io::ErrorKind::PermissionDenied { - if err.depth() == 0 && path.ends_with("lost+found") { + if err.depth() <= 1 && path.ends_with("lost+found") { // allow skipping ext4 fsck-directory on EPERM only, otherwise we might prune // too many chunks. E.g., if users messed up with owner/perms on a rsync return Ok(());