summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 494f982861d..a455cc03a30 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -13973,3 +13973,25 @@ glusterd_have_peers ()
return !list_empty (&conf->peers);
}
+
+void
+glusterd_op_clear_xaction_peers ()
+{
+ xlator_t *this = NULL;
+ glusterd_conf_t *priv = NULL;
+ glusterd_peerinfo_t *peerinfo = NULL;
+ glusterd_peerinfo_t *tmp = NULL;
+
+ this = THIS;
+ priv = this->private;
+
+ GF_ASSERT (this);
+ GF_ASSERT (priv);
+
+ list_for_each_entry_safe (peerinfo, tmp, &priv->xaction_peers,
+ op_peers_list) {
+ GF_ASSERT (peerinfo);
+ list_del_init (&peerinfo->op_peers_list);
+ }
+
+}