summaryrefslogtreecommitdiffstats
path: root/xlators/features/upcall/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/upcall/src')
-rw-r--r--xlators/features/upcall/src/upcall-internal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/features/upcall/src/upcall-internal.c b/xlators/features/upcall/src/upcall-internal.c
index e13097c57c6..cd4abb6bbbc 100644
--- a/xlators/features/upcall/src/upcall-internal.c
+++ b/xlators/features/upcall/src/upcall-internal.c
@@ -402,6 +402,7 @@ upcall_reaper_thread (void *data)
upcall_inode_ctx_t *inode_ctx = NULL;
upcall_inode_ctx_t *tmp = NULL;
xlator_t *this = NULL;
+ time_t timeout = 0;
this = (xlator_t *)data;
GF_ASSERT (this);
@@ -434,6 +435,10 @@ upcall_reaper_thread (void *data)
}
UNLOCK (&priv->inode_ctx_lk);
}
+
+ /* don't do a very busy loop */
+ timeout = get_cache_invalidation_timeout (this);
+ sleep (timeout / 2);
}
return NULL;