summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-06-04 10:13:19 +0530
committerVijay Bellur <vbellur@redhat.com>2012-09-16 22:00:38 -0700
commit948b9a5aa1dccdd0cf00e95e24409ff3dbe25139 (patch)
treedcfc466436f67251da365be90b3f725d55c1996e
parent21ed135a5ab503ba31048a983038d354c0f7a1b2 (diff)
glusterd: nfs.disable fix for "volume set help"
Fixes volgen to include "nfs.disable" in output of "volume set help". Change-Id: Idaac2cee04b7b38aad5a77db558808c0eb699fcf BUG: 828027 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3881 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index c10c8e4104c..5b16c97c119 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -47,8 +47,10 @@
#define AUTH_ALLOW_MAP_KEY "auth.allow"
#define AUTH_REJECT_MAP_KEY "auth.reject"
+#define NFS_DISABLE_MAP_KEY "nfs.disable"
#define AUTH_ALLOW_OPT_KEY "auth.addr.*.allow"
#define AUTH_REJECT_OPT_KEY "auth.addr.*.reject"
+#define NFS_DISABLE_OPT_KEY "nfs.*.disable"
/* dispatch table for VOLUME SET
@@ -216,7 +218,7 @@ static struct volopt_map_entry glusterd_volopt_map[] = {
{"nfs.trusted-write", "nfs/server", "!nfs3.*.trusted-write", NULL, DOC, 0},
{"nfs.volume-access", "nfs/server", "!nfs3.*.volume-access", NULL, DOC, 0},
{"nfs.export-dir", "nfs/server", "!nfs3.*.export-dir", NULL, DOC, 0},
- {"nfs.disable", "nfs/server", "!nfs-disable", NULL, DOC, 0},
+ {NFS_DISABLE_MAP_KEY, "nfs/server", "!nfs-disable", NULL, DOC, 0},
{"nfs.nlm", "nfs/server", "nfs.nlm", NULL, GLOBAL_DOC, 0},
{"nfs.mount-udp", "nfs/server", "nfs.mount-udp", NULL, GLOBAL_DOC, 0},
@@ -1985,6 +1987,8 @@ get_key_from_volopt ( struct volopt_map_entry *vme, char **key)
*key = gf_strdup (AUTH_ALLOW_OPT_KEY);
else if (!strcmp (vme->key, AUTH_REJECT_MAP_KEY))
*key = gf_strdup (AUTH_REJECT_OPT_KEY);
+ else if (!strcmp (vme->key, NFS_DISABLE_MAP_KEY))
+ *key = gf_strdup (NFS_DISABLE_OPT_KEY);
else {
if (vme->option) {
if (vme->option[0] == '!') {
@@ -2088,7 +2092,8 @@ glusterd_get_volopt_content (gf_boolean_t xml_out)
}
if (!strcmp (key, AUTH_ALLOW_OPT_KEY) ||
- !strcmp (key, AUTH_REJECT_OPT_KEY))
+ !strcmp (key, AUTH_REJECT_OPT_KEY) ||
+ !strcmp (key, NFS_DISABLE_OPT_KEY))
GF_FREE (key);
}