summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/posix/src/posix-helpers.c')
-rw-r--r--xlators/storage/posix/src/posix-helpers.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 4aa39514486..6bd6bb1a0bf 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -1442,15 +1442,21 @@ posix_janitor_thread_proc (void *data)
while (1) {
time (&now);
if ((now - priv->last_landfill_check) > priv->janitor_sleep_duration) {
- gf_msg_trace (this->name, 0,
+ if (priv->disable_landfill_purge) {
+ gf_msg_debug (this->name, 0,
+ "Janitor would have "
+ "cleaned out %s, but purge"
+ "is disabled.",
+ priv->trash_path);
+ } else {
+ gf_msg_trace (this->name, 0,
"janitor cleaning out %s",
priv->trash_path);
-
- nftw (priv->trash_path,
- janitor_walker,
- 32,
- FTW_DEPTH | FTW_PHYS);
-
+ nftw (priv->trash_path,
+ janitor_walker,
+ 32,
+ FTW_DEPTH | FTW_PHYS);
+ }
priv->last_landfill_check = now;
}