From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [RFC proxmox-backup 4/4] gc: don't limit index listing to same filesystem
Date: Mon, 30 Nov 2020 16:22:20 +0100 [thread overview]
Message-ID: <20201130152220.658777-5-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20201130152220.658777-1-f.gruenbichler@proxmox.com>
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>
---
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
next prev parent reply other threads:[~2020-11-30 15:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-30 15:22 [pbs-devel] [PATCH proxmox-backup 0/4] GC cleanups Fabian Grünbichler
2020-11-30 15:22 ` [pbs-devel] [PATCH proxmox-backup 1/4] gc: shorten progress messages Fabian Grünbichler
2020-11-30 15:22 ` [pbs-devel] [PATCH proxmox-backup 2/4] gc: log index files found outside of expected scheme Fabian Grünbichler
2020-11-30 15:22 ` [pbs-devel] [PATCH proxmox-backup 3/4] gc: remove duplicate variable Fabian Grünbichler
2020-11-30 15:22 ` Fabian Grünbichler [this message]
2020-12-01 5:24 ` [pbs-devel] applied: [PATCH proxmox-backup 0/4] GC cleanups Dietmar Maurer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201130152220.658777-5-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox