summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs.c
diff options
context:
space:
mode:
authorKrishna Srinivas <ksriniva@redhat.com>2012-05-08 15:15:31 +0530
committerAnand Avati <avati@redhat.com>2012-05-27 22:21:01 -0700
commit99ea01aa92109f0fa5b35f47e7d04dce11baa654 (patch)
tree911cde2e5d6ec1aee3c394b19bfc0af44972186c /xlators/nfs/server/src/nfs.c
parentcc5b1f06a8bfd94c669007d27d0e5103a8856dc3 (diff)
nfs/mount: Support MOUNT protocol on UDP. Needed for NLM on solaris clients.
Change-Id: I3f5c35d06827fb267a7dae53d949c61567a945d0 BUG: 799287 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/3337 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/nfs/server/src/nfs.c')
-rw-r--r--xlators/nfs/server/src/nfs.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index a48e114999a..6e9a274d980 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -651,6 +651,25 @@ nfs_init_state (xlator_t *this)
}
}
+ nfs->mount_udp = 0;
+ if (dict_get(this->options, "nfs.mount-udp")) {
+ ret = dict_get_str (this->options, "nfs.mount-udp", &optstr);
+ if (ret == -1) {
+ gf_log (GF_NFS, GF_LOG_ERROR, "Failed to parse dict");
+ goto free_foppool;
+ }
+
+ ret = gf_string2boolean (optstr, &boolt);
+ if (ret < 0) {
+ gf_log (GF_NFS, GF_LOG_ERROR, "Failed to parse bool "
+ "string");
+ goto free_foppool;
+ }
+
+ if (boolt == _gf_true)
+ nfs->mount_udp = 1;
+ }
+
/* support both options rpc-auth.ports.insecure and
* rpc-auth-allow-insecure for backward compatibility
*/
@@ -1187,6 +1206,13 @@ struct volume_options options[] = {
" Set it to 'on' to re-enable it. Default value: 'on'"
},
+ { .key = {"nfs.mount-udp"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .description = "set the option to 'on' to enable mountd on UDP. "
+ "Needed by Solaris NFS clients if NLM support is"
+ "needed"
+ },
+
{ .key = {NULL} },
};