diff options
| author | Kaushal M <kaushal@redhat.com> | 2012-06-04 10:13:19 +0530 | 
|---|---|---|
| committer | Vijay Bellur <vijay@gluster.com> | 2012-06-06 04:32:46 -0700 | 
| commit | 4b09879d04606b7996cfea85af3f06a307728bee (patch) | |
| tree | f30cad6d88249a500d14c7bda0aa31575fa72503 | |
| parent | be1d2cd4d042bda2e53e3c45dd36e8ed9525ba32 (diff) | |
glusterd: nfs.disable fix for "volume set help"
Fixes volgen to include "nfs.disable" in output of "volume set help".
Also fixes some incorrect entries in glusterd_volopt_map.
Change-Id: Ica5edf1ece31f9daa040fcdf559c1643ecdfd568
BUG: 828027
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3509
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 19 | 
1 files changed, 12 insertions, 7 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 219352c6147..2a97e40522a 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 @@ -158,11 +160,11 @@ static struct volopt_map_entry glusterd_volopt_map[] = {          {"performance.flush-behind",             "performance/write-behind",  "flush-behind", NULL, DOC, 0},          {"performance.md-cache-timeout",         "performance/md-cache",      "md-cache-timeout", NULL, DOC, 0}, -        {"performance.io-thread-count",          "performance/io-threads",    "thread-count", DOC, 0}, -        {"performance.high-prio-threads",        "performance/io-threads",    NULL, DOC, 0}, -        {"performance.normal-prio-threads",      "performance/io-threads",    NULL, DOC, 0}, -        {"performance.low-prio-threads",         "performance/io-threads",    NULL, DOC, 0}, -        {"performance.least-prio-threads",       "performance/io-threads",    NULL, DOC, 0}, +        {"performance.io-thread-count",          "performance/io-threads",    "thread-count", NULL, DOC, 0}, +        {"performance.high-prio-threads",        "performance/io-threads",    NULL, NULL, DOC, 0}, +        {"performance.normal-prio-threads",      "performance/io-threads",    NULL, NULL, DOC, 0}, +        {"performance.low-prio-threads",         "performance/io-threads",    NULL, NULL, DOC, 0}, +        {"performance.least-prio-threads",       "performance/io-threads",    NULL, NULL, DOC, 0},          {"performance.disk-usage-limit",         "performance/quota",         NULL, NULL, NO_DOC, 0},          {"performance.min-free-disk-limit",      "performance/quota",         NULL, NULL, NO_DOC, 0},          {"performance.write-behind-window-size", "performance/write-behind",  "cache-size", NULL, DOC}, @@ -218,7 +220,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},          {"nfs.server-aux-gids",                  "nfs/server",                "nfs.server-aux-gids", NULL, NO_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);          }  | 
