summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd3_1-mops.c8
1 files changed, 8 insertions, 0 deletions
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;