diff options
Diffstat (limited to 'xlators/nfs/server/src/nfs.c')
-rw-r--r-- | xlators/nfs/server/src/nfs.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 928754917c1..1be6caa7b5e 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -881,6 +881,12 @@ nfs_init_state (xlator_t *this) gf_log (GF_NFS, GF_LOG_ERROR, "Failed to parse dict"); goto free_foppool; } + + /* check if writing the rmtab is disabled*/ + if (nfs->rmtab && strcmp ("/-", nfs->rmtab) == 0) { + GF_FREE (nfs->rmtab); + nfs->rmtab = NULL; + } } /* support both options rpc-auth.ports.insecure and @@ -1079,7 +1085,13 @@ nfs_reconfigure_state (xlator_t *this, dict_t *options) } gf_path_strip_trailing_slashes (optstr); } - if (strcmp (nfs->rmtab, optstr) != 0) { + /* check if writing the rmtab is disabled*/ + if (strcmp ("/-", optstr) == 0) { + GF_FREE (nfs->rmtab); + nfs->rmtab = NULL; + gf_log (GF_NFS, GF_LOG_INFO, + "Disabled writing of nfs.mount-rmtab"); + } else if (!nfs->rmtab || strcmp (nfs->rmtab, optstr) != 0) { mount_rewrite_rmtab (nfs->mstate, optstr); gf_log (GF_NFS, GF_LOG_INFO, "Reconfigured nfs.mount-rmtab path: %s", @@ -1817,7 +1829,8 @@ struct volume_options options[] = { "list all the NFS-clients that have connected " "through the MOUNT protocol. If this is on shared " "storage, all GlusterFS servers will update and " - "output (with 'showmount') the same list." + "output (with 'showmount') the same list. Set to " + "\"/-\" to disable." }, { .key = {OPT_SERVER_AUX_GIDS}, .type = GF_OPTION_TYPE_BOOL, |