From 13c4f8d0f9114a9f8324d0dec8bd926c04a5dfc5 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 8 Nov 2010 05:02:06 +0000 Subject: 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 Signed-off-by: Anand V. Avati BUG: 1879 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1879 --- glusterfsd/src/glusterfsd.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'glusterfsd') 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 } -- cgit