summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/nfs/server/src/nfs.c')
-rw-r--r--xlators/nfs/server/src/nfs.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index b03f407e1bb..577c67833ce 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -1158,6 +1158,10 @@ nfs_init_state (xlator_t *this)
nfs->register_portmap = rpcsvc_register_portmap_enabled (nfs->rpcsvc);
+ GF_OPTION_INIT ("nfs.event-threads",
+ nfs->event_threads, uint32, free_foppool);
+ event_reconfigure_threads (this->ctx->event_pool, nfs->event_threads);
+
this->private = (void *)nfs;
INIT_LIST_HEAD (&nfs->versions);
nfs->generation = 1965;
@@ -1384,6 +1388,11 @@ nfs_reconfigure_state (xlator_t *this, dict_t *options)
nfs_reconfigure_acl3 (this);
}
+ GF_OPTION_RECONF ("nfs.event-threads",
+ nfs->event_threads, options, uint32, out);
+ event_reconfigure_threads (this->ctx->event_pool, nfs->event_threads);
+
+
ret = 0;
out:
return ret;
@@ -2122,6 +2131,17 @@ struct volume_options options[] = {
.description = "When this option is set to off NFS falls back to "
"standard readdir instead of readdirp"
},
-
+ { .key = {"nfs.event-threads"},
+ .type = GF_OPTION_TYPE_SIZET,
+ .min = 1,
+ .max = 32,
+ .default_value = "1",
+ .description = "Specifies the number of event threads to execute in"
+ "in parallel. Larger values would help process"
+ " responses faster, depending on available processing"
+ " power. Range 1-32 threads.",
+ .op_version = {GD_OP_VERSION_4_0_0},
+ .flags = OPT_FLAG_SETTABLE,
+ },
{ .key = {NULL} },
};