summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-mgmt.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2015-01-06 18:23:41 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-03-03 23:50:22 -0800
commit673ba2659cebe22ee30c43f9fb080f330150f55e (patch)
treef91e83be5cfae7a08febfda420b33e05ed0b964f /xlators/mgmt/glusterd/src/glusterd-mgmt.c
parentef061b67f1b80c147c1959b896f7c9bdff01af96 (diff)
glusterd: Replace libglusterfs lists with liburcu lists
This patch replaces usage of the libglusterfs lists data structures and API in glusterd with the lists data structures and API from liburcu. The liburcu data structes and APIs are a drop-in replacement for libglusterfs lists. All usages have been changed to keep the code consistent, and free from confusion. NOTE: glusterd_conf_t->xprt_list still uses the libglusterfs data structures and API, as it holds rpc_transport_t objects, which is not a part of glusterd and is not being changed in this patch. This change was developed on the git branch at [1]. This commit is a combination of the following commits on the development branch. 6dac576 Replace libglusterfs lists with liburcu lists a51b5ab Fix compilation issues d98a06f Fix merge issues a5d918e Remove merge remnant 1cca113 More style cleanup 1917be3 Address review comments on 9624/1 8d10f13 Use cds_lists for glusterd_svc_t 524ad5d Add rculist header in glusterd-conn-helper.c 646f294 glusterd: add list_add_order API honouring rcu [1]: https://github.com/kshlm/glusterfs/tree/urcu Change-Id: Ic613c5b6e496a677b9d3de15fc042a0492109fb0 BUG: 1191030 Signed-off-by: Kaushal M <kaushal@redhat.com> Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/9624 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-by: Anand Nekkunti <anekkunt@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mgmt.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mgmt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
index 8d344aa7b9a..1c46e0e334b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
@@ -385,7 +385,7 @@ int
glusterd_mgmt_v3_initiate_lockdown (glusterd_op_t op, dict_t *dict,
char **op_errstr, int npeers,
gf_boolean_t *is_acquired,
- struct list_head *peers)
+ struct cds_list_head *peers)
{
char *volname = NULL;
glusterd_peerinfo_t *peerinfo = NULL;
@@ -634,7 +634,7 @@ out:
int
glusterd_mgmt_v3_pre_validate (glusterd_op_t op, dict_t *req_dict,
char **op_errstr, int npeers,
- struct list_head *peers)
+ struct cds_list_head *peers)
{
int32_t ret = -1;
int32_t peer_cnt = 0;
@@ -867,7 +867,7 @@ out:
int
glusterd_mgmt_v3_brick_op (glusterd_op_t op, dict_t *req_dict,
char **op_errstr, int npeers,
- struct list_head *peers)
+ struct cds_list_head *peers)
{
int32_t ret = -1;
int32_t peer_cnt = 0;
@@ -1086,7 +1086,7 @@ out:
int
glusterd_mgmt_v3_commit (glusterd_op_t op, dict_t *op_ctx,
dict_t *req_dict, char **op_errstr,
- int npeers, struct list_head *peers)
+ int npeers, struct cds_list_head *peers)
{
int32_t ret = -1;
int32_t peer_cnt = 0;
@@ -1283,7 +1283,7 @@ out:
int
glusterd_mgmt_v3_post_validate (glusterd_op_t op, int32_t op_ret, dict_t *dict,
dict_t *req_dict, char **op_errstr, int npeers,
- struct list_head *peers)
+ struct cds_list_head *peers)
{
int32_t ret = -1;
int32_t peer_cnt = 0;
@@ -1472,7 +1472,7 @@ glusterd_mgmt_v3_release_peer_locks (glusterd_op_t op,
dict_t *dict, int32_t op_ret,
char **op_errstr, int npeers,
gf_boolean_t is_acquired,
- struct list_head *peers)
+ struct cds_list_head *peers)
{
int32_t ret = -1;
int32_t peer_cnt = 0;
@@ -1538,7 +1538,7 @@ glusterd_mgmt_v3_initiate_all_phases (rpcsvc_request_t *req, glusterd_op_t op,
xlator_t *this = NULL;
gf_boolean_t is_acquired = _gf_false;
uuid_t *originator_uuid = NULL;
- struct list_head xaction_peers = {0,};
+ struct cds_list_head xaction_peers = {0,};
this = THIS;
GF_ASSERT (this);
@@ -1547,7 +1547,7 @@ glusterd_mgmt_v3_initiate_all_phases (rpcsvc_request_t *req, glusterd_op_t op,
conf = this->private;
GF_ASSERT (conf);
- INIT_LIST_HEAD (&xaction_peers);
+ CDS_INIT_LIST_HEAD (&xaction_peers);
npeers = gd_build_local_xaction_peers_list (&conf->peers,
&xaction_peers, op);
if (npeers == -1) {
@@ -1758,7 +1758,7 @@ glusterd_mgmt_v3_initiate_snap_phases (rpcsvc_request_t *req, glusterd_op_t op,
uuid_t *originator_uuid = NULL;
gf_boolean_t success = _gf_false;
char *cli_errstr = NULL;
- struct list_head xaction_peers = {0,};
+ struct cds_list_head xaction_peers = {0,};
this = THIS;
GF_ASSERT (this);
@@ -1767,7 +1767,7 @@ glusterd_mgmt_v3_initiate_snap_phases (rpcsvc_request_t *req, glusterd_op_t op,
conf = this->private;
GF_ASSERT (conf);
- INIT_LIST_HEAD (&xaction_peers);
+ CDS_INIT_LIST_HEAD (&xaction_peers);
npeers = gd_build_local_xaction_peers_list (&conf->peers,
&xaction_peers, op);
if (npeers == -1) {