From 99ea01aa92109f0fa5b35f47e7d04dce11baa654 Mon Sep 17 00:00:00 2001 From: Krishna Srinivas Date: Tue, 8 May 2012 15:15:31 +0530 Subject: nfs/mount: Support MOUNT protocol on UDP. Needed for NLM on solaris clients. Change-Id: I3f5c35d06827fb267a7dae53d949c61567a945d0 BUG: 799287 Signed-off-by: Krishna Srinivas Reviewed-on: http://review.gluster.com/3337 Tested-by: Gluster Build System Reviewed-by: Rajesh Amaravathi Reviewed-by: Anand Avati --- xlators/nfs/server/src/nfs.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'xlators/nfs/server/src/nfs.c') 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} }, }; -- cgit