summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-mgmt.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2015-04-28 18:42:41 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-04-30 01:23:55 -0700
commit3d0c87a38802b0751c79ec0f11bb7f8972f417cd (patch)
tree8ef16737bf78eb4d8101cee6d8f7436f72f79c0d /xlators/mgmt/glusterd/src/glusterd-mgmt.c
parent0d3759fa8b4c0ba1c2d747ab96b9fd2442488635 (diff)
glusterd: Use uint32_t for peerinfo generation number
Using a uint64_t for the peerinfo generation number was overkill for how the generation number is used within GlusterD. It also prevented GlusterD from running on 32-bit architechtures, as uatomic_add_return doesn't support 64-bit values on 32-bit architechtures. This change was developed on the git branch at [1]. This commit is a combination of the following commits on the development branch. b78dba4 Use 32-bit generation number 2c37e4b Change other generation number variables to uint32_t [1]: https://github.com/kshlm/glusterfs/tree/urcu Change-Id: I0f310f56a4fb97d6bcbc23255a379ed5bb1ed9e1 BUG: 1205186 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/10425 Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mgmt.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mgmt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
index 539efb5900d..a99f8485e16 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
@@ -393,7 +393,7 @@ int
glusterd_mgmt_v3_initiate_lockdown (glusterd_op_t op, dict_t *dict,
char **op_errstr,
gf_boolean_t *is_acquired,
- uint64_t txn_generation)
+ uint32_t txn_generation)
{
char *volname = NULL;
glusterd_peerinfo_t *peerinfo = NULL;
@@ -664,7 +664,7 @@ out:
int
glusterd_mgmt_v3_pre_validate (glusterd_op_t op, dict_t *req_dict,
char **op_errstr,
- uint64_t txn_generation)
+ uint32_t txn_generation)
{
int32_t ret = -1;
int32_t peer_cnt = 0;
@@ -918,7 +918,7 @@ out:
int
glusterd_mgmt_v3_brick_op (glusterd_op_t op, dict_t *req_dict, char **op_errstr,
- uint64_t txn_generation)
+ uint32_t txn_generation)
{
int32_t ret = -1;
int32_t peer_cnt = 0;
@@ -1158,7 +1158,7 @@ out:
int
glusterd_mgmt_v3_commit (glusterd_op_t op, dict_t *op_ctx, dict_t *req_dict,
- char **op_errstr, uint64_t txn_generation)
+ char **op_errstr, uint32_t txn_generation)
{
int32_t ret = -1;
int32_t peer_cnt = 0;
@@ -1378,7 +1378,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,
- uint64_t txn_generation)
+ uint32_t txn_generation)
{
int32_t ret = -1;
int32_t peer_cnt = 0;
@@ -1588,7 +1588,7 @@ int
glusterd_mgmt_v3_release_peer_locks (glusterd_op_t op, dict_t *dict,
int32_t op_ret, char **op_errstr,
gf_boolean_t is_acquired,
- uint64_t txn_generation)
+ uint32_t txn_generation)
{
int32_t ret = -1;
int32_t peer_cnt = 0;
@@ -1673,7 +1673,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;
- uint64_t txn_generation = 0;
+ uint32_t txn_generation = 0;
this = THIS;
GF_ASSERT (this);
@@ -1886,7 +1886,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;
- uint64_t txn_generation = 0;
+ uint32_t txn_generation = 0;
this = THIS;
GF_ASSERT (this);