diff options
Diffstat (limited to 'glusterfsd/src/glusterfsd.c')
| -rw-r--r-- | glusterfsd/src/glusterfsd.c | 18 | 
1 files changed, 15 insertions, 3 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index c4fb5dfc7e2..2482edd85ed 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -205,7 +205,6 @@ static struct argp_option gf_options[] = {       "Enables thin mount and connects via gfproxyd daemon"},      {"global-threading", ARGP_GLOBAL_THREADING_KEY, "BOOL", OPTION_ARG_OPTIONAL,       "Use the global thread pool instead of io-threads"}, -      {0, 0, 0, 0, "Fuse options:"},      {"direct-io-mode", ARGP_DIRECT_IO_MODE_KEY, "BOOL|auto",       OPTION_ARG_OPTIONAL, "Specify direct I/O strategy [default: \"auto\"]"}, @@ -277,6 +276,7 @@ static struct argp_option gf_options[] = {       "attribute, dentry and page-cache. "       "Disable this only if same files/directories are not accessed across "       "two different mounts concurrently [default: \"on\"]"}, +    {"brick-mux", ARGP_BRICK_MUX_KEY, 0, 0, "Enable brick mux. "},      {0, 0, 0, 0, "Miscellaneous Options:"},      {          0, @@ -721,7 +721,6 @@ create_fuse_mount(glusterfs_ctx_t *ctx)      xlator_t *master = NULL;      cmd_args = &ctx->cmd_args; -      if (!cmd_args->mount_point) {          gf_msg_trace("glusterfsd", 0,                       "mount point not found, not a client process"); @@ -1109,6 +1108,10 @@ parse_opts(int key, char *arg, struct argp_state *state)              cmd_args->thin_client = _gf_true;              break; +        case ARGP_BRICK_MUX_KEY: +            cmd_args->brick_mux = _gf_true; +            break; +          case ARGP_PID_FILE_KEY:              cmd_args->pid_file = gf_strdup(arg);              break; @@ -1226,7 +1229,6 @@ parse_opts(int key, char *arg, struct argp_state *state)          case ARGP_KEY_ARG:              if (state->arg_num >= 1)                  argp_usage(state); -              cmd_args->mount_point = gf_strdup(arg);              break; @@ -2588,6 +2590,8 @@ postfork:          if (ret)              goto out;      } +    gf_log("glusterfs", GF_LOG_INFO, "Pid of current running process is %d", +           getpid());      ret = gf_log_inject_timer_event(ctx);      glusterfs_signals_setup(ctx); @@ -2835,6 +2839,14 @@ main(int argc, char *argv[])      if (ret)          goto out; +    /* set brick_mux mode only for server process */ +    if ((ctx->process_mode != GF_SERVER_PROCESS) && cmd->brick_mux) { +        gf_msg("glusterfs", GF_LOG_CRITICAL, 0, glusterfsd_msg_43, +               "command line argument --brick-mux is valid only for brick " +               "process"); +        goto out; +    } +      /* log the version of glusterfs running here along with the actual         command line options. */      {  | 
