From 2f4898de4c3dda7072c02cf2f799d71d349016af Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Wed, 28 Dec 2016 14:32:12 +0530 Subject: mount/fuse: Fix the place where graph-switch event is logged Change-Id: I3c8577b87db02a2a6ce6159e7d04cf58a2bda0c1 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/16302 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Raghavendra G --- xlators/mount/fuse/src/fuse-bridge.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 5426fa37d07..8ac5737b40c 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -4801,6 +4801,7 @@ fuse_graph_sync (xlator_t *this) fuse_private_t *priv = NULL; int need_first_lookup = 0; int ret = 0; + int new_graph_id = 0; xlator_t *old_subvol = NULL, *new_subvol = NULL; uint64_t winds_on_old_subvol = 0; @@ -4813,6 +4814,7 @@ fuse_graph_sync (xlator_t *this) old_subvol = priv->active_subvol; new_subvol = priv->active_subvol = priv->next_graph->top; + new_graph_id = priv->next_graph->id; priv->next_graph = NULL; need_first_lookup = 1; @@ -4831,6 +4833,8 @@ unlock: pthread_mutex_unlock (&priv->sync_mutex); if (need_first_lookup) { + gf_log ("fuse", GF_LOG_INFO, "switched to graph %d", + new_graph_id); fuse_first_lookup (this); } @@ -5236,9 +5240,6 @@ fuse_graph_setup (xlator_t *this, glusterfs_graph_t *graph) prev_graph->top, NULL); } - gf_log ("fuse", GF_LOG_INFO, "switched to graph %d", - ((graph) ? graph->id : 0)); - return ret; unlock: pthread_mutex_unlock (&priv->sync_mutex); -- cgit