summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-11-08 05:02:06 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-11-09 02:11:42 -0800
commit13c4f8d0f9114a9f8324d0dec8bd926c04a5dfc5 (patch)
tree4ba650cf1c70a434c9da82e2ca827fd4d8179226 /glusterfsd
parent96d16edec3dda4cd565b9d4106411c36bebe6dd5 (diff)
glusterfsd.c: cleanup_and_exit() doesn't call all the 'fini()'
calling 'fini()' of each xlator needs more synchronization work to be done. We will be doing a direct 'exit()' as of now. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1879 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1879
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 162a3fe8d6e..8cfe4f4a9ec 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -660,18 +660,25 @@ cleanup_and_exit (int signum)
ctx->cleanup_started = 1;
glusterfs_mgmt_pmap_signout (ctx);
- if (ctx->mgmt)
- rpc_clnt_unref (ctx->mgmt);
-
- gf_log ("glusterfsd", GF_LOG_NORMAL, "shutting down");
-
- /* Call fini() of FUSE xlator first */
+ /* Call fini() of FUSE xlator first:
+ * so there are no more requests coming and
+ * 'umount' of mount point is done properly */
trav = ctx->master;
if (trav && trav->fini) {
THIS = trav;
trav->fini (trav);
}
+ gf_log ("glusterfsd", GF_LOG_NORMAL, "shutting down");
+
+ glusterfs_pidfile_cleanup (ctx);
+
+ exit (0);
+#if 0
+ /* TODO: Properly do cleanup_and_exit(), with synchronisations */
+ if (ctx->mgmt)
+ rpc_clnt_unref (ctx->mgmt);
+
/* call fini() of each xlator */
trav = NULL;
if (ctx->active)
@@ -683,11 +690,7 @@ cleanup_and_exit (int signum)
}
trav = trav->next;
}
-
-
- glusterfs_pidfile_cleanup (ctx);
-
- exit (0);
+#endif
}