From 679395dc7ed5b716f3fb37886f7ec8e59ab02659 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 22 Sep 2010 06:17:32 +0000 Subject: mgmt/glusterd: skip sending req to disconnected peers Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1673 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1673 --- xlators/mgmt/glusterd/src/glusterd3_1-mops.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c index 2d0b223a956..d4b583092b1 100644 --- a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c +++ b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c @@ -986,6 +986,8 @@ glusterd3_1_cluster_lock (call_frame_t *frame, xlator_t *this, list_for_each_entry (peerinfo, &priv->peers, uuid_list) { GF_ASSERT (peerinfo); + if (!peerinfo->connected) + continue; if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) && (glusterd_op_get_op() != GD_OP_SYNC_VOLUME)) continue; @@ -1038,6 +1040,8 @@ glusterd3_1_cluster_unlock (call_frame_t *frame, xlator_t *this, list_for_each_entry (peerinfo, &priv->peers, uuid_list) { GF_ASSERT (peerinfo); + if (!peerinfo->connected) + continue; if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) && (glusterd_op_get_op() != GD_OP_SYNC_VOLUME)) continue; @@ -1123,6 +1127,8 @@ glusterd3_1_stage_op (call_frame_t *frame, xlator_t *this, list_for_each_entry (peerinfo, &priv->peers, uuid_list) { GF_ASSERT (peerinfo); + if (!peerinfo->connected) + continue; if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) && (glusterd_op_get_op() != GD_OP_SYNC_VOLUME)) continue; @@ -1216,6 +1222,8 @@ glusterd3_1_commit_op (call_frame_t *frame, xlator_t *this, list_for_each_entry (peerinfo, &priv->peers, uuid_list) { GF_ASSERT (peerinfo); + if (!peerinfo->connected) + continue; if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) && (glusterd_op_get_op() != GD_OP_SYNC_VOLUME)) continue; -- cgit