From 7cd58994262d2d622c1533c6f7a905106a1cf197 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Wed, 25 Mar 2015 10:39:20 +0530 Subject: glusterd: clean up global xaction_peer occurances With http://review.gluster.org/#/c/9972/ there is no more need to maintain xaction_peers in glusterd_conf_t. This patch cleans up code for all the occurances of xaction_peers. Change-Id: I4fbf2df0fa9b8a8751029be36be7f76f6464cc76 BUG: 1204727 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/9980 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-statedump.c | 2 -- xlators/mgmt/glusterd/src/glusterd-utils.c | 22 ---------------------- xlators/mgmt/glusterd/src/glusterd-utils.h | 3 --- xlators/mgmt/glusterd/src/glusterd.c | 1 - 4 files changed, 28 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-statedump.c b/xlators/mgmt/glusterd/src/glusterd-statedump.c index e4ecf3bcfc3..4792d45571f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-statedump.c +++ b/xlators/mgmt/glusterd/src/glusterd-statedump.c @@ -233,8 +233,6 @@ glusterd_dump_priv (xlator_t *this) gf_proc_dump_write (key, "%d", priv->quotad_svc.online); GLUSTERD_DUMP_PEERS (&priv->peers, uuid_list, _gf_false); - GLUSTERD_DUMP_PEERS (&priv->xaction_peers, op_peers_list, - _gf_true); glusterd_dump_client_details (priv); glusterd_dict_mgmt_v3_lock_statedump(priv->mgmt_v3_lock); dict_dump_to_statedump (priv->opts, "options", "glusterd"); diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index c41fb9385ad..d9e22125a3a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -9916,28 +9916,6 @@ glusterd_have_peers () return !cds_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); - - cds_list_for_each_entry_safe (peerinfo, tmp, &priv->xaction_peers, - op_peers_list) { - GF_ASSERT (peerinfo); - cds_list_del_init (&peerinfo->op_peers_list); - } - -} - gf_boolean_t glusterd_is_volume_started (glusterd_volinfo_t *volinfo) { diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 4420daeecc2..e34b0058f59 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -662,9 +662,6 @@ glusterd_check_client_op_version_support (char *volname, uint32_t op_version, gf_boolean_t glusterd_have_peers (); -void -glusterd_op_clear_xaction_peers (); - void glusterd_get_rebalance_volfile (glusterd_volinfo_t *volinfo, char *path, int path_len); diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 6f37338ee09..abe35e0c26f 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1545,7 +1545,6 @@ init (xlator_t *this) GF_VALIDATE_OR_GOTO(this->name, conf, out); CDS_INIT_LIST_HEAD (&conf->peers); - CDS_INIT_LIST_HEAD (&conf->xaction_peers); CDS_INIT_LIST_HEAD (&conf->volumes); CDS_INIT_LIST_HEAD (&conf->snapshots); CDS_INIT_LIST_HEAD (&conf->missed_snaps_list); -- cgit