From 2af8fca492f3e1152177641b5e6ab9ea59ec0acd Mon Sep 17 00:00:00 2001 From: Poornima G Date: Thu, 16 Aug 2018 16:36:08 +0530 Subject: posix: use synctask for janitor With brick mux, the number of threads increases as the number of bricks increases. As an initiative to reduce the number of threads in brick mux scenario, replacing janitor thread to use synctask infra. Now close() and closedir() handle by separate janitor thread which is linked with glusterfs_ctx. Updates #475 Change-Id: I0c4aaf728125ab7264442fde59f3d08542785f73 Signed-off-by: Poornima G --- xlators/features/leases/src/leases.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/features/leases/src/leases.c') diff --git a/xlators/features/leases/src/leases.c b/xlators/features/leases/src/leases.c index de74312b0ba..56299632e1d 100644 --- a/xlators/features/leases/src/leases.c +++ b/xlators/features/leases/src/leases.c @@ -1019,11 +1019,11 @@ fini(xlator_t *this) priv->inited_recall_thr = _gf_false; } - GF_FREE(priv); - if (this->ctx->tw) { + if (priv->timer_wheel) { glusterfs_ctx_tw_put(this->ctx); - this->ctx->tw = NULL; } + + GF_FREE(priv); return; } -- cgit