summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
diff options
context:
space:
mode:
authorKaleb S KEITHLEY <kkeithle@redhat.com>2016-03-15 06:16:31 -0400
committerNiels de Vos <ndevos@redhat.com>2016-04-27 00:59:30 -0700
commita4f84d786b596387aa0d659fb5cc8a933c95c01b (patch)
tree85e0f319cf0405a632c5a268dfb25407c054dba8 /xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
parent3c35329feb4dd479c9e4856ee27fa4b12c708db2 (diff)
glusterd: default value of nfs.disable, change from false to true
Next step in eventual deprecation of glusterfs nfs server in favor of ganesha.nfsd. Also replace several open-coded strings with constant. Change-Id: If52f5e880191a14fd38e69b70a32b0300dd93a50 BUG: 1092414 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13738 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-nfs-svc.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-nfs-svc.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
index ea24c1e1d25..60b792ffac2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
+++ b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
@@ -17,15 +17,7 @@
#include "glusterd-messages.h"
#include "glusterd-svc-helper.h"
-char *nfs_svc_name = "nfs";
-
-void
-glusterd_nfssvc_build (glusterd_svc_t *svc)
-{
- svc->manager = glusterd_nfssvc_manager;
- svc->start = glusterd_nfssvc_start;
- svc->stop = glusterd_nfssvc_stop;
-}
+static char *nfs_svc_name = "nfs";
static gf_boolean_t
glusterd_nfssvc_need_start ()
@@ -40,7 +32,7 @@ glusterd_nfssvc_need_start ()
if (!glusterd_is_volume_started (volinfo))
continue;
- if (dict_get_str_boolean (volinfo->dict, "nfs.disable", 0))
+ if (dict_get_str_boolean (volinfo->dict, NFS_DISABLE_MAP_KEY, 1))
continue;
start = _gf_true;
break;
@@ -67,7 +59,7 @@ glusterd_nfssvc_create_volfile ()
filepath, NULL);
}
-int
+static int
glusterd_nfssvc_manager (glusterd_svc_t *svc, void *data, int flags)
{
int ret = -1;
@@ -108,15 +100,13 @@ out:
return ret;
}
-int
+static int
glusterd_nfssvc_start (glusterd_svc_t *svc, int flags)
{
return glusterd_svc_start (svc, flags, NULL);
-
- return 0;
}
-int
+static int
glusterd_nfssvc_stop (glusterd_svc_t *svc, int sig)
{
int ret = -1;
@@ -137,6 +127,14 @@ out:
return ret;
}
+void
+glusterd_nfssvc_build (glusterd_svc_t *svc)
+{
+ svc->manager = glusterd_nfssvc_manager;
+ svc->start = glusterd_nfssvc_start;
+ svc->stop = glusterd_nfssvc_stop;
+}
+
int
glusterd_nfssvc_reconfigure ()
{