diff options
Diffstat (limited to 'glusterfsd')
-rw-r--r-- | glusterfsd/src/glusterfsd-messages.h | 3 | ||||
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 17 | ||||
-rw-r--r-- | glusterfsd/src/glusterfsd.h | 1 |
3 files changed, 18 insertions, 3 deletions
diff --git a/glusterfsd/src/glusterfsd-messages.h b/glusterfsd/src/glusterfsd-messages.h index 602cd9ecfd5..ce6c8ca56a5 100644 --- a/glusterfsd/src/glusterfsd-messages.h +++ b/glusterfsd/src/glusterfsd-messages.h @@ -35,6 +35,7 @@ GLFS_MSGID(GLUSTERFSD, glusterfsd_msg_1, glusterfsd_msg_2, glusterfsd_msg_3, glusterfsd_msg_28, glusterfsd_msg_29, glusterfsd_msg_30, glusterfsd_msg_31, glusterfsd_msg_32, glusterfsd_msg_33, glusterfsd_msg_34, glusterfsd_msg_35, glusterfsd_msg_36, - glusterfsd_msg_37, glusterfsd_msg_38, glusterfsd_msg_39); + glusterfsd_msg_37, glusterfsd_msg_38, glusterfsd_msg_39, + glusterfsd_msg_40); #endif /* !_GLUSTERFSD_MESSAGES_H_ */ diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 5d46b3d9f45..fc86cbdccc9 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -275,6 +275,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, @@ -711,7 +712,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"); @@ -1099,6 +1099,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; @@ -1216,7 +1220,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; @@ -2549,6 +2552,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); @@ -2814,6 +2819,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_40, + "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. */ { diff --git a/glusterfsd/src/glusterfsd.h b/glusterfsd/src/glusterfsd.h index 35cf6d88b7a..fa55789c611 100644 --- a/glusterfsd/src/glusterfsd.h +++ b/glusterfsd/src/glusterfsd.h @@ -111,6 +111,7 @@ enum argp_option_keys { ARGP_FUSE_FLUSH_HANDLE_INTERRUPT_KEY = 189, ARGP_FUSE_LRU_LIMIT_KEY = 190, ARGP_FUSE_AUTO_INVAL_KEY = 191, + ARGP_BRICK_MUX_KEY = 192 }; struct _gfd_vol_top_priv { |