diff options
Diffstat (limited to 'glusterfsd/src/glusterfsd.c')
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 9a174c4bdae..366d3c622dc 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -74,6 +74,7 @@ #include "exports.h" #include "daemon.h" +#include "tw.h" /* process mode definitions */ #define GF_SERVER_PROCESS 0 @@ -184,6 +185,8 @@ static struct argp_option gf_options[] = { "Brick Port to be registered with Gluster portmapper" }, {"fopen-keep-cache", ARGP_FOPEN_KEEP_CACHE_KEY, "BOOL", OPTION_ARG_OPTIONAL, "Do not purge the cache on file open"}, + {"global-timer-wheel", ARGP_GLOBAL_TIMER_WHEEL, "BOOL", + OPTION_ARG_OPTIONAL, "Instantiate process global timer-wheel"}, {0, 0, 0, 0, "Fuse options:"}, {"direct-io-mode", ARGP_DIRECT_IO_MODE_KEY, "BOOL", OPTION_ARG_OPTIONAL, @@ -1065,6 +1068,10 @@ parse_opts (int key, char *arg, struct argp_state *state) break; + case ARGP_GLOBAL_TIMER_WHEEL: + cmd_args->global_timer_wheel = 1; + break; + case ARGP_GID_TIMEOUT_KEY: if (!gf_string2int(arg, &cmd_args->gid_timeout)) { cmd_args->gid_timeout_set = _gf_true; @@ -2218,7 +2225,6 @@ out: return ret; } - /* This is the only legal global pointer */ glusterfs_ctx_t *glusterfsd_ctx; @@ -2306,6 +2312,13 @@ main (int argc, char *argv[]) goto out; } + /* do this _after_ deamonize() */ + if (cmd->global_timer_wheel) { + ret = glusterfs_global_timer_wheel_init (ctx); + if (ret) + goto out; + } + ret = glusterfs_volumes_init (ctx); if (ret) goto out; |