diff options
author | Santosh Kumar Pradhan <spradhan@redhat.com> | 2014-04-25 18:04:08 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2014-05-03 12:43:25 -0700 |
commit | 49d235361cb42746329453121e83beeb7fe611e5 (patch) | |
tree | 5c975729dffd26f9050da63fd0b04f34e7865459 /xlators | |
parent | e73fc9939aecfa9f7955653d02f12243aba02fc6 (diff) |
protocol/server: Validate outstanding-rpc-limit
server.outstanding-rpc-limit by passes validation enforcement of gluster
as protocol/server ignores any keys starting with rpc (rpc* wildcard).
Which also causes a side effect, i.e. help text gets displayed as NULL.
Change-Id: I925e028529d671e1e29a0c7ff7e625fdb49a1be4
BUG: 1091364
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/7562
Reviewed-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/nfs/server/src/nfs.c | 3 | ||||
-rw-r--r-- | xlators/protocol/server/src/server.c | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 65814ebc17c..7da66214af8 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -37,9 +37,6 @@ #include "rpc-drc.h" #include "syscall.h" -#define STRINGIFY(val) #val -#define TOSTRING(val) STRINGIFY(val) - #define OPT_SERVER_AUX_GIDS "nfs.server-aux-gids" #define OPT_SERVER_GID_CACHE_TIMEOUT "nfs.server.aux-gid-timeout" #define OPT_SERVER_RPC_STATD "nfs.rpc-statd" diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 5bd702c537c..3d8e3d66d14 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -1048,9 +1048,6 @@ struct volume_options options[] = { { .key = {"transport.*"}, .type = GF_OPTION_TYPE_ANY, }, - { .key = {"rpc*"}, - .type = GF_OPTION_TYPE_ANY, - }, { .key = {"inode-lru-limit"}, .type = GF_OPTION_TYPE_INT, .min = 0, @@ -1135,5 +1132,14 @@ struct volume_options options[] = { "overrides the auth.allow option. By default, all" " connections are allowed." }, + { .key = {"rpc.outstanding-rpc-limit"}, + .type = GF_OPTION_TYPE_INT, + .min = RPCSVC_MIN_OUTSTANDING_RPC_LIMIT, + .max = RPCSVC_MAX_OUTSTANDING_RPC_LIMIT, + .default_value = TOSTRING(RPCSVC_DEFAULT_OUTSTANDING_RPC_LIMIT), + .description = "Parameter to throttle the number of incoming RPC " + "requests from a client. 0 means no limit (can " + "potentially run out of memory)" + }, { .key = {NULL} }, }; |