path: root/xlators/features/leases/src/leases.h
diff options
authorNiels de Vos <>2017-04-17 15:50:07 +0530
committerKaleb KEITHLEY <>2017-05-01 09:30:14 +0000
commit73fcf3a874b2049da31d01b8363d1ac85c9488c2 (patch)
treeb9db965e337fde22a7668cb11ffb0351619a924f /xlators/features/leases/src/leases.h
parent859669759f7fa0f2114add13660ce3bf16c77f30 (diff)
core: make the per glusterfs_ctx_t timer-wheel refcounted
xlators can use a 'global' timer-wheel for scheduling events. This timer-wheel is managed per glusterfs_ctx_t, but does not need to be allocated for every graph. When an xlator wants to use the timer-wheel, it will be instanciated on demand, and provided to xlators that request it later on. By adding a reference counter to the glusterfs_ctx_t for the timer-wheel, the threads and structures can be cleaned up when the last xlator does not have a need for it anymore. In general, the xlators request the timer-wheel in init(), and they should return it in fini(). Because the timer-wheel is managed per glusterfs_ctx_t, the functions can be added to ctx.c and do not need to live in their very minimal tw.[ch] files. Change-Id: I19d225b39aaa272d9005ba7adc3104c3764f1572 BUG: 1442788 Reported-by: Poornima G <> Signed-off-by: Niels de Vos <> Reviewed-on: NetBSD-regression: NetBSD Build System <> CentOS-regression: Gluster Build System <> Smoke: Gluster Build System <> Reviewed-by: Amar Tumballi <> Reviewed-by: Zhou Zhengping <> Reviewed-by: Kaleb KEITHLEY <>
Diffstat (limited to 'xlators/features/leases/src/leases.h')
1 files changed, 0 insertions, 1 deletions
diff --git a/xlators/features/leases/src/leases.h b/xlators/features/leases/src/leases.h
index 703c4d809cd..443c6a22324 100644
--- a/xlators/features/leases/src/leases.h
+++ b/xlators/features/leases/src/leases.h
@@ -26,7 +26,6 @@
#include "lkowner.h"
#include "locking.h"
#include "upcall-utils.h"
-#include "tw.h"
#include "timer-wheel.h"
#include "leases-mem-types.h"
#include "leases-messages.h"