From c395ef6539f877cde96d13b66613a1746e628cf7 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Tue, 24 Mar 2015 11:27:52 +0530 Subject: glusterd: Maintain local xaction_peer list for op-sm http://review.gluster.org/9269 addresses maintaining local xaction_peers in syncop and mgmt_v3 framework. This patch is to maintain local xaction_peers list for op-sm framework as well. Backport of http://review.gluster.org/#/c/9972/ Change-Id: Idd8484463fed196b3b18c2df7f550a3302c6e138 BUG: 1206429 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/9972 Reviewed-by: Anand Nekkunti Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/10023 Reviewed-by: Kaushal M Reviewed-by: Raghavendra Bhat --- xlators/mgmt/glusterd/src/glusterd-utils.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 636f72613d9..49783fb816f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -45,6 +45,16 @@ if (active_count && (peerinfo->quorum_contrib == QUORUM_UP))\ *active_count = *active_count + 1;\ +#define list_for_each_local_xaction_peers(xact_peer, xact_peers_head) \ + glusterd_local_peers_t *pos = NULL; \ + for (pos = list_entry ((xact_peers_head)->next, \ + glusterd_local_peers_t, op_peers_list), \ + xact_peer = pos->peerinfo; \ + &pos->op_peers_list != (xact_peers_head); \ + pos = list_entry(pos->op_peers_list.next, \ + glusterd_local_peers_t, op_peers_list), \ + xact_peer = pos->peerinfo) + struct glusterd_lock_ { uuid_t owner; time_t timestamp; @@ -915,4 +925,8 @@ mntopts_exists (const char *str, const char *opts); void glusterd_get_rebalance_volfile (glusterd_volinfo_t *volinfo, char *path, int path_len); + +void +gd_cleanup_local_xaction_peers_list (struct list_head *peers); + #endif -- cgit