From fdc83183263e04bee56672e9d9922cc9457146cb Mon Sep 17 00:00:00 2001 From: Rajesh Amaravathi Date: Fri, 21 Jun 2013 14:58:23 +0530 Subject: nfs: exit when all volumes are disabled Instead of triggering 4-5 error logs, when nfs is disabled for all volumes, exit the process. Change-Id: Ib286f143c4f74ba22f502aca0e7dcd0907db6563 BUG: 976750 Signed-off-by: Rajesh Amaravathi Reviewed-on: http://review.gluster.org/5245 Reviewed-by: Santosh Pradhan Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/nfs/server/src/nfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xlators/nfs') diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 6cd0594e6..c3a76c63e 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -533,10 +533,11 @@ nfs_init_state (xlator_t *this) if (!this) return NULL; - if ((!this->children) || (!this->children->xlator)) { - gf_log (GF_NFS, GF_LOG_ERROR, "nfs must have at least one" - " child subvolume"); - return NULL; + if (!this->children) { + gf_log (GF_NFS, GF_LOG_INFO, + "NFS is manually disabled: Exiting"); + /* Nothing for nfs process to do, exit cleanly */ + kill (getpid (), SIGTERM); } nfs = GF_CALLOC (1, sizeof (*nfs), gf_nfs_mt_nfs_state); -- cgit