summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c14
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c60
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handshake.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-locks.c12
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-log-ops.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mgmt.c28
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c58
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-peer-utils.c24
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c30
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-sm.c14
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c24
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c58
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c28
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c28
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c96
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c22
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h2
24 files changed, 267 insertions, 267 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index 61e6012056c..b32dbb89134 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -1211,7 +1211,7 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count,
caps = 0;
#endif
- if (uuid_is_null (brickinfo->uuid)) {
+ if (gf_uuid_is_null (brickinfo->uuid)) {
ret = glusterd_resolve_brick (brickinfo);
if (ret) {
gf_log ("", GF_LOG_ERROR, FMTSTR_RESOLVE_BRICK,
@@ -1229,7 +1229,7 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count,
/* Check if the brick is added in this node, and set
* the restart_needed flag. */
- if ((!uuid_compare (brickinfo->uuid, MY_UUID)) &&
+ if ((!gf_uuid_compare (brickinfo->uuid, MY_UUID)) &&
!restart_needed) {
restart_needed = 1;
gf_log ("", GF_LOG_DEBUG,
@@ -1281,7 +1281,7 @@ glusterd_op_perform_remove_brick (glusterd_volinfo_t *volinfo, char *brick,
glusterd_volinfo_reset_defrag_stats (volinfo);
- if (!uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (!gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
/* Only if the brick is in this glusterd, do the rebalance */
if (need_migrate)
*need_migrate = 1;
@@ -1439,7 +1439,7 @@ glusterd_op_stage_add_brick (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
goto out;
}
- if (!uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (!gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
#ifdef HAVE_BD_XLATOR
if (brickinfo->vg[0]) {
ret = glusterd_is_valid_vg (brickinfo, 1, msg);
@@ -1982,7 +1982,7 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr)
* start
*/
if (is_origin_glusterd (dict) && (cmd != GF_OP_CMD_START)) {
- if (!uuid_is_null (volinfo->rebal.rebalance_id)) {
+ if (!gf_uuid_is_null (volinfo->rebal.rebalance_id)) {
ret = glusterd_copy_uuid_to_dict
(volinfo->rebal.rebalance_id, dict,
GF_REMOVE_BRICK_TID_KEY);
@@ -1997,7 +1997,7 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr)
/* Clear task-id, rebal.op and stored bricks on commmitting/stopping
* remove-brick */
if ((cmd != GF_OP_CMD_START) || (cmd != GF_OP_CMD_STATUS)) {
- uuid_clear (volinfo->rebal.rebalance_id);
+ gf_uuid_clear (volinfo->rebal.rebalance_id);
volinfo->rebal.op = GD_OP_NONE;
dict_unref (volinfo->rebal.dict);
volinfo->rebal.dict = NULL;
@@ -2052,7 +2052,7 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr)
"Missing remove-brick-id");
ret = 0;
} else {
- uuid_parse (task_id_str, volinfo->rebal.rebalance_id) ;
+ gf_uuid_parse (task_id_str, volinfo->rebal.rebalance_id) ;
volinfo->rebal.op = GD_OP_REMOVE_BRICK;
}
force = 0;
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index 4e02b5bbf18..58948b98584 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -1115,7 +1115,7 @@ glusterd_gsync_get_uuid (char *slave, glusterd_volinfo_t *vol,
t = strchr (slaveentry, ':');
GF_ASSERT (t);
*t = '\0';
- ret = uuid_parse (slaveentry, uuid);
+ ret = gf_uuid_parse (slaveentry, uuid);
*t = ':';
out:
@@ -3647,7 +3647,7 @@ fetch_data:
gsync_count = 0;
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (uuid_compare (brickinfo->uuid, MY_UUID))
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID))
continue;
sts_val = GF_CALLOC (1, sizeof(gf_gsync_status_t),
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index aecf59f9626..469c95c9890 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -99,7 +99,7 @@ glusterd_handle_friend_req (rpcsvc_request_t *req, uuid_t uuid,
uuid_t friend_uuid = {0};
dict_t *dict = NULL;
- uuid_parse (uuid_utoa (uuid), friend_uuid);
+ gf_uuid_parse (uuid_utoa (uuid), friend_uuid);
if (!port)
port = GF_DEFAULT_BASE_PORT;
@@ -128,7 +128,7 @@ glusterd_handle_friend_req (rpcsvc_request_t *req, uuid_t uuid,
}
event->peername = gf_strdup (peerinfo->hostname);
- uuid_copy (event->peerid, peerinfo->uuid);
+ gf_uuid_copy (event->peerid, peerinfo->uuid);
ctx = GF_CALLOC (1, sizeof (*ctx), gf_gld_mt_friend_req_ctx_t);
@@ -138,7 +138,7 @@ glusterd_handle_friend_req (rpcsvc_request_t *req, uuid_t uuid,
goto out;
}
- uuid_copy (ctx->uuid, uuid);
+ gf_uuid_copy (ctx->uuid, uuid);
if (hostname)
ctx->hostname = gf_strdup (hostname);
ctx->req = req;
@@ -230,7 +230,7 @@ glusterd_handle_unfriend_req (rpcsvc_request_t *req, uuid_t uuid,
}
event->peername = gf_strdup (hostname);
- uuid_copy (event->peerid, uuid);
+ gf_uuid_copy (event->peerid, uuid);
ctx = GF_CALLOC (1, sizeof (*ctx), gf_gld_mt_friend_req_ctx_t);
@@ -240,7 +240,7 @@ glusterd_handle_unfriend_req (rpcsvc_request_t *req, uuid_t uuid,
goto out;
}
- uuid_copy (ctx->uuid, uuid);
+ gf_uuid_copy (ctx->uuid, uuid);
if (hostname)
ctx->hostname = gf_strdup (hostname);
ctx->req = req;
@@ -745,7 +745,7 @@ __glusterd_handle_cluster_lock (rpcsvc_request_t *req)
return -1;
}
- uuid_copy (ctx->uuid, lock_req.uuid);
+ gf_uuid_copy (ctx->uuid, lock_req.uuid);
ctx->req = req;
ctx->dict = NULL;
@@ -803,7 +803,7 @@ glusterd_req_ctx_create (rpcsvc_request_t *rpc_req,
this = THIS;
GF_ASSERT (this);
- uuid_unparse (uuid, str);
+ gf_uuid_unparse (uuid, str);
gf_log (this->name, GF_LOG_DEBUG, "Received op from uuid %s", str);
dict = dict_new ();
@@ -815,7 +815,7 @@ glusterd_req_ctx_create (rpcsvc_request_t *rpc_req,
goto out;
}
- uuid_copy (req_ctx->uuid, uuid);
+ gf_uuid_copy (req_ctx->uuid, uuid);
req_ctx->op = op;
ret = dict_unserialize (buf_val, buf_len, &dict);
if (ret) {
@@ -1188,7 +1188,7 @@ __glusterd_handle_cli_deprobe (rpcsvc_request_t *req)
goto out;
}
- if (!uuid_compare (uuid, MY_UUID)) {
+ if (!gf_uuid_compare (uuid, MY_UUID)) {
op_errno = GF_DEPROBE_LOCALHOST;
ret = -1;
goto out;
@@ -1230,7 +1230,7 @@ __glusterd_handle_cli_deprobe (rpcsvc_request_t *req)
}
}
- if (!uuid_is_null (uuid)) {
+ if (!gf_uuid_is_null (uuid)) {
ret = glusterd_deprobe_begin (req, hostname, port, uuid, dict,
&op_errno);
} else {
@@ -1442,10 +1442,10 @@ __glusterd_handle_cli_uuid_reset (rpcsvc_request_t *req)
goto out;
}
- uuid_copy (uuid, priv->uuid);
+ gf_uuid_copy (uuid, priv->uuid);
ret = glusterd_uuid_generate_save ();
- if (!uuid_compare (uuid, MY_UUID)) {
+ if (!gf_uuid_compare (uuid, MY_UUID)) {
snprintf (msg_str, sizeof (msg_str), "old uuid and the new uuid"
" are same. Try gluster peer reset again");
gf_log (this->name, GF_LOG_ERROR, "%s", msg_str);
@@ -2149,7 +2149,7 @@ glusterd_op_mgmt_v3_lock_send_resp (rpcsvc_request_t *req, uuid_t *txn_id,
rsp.op_ret = status;
if (rsp.op_ret)
rsp.op_errno = errno;
- uuid_copy (rsp.txn_id, *txn_id);
+ gf_uuid_copy (rsp.txn_id, *txn_id);
ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gd1_mgmt_v3_lock_rsp);
@@ -2174,7 +2174,7 @@ glusterd_op_mgmt_v3_unlock_send_resp (rpcsvc_request_t *req, uuid_t *txn_id,
if (rsp.op_ret)
rsp.op_errno = errno;
glusterd_get_uuid (&rsp.uuid);
- uuid_copy (rsp.txn_id, *txn_id);
+ gf_uuid_copy (rsp.txn_id, *txn_id);
ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gd1_mgmt_v3_unlock_rsp);
@@ -2233,7 +2233,7 @@ __glusterd_handle_cluster_unlock (rpcsvc_request_t *req)
//respond here
return -1;
}
- uuid_copy (ctx->uuid, unlock_req.uuid);
+ gf_uuid_copy (ctx->uuid, unlock_req.uuid);
ctx->req = req;
ctx->dict = NULL;
@@ -2552,9 +2552,9 @@ __glusterd_handle_friend_update (rpcsvc_request_t *req)
ret = dict_get_str (dict, key, &uuid_buf);
if (ret)
goto out;
- uuid_parse (uuid_buf, uuid);
+ gf_uuid_parse (uuid_buf, uuid);
- if (!uuid_compare (uuid, MY_UUID)) {
+ if (!gf_uuid_compare (uuid, MY_UUID)) {
gf_log (this->name, GF_LOG_INFO,
"Received my uuid as Friend");
i++;
@@ -2608,7 +2608,7 @@ unlock:
}
out:
- uuid_copy (rsp.uuid, MY_UUID);
+ gf_uuid_copy (rsp.uuid, MY_UUID);
ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gd1_mgmt_friend_update_rsp);
if (dict) {
@@ -2672,7 +2672,7 @@ __glusterd_handle_probe_query (rpcsvc_request_t *req)
/* Check for uuid collision and handle it in a user friendly way by
* sending the error.
*/
- if (!uuid_compare (probe_req.uuid, MY_UUID)) {
+ if (!gf_uuid_compare (probe_req.uuid, MY_UUID)) {
gf_log (THIS->name, GF_LOG_ERROR, "Peer uuid %s is same as "
"local uuid. Please check the uuid of both the peers "
"from %s/%s", uuid_utoa (probe_req.uuid),
@@ -2711,7 +2711,7 @@ __glusterd_handle_probe_query (rpcsvc_request_t *req)
rcu_read_unlock ();
respond:
- uuid_copy (rsp.uuid, MY_UUID);
+ gf_uuid_copy (rsp.uuid, MY_UUID);
rsp.hostname = probe_req.hostname;
rsp.op_errstr = "";
@@ -3166,7 +3166,7 @@ glusterd_friend_rpc_create (xlator_t *this, glusterd_peerinfo_t *peerinfo,
if (args)
peerctx->args = *args;
- uuid_copy (peerctx->peerid, peerinfo->uuid);
+ gf_uuid_copy (peerctx->peerid, peerinfo->uuid);
peerctx->peername = gf_strdup (peerinfo->hostname);
ret = glusterd_transport_inet_options_build (&options,
@@ -3357,7 +3357,7 @@ glusterd_probe_begin (rpcsvc_request_t *req, const char *hoststr, int port,
&event);
if (!ret) {
event->peername = gf_strdup (peerinfo->hostname);
- uuid_copy (event->peerid, peerinfo->uuid);
+ gf_uuid_copy (event->peerid, peerinfo->uuid);
ret = glusterd_friend_sm_inject_event (event);
glusterd_xfer_cli_probe_resp (req, 0, GF_PROBE_SUCCESS,
@@ -3432,7 +3432,7 @@ glusterd_deprobe_begin (rpcsvc_request_t *req, const char *hoststr, int port,
event->ctx = ctx;
event->peername = gf_strdup (hoststr);
- uuid_copy (event->peerid, uuid);
+ gf_uuid_copy (event->peerid, uuid);
ret = glusterd_friend_sm_inject_event (event);
@@ -3465,7 +3465,7 @@ glusterd_xfer_friend_remove_resp (rpcsvc_request_t *req, char *hostname, int por
conf = this->private;
- uuid_copy (rsp.uuid, MY_UUID);
+ gf_uuid_copy (rsp.uuid, MY_UUID);
rsp.hostname = hostname;
rsp.port = port;
ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL,
@@ -3494,7 +3494,7 @@ glusterd_xfer_friend_add_resp (rpcsvc_request_t *req, char *myhostname,
conf = this->private;
- uuid_copy (rsp.uuid, MY_UUID);
+ gf_uuid_copy (rsp.uuid, MY_UUID);
rsp.op_ret = op_ret;
rsp.op_errno = op_errno;
rsp.hostname = gf_strdup (myhostname);
@@ -4130,7 +4130,7 @@ get_volinfo_from_brickid (char *brickid, glusterd_volinfo_t **volinfo)
*brick = '\0';
brick++;
- uuid_parse (volid_str, volid);
+ gf_uuid_parse (volid_str, volid);
ret = glusterd_volinfo_find_by_volume_id (volid, volinfo);
if (ret) {
/* Check if it is a snapshot volume */
@@ -4480,7 +4480,7 @@ get_brickinfo_from_brickid (char *brickid, glusterd_brickinfo_t **brickinfo)
*brick = '\0';
brick++;
- uuid_parse (volid_str, volid);
+ gf_uuid_parse (volid_str, volid);
ret = glusterd_volinfo_find_by_volume_id (volid, &volinfo);
if (ret) {
/* Check if it a snapshot volume */
@@ -4637,7 +4637,7 @@ glusterd_friend_remove_notify (glusterd_peerctx_t *peerctx)
peerinfo->port, dict);
new_event->peername = gf_strdup (peerinfo->hostname);
- uuid_copy (new_event->peerid, peerinfo->uuid);
+ gf_uuid_copy (new_event->peerid, peerinfo->uuid);
ret = glusterd_friend_sm_inject_event (new_event);
} else {
@@ -4718,8 +4718,8 @@ __glusterd_peer_rpc_notify (struct rpc_clnt *rpc, void *mydata,
if (peerinfo->connected) {
if (conf->op_version < GD_OP_VERSION_3_6_0) {
glusterd_get_lock_owner (&uuid);
- if (!uuid_is_null (uuid) &&
- !uuid_compare (peerinfo->uuid, uuid))
+ if (!gf_uuid_is_null (uuid) &&
+ !gf_uuid_compare (peerinfo->uuid, uuid))
glusterd_unlock (peerinfo->uuid);
} else {
cds_list_for_each_entry (volinfo,
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c
index ddb1403b391..850427714c0 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handshake.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c
@@ -433,7 +433,7 @@ glusterd_create_missed_snap (glusterd_missed_snap_info *missed_snapinfo,
GF_ASSERT (missed_snapinfo);
GF_ASSERT (snap_opinfo);
- uuid_parse (missed_snapinfo->snap_uuid, snap_uuid);
+ gf_uuid_parse (missed_snapinfo->snap_uuid, snap_uuid);
/* Find the snap-object */
snap = glusterd_find_snap_by_id (snap_uuid);
@@ -1521,7 +1521,7 @@ glusterd_event_connected_inject (glusterd_peerctx_t *peerctx)
ctx->dict = peerctx->args.dict;
event->peername = gf_strdup (peerinfo->hostname);
- uuid_copy (event->peerid, peerinfo->uuid);
+ gf_uuid_copy (event->peerid, peerinfo->uuid);
event->ctx = ctx;
ret = glusterd_friend_sm_inject_event (event);
diff --git a/xlators/mgmt/glusterd/src/glusterd-locks.c b/xlators/mgmt/glusterd/src/glusterd-locks.c
index 1f1de2ae4f0..0703777bdcb 100644
--- a/xlators/mgmt/glusterd/src/glusterd-locks.c
+++ b/xlators/mgmt/glusterd/src/glusterd-locks.c
@@ -118,9 +118,9 @@ glusterd_get_mgmt_v3_lock_owner (char *key, uuid_t *uuid)
ret = dict_get_bin (priv->mgmt_v3_lock, key, (void **) &lock_obj);
if (!ret)
- uuid_copy (*uuid, lock_obj->lock_owner);
+ gf_uuid_copy (*uuid, lock_obj->lock_owner);
else
- uuid_copy (*uuid, no_owner);
+ gf_uuid_copy (*uuid, no_owner);
ret = 0;
out:
@@ -544,7 +544,7 @@ glusterd_mgmt_v3_lock (const char *name, uuid_t uuid, char *type)
/* If the lock has already been held for the given volume
* we fail */
- if (!uuid_is_null (owner)) {
+ if (!gf_uuid_is_null (owner)) {
gf_log_callingfn (this->name, GF_LOG_WARNING,
"Lock for %s held by %s",
name, uuid_utoa (owner));
@@ -559,7 +559,7 @@ glusterd_mgmt_v3_lock (const char *name, uuid_t uuid, char *type)
goto out;
}
- uuid_copy (lock_obj->lock_owner, uuid);
+ gf_uuid_copy (lock_obj->lock_owner, uuid);
ret = dict_set_bin (priv->mgmt_v3_lock, key, lock_obj,
sizeof(glusterd_mgmt_v3_lock_obj));
@@ -642,14 +642,14 @@ glusterd_mgmt_v3_unlock (const char *name, uuid_t uuid, char *type)
goto out;
}
- if (uuid_is_null (owner)) {
+ if (gf_uuid_is_null (owner)) {
gf_log_callingfn (this->name, GF_LOG_WARNING,
"Lock for %s %s not held", type, name);
ret = -1;
goto out;
}
- ret = uuid_compare (uuid, owner);
+ ret = gf_uuid_compare (uuid, owner);
if (ret) {
gf_log_callingfn (this->name, GF_LOG_WARNING,
"Lock owner mismatch. "
diff --git a/xlators/mgmt/glusterd/src/glusterd-log-ops.c b/xlators/mgmt/glusterd/src/glusterd-log-ops.c
index de685543f2b..449b28cdbf1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-log-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-log-ops.c
@@ -212,7 +212,7 @@ cont:
ret = -1;
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (uuid_compare (brickinfo->uuid, MY_UUID))
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID))
continue;
if (brick &&
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c b/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c
index fc9b987ece6..a200c8e1230 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c
@@ -157,7 +157,7 @@ glusterd_handle_mgmt_v3_lock_fn (rpcsvc_request_t *req)
goto out;
}
- uuid_copy (ctx->uuid, lock_req.uuid);
+ gf_uuid_copy (ctx->uuid, lock_req.uuid);
ctx->req = req;
ctx->dict = dict_new ();
@@ -840,7 +840,7 @@ glusterd_handle_mgmt_v3_unlock_fn (rpcsvc_request_t *req)
goto out;
}
- uuid_copy (ctx->uuid, lock_req.uuid);
+ gf_uuid_copy (ctx->uuid, lock_req.uuid);
ctx->req = req;
ctx->dict = dict_new ();
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
index 8cd2f47fd31..2a34c78b35b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
@@ -318,7 +318,7 @@ gd_mgmt_v3_lock_cbk_fn (struct rpc_req *req, struct iovec *iov,
if (ret < 0)
goto out;
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
op_ret = rsp.op_ret;
op_errno = rsp.op_errno;
@@ -365,7 +365,7 @@ gd_mgmt_v3_lock (glusterd_op_t op, dict_t *op_ctx,
if (ret)
goto out;
- uuid_copy (req.uuid, my_uuid);
+ gf_uuid_copy (req.uuid, my_uuid);
req.op = op;
synclock_unlock (&conf->big_lock);
@@ -545,7 +545,7 @@ gd_mgmt_v3_pre_validate_cbk_fn (struct rpc_req *req, struct iovec *iov,
}
}
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
pthread_mutex_lock (&args->lock_dict);
{
ret = glusterd_pre_validate_aggr_rsp_dict (rsp.op, args->dict,
@@ -615,7 +615,7 @@ gd_mgmt_v3_pre_validate_req (glusterd_op_t op, dict_t *op_ctx,
if (ret)
goto out;
- uuid_copy (req.uuid, my_uuid);
+ gf_uuid_copy (req.uuid, my_uuid);
req.op = op;
synclock_unlock (&conf->big_lock);
@@ -796,7 +796,7 @@ gd_mgmt_v3_brick_op_cbk_fn (struct rpc_req *req, struct iovec *iov,
if (ret < 0)
goto out;
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
op_ret = rsp.op_ret;
op_errno = rsp.op_errno;
@@ -848,7 +848,7 @@ gd_mgmt_v3_brick_op_req (glusterd_op_t op, dict_t *op_ctx,
if (ret)
goto out;
- uuid_copy (req.uuid, my_uuid);
+ gf_uuid_copy (req.uuid, my_uuid);
req.op = op;
synclock_unlock (&conf->big_lock);
@@ -1000,7 +1000,7 @@ gd_mgmt_v3_commit_cbk_fn (struct rpc_req *req, struct iovec *iov,
}
}
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
pthread_mutex_lock (&args->lock_dict);
{
ret = glusterd_syncop_aggr_rsp_dict (rsp.op, args->dict,
@@ -1067,7 +1067,7 @@ gd_mgmt_v3_commit_req (glusterd_op_t op, dict_t *op_ctx,
if (ret)
goto out;
- uuid_copy (req.uuid, my_uuid);
+ gf_uuid_copy (req.uuid, my_uuid);
req.op = op;
synclock_unlock (&conf->big_lock);
@@ -1213,7 +1213,7 @@ gd_mgmt_v3_post_validate_cbk_fn (struct rpc_req *req, struct iovec *iov,
if (ret < 0)
goto out;
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
op_ret = rsp.op_ret;
op_errno = rsp.op_errno;
@@ -1263,7 +1263,7 @@ gd_mgmt_v3_post_validate_req (glusterd_op_t op, int32_t op_ret, dict_t *op_ctx,
if (ret)
goto out;
- uuid_copy (req.uuid, my_uuid);
+ gf_uuid_copy (req.uuid, my_uuid);
req.op = op;
req.op_ret = op_ret;
synclock_unlock (&conf->big_lock);
@@ -1404,7 +1404,7 @@ gd_mgmt_v3_unlock_cbk_fn (struct rpc_req *req, struct iovec *iov,
if (ret < 0)
goto out;
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
op_ret = rsp.op_ret;
op_errno = rsp.op_errno;
@@ -1451,7 +1451,7 @@ gd_mgmt_v3_unlock (glusterd_op_t op, dict_t *op_ctx,
if (ret)
goto out;
- uuid_copy (req.uuid, my_uuid);
+ gf_uuid_copy (req.uuid, my_uuid);
req.op = op;
synclock_unlock (&conf->big_lock);
@@ -1566,7 +1566,7 @@ glusterd_mgmt_v3_initiate_all_phases (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_copy (*originator_uuid, MY_UUID);
+ gf_uuid_copy (*originator_uuid, MY_UUID);
ret = dict_set_bin (dict, "originator_uuid",
originator_uuid, sizeof (uuid_t));
if (ret) {
@@ -1786,7 +1786,7 @@ glusterd_mgmt_v3_initiate_snap_phases (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_copy (*originator_uuid, MY_UUID);
+ gf_uuid_copy (*originator_uuid, MY_UUID);
ret = dict_set_bin (dict, "originator_uuid",
originator_uuid, sizeof (uuid_t));
if (ret) {
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 3e88a131f82..75943267e90 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -161,9 +161,9 @@ glusterd_generate_txn_id (dict_t *dict, uuid_t **txn_id)
goto out;
if (priv->op_version < GD_OP_VERSION_3_6_0)
- uuid_copy (**txn_id, priv->global_txn_id);
+ gf_uuid_copy (**txn_id, priv->global_txn_id);
else
- uuid_generate (**txn_id);
+ gf_uuid_generate (**txn_id);
ret = dict_set_bin (dict, "transaction_id",
*txn_id, sizeof (**txn_id));
@@ -979,7 +979,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
list_for_each_entry (brickinfo, &volinfo->bricks,
brick_list) {
/* Check for local brick */
- if (!uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (!gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
trash_path = gf_strdup (brickinfo->path);
strcat(trash_path, "/");
strcat(trash_path, value);
@@ -2612,7 +2612,7 @@ glusterd_aggregate_task_status (dict_t *rsp_dict, glusterd_volinfo_t *volinfo)
this = THIS;
GF_ASSERT (this);
- if (!uuid_is_null (volinfo->rebal.rebalance_id)) {
+ if (!gf_uuid_is_null (volinfo->rebal.rebalance_id)) {
ret = _add_task_to_dict (rsp_dict, volinfo, volinfo->rebal.op,
tasks);
if (ret) {
@@ -2623,7 +2623,7 @@ glusterd_aggregate_task_status (dict_t *rsp_dict, glusterd_volinfo_t *volinfo)
tasks++;
}
- if (!uuid_is_null (volinfo->rep_brick.rb_id)) {
+ if (!gf_uuid_is_null (volinfo->rep_brick.rb_id)) {
ret = _add_task_to_dict (rsp_dict, volinfo, GD_OP_REPLACE_BRICK,
tasks);
if (ret) {
@@ -2752,7 +2752,7 @@ glusterd_op_status_volume (dict_t *dict, char **op_errstr,
if (ret)
goto out;
- if (uuid_compare (brickinfo->uuid, MY_UUID))
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID))
goto out;
glusterd_add_brick_to_dict (volinfo, brickinfo, rsp_dict,
@@ -2771,7 +2771,7 @@ glusterd_op_status_volume (dict_t *dict, char **op_errstr,
cds_list_for_each_entry (brickinfo, &volinfo->bricks,
brick_list) {
brick_index++;
- if (uuid_compare (brickinfo->uuid, MY_UUID))
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID))
continue;
glusterd_add_brick_to_dict (volinfo, brickinfo,
@@ -3649,7 +3649,7 @@ glusterd_op_start_rb_timer (dict_t *dict, uuid_t *txn_id)
if (!rb_txn_id)
goto out;
- uuid_copy (*rb_txn_id, *txn_id);
+ gf_uuid_copy (*rb_txn_id, *txn_id);
timeout.tv_sec = 5;
timeout.tv_nsec = 0;
@@ -3712,7 +3712,7 @@ glusterd_op_volume_dict_uuid_to_hostname (dict_t *dict, const char *key_fmt,
gf_log (this->name, GF_LOG_DEBUG, "Got uuid %s",
uuid_str);
- ret = uuid_parse (uuid_str, uuid);
+ ret = gf_uuid_parse (uuid_str, uuid);
/* if parsing fails don't error out
* let the original value be retained
*/
@@ -4636,7 +4636,7 @@ glusterd_op_ac_stage_op (glusterd_op_sm_event_t *event, void *ctx)
txn_id = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
if (txn_id)
- uuid_copy (*txn_id, event->txn_id);
+ gf_uuid_copy (*txn_id, event->txn_id);
else {
ret = -1;
goto out;
@@ -4748,7 +4748,7 @@ glusterd_op_ac_commit_op (glusterd_op_sm_event_t *event, void *ctx)
txn_id = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
if (txn_id)
- uuid_copy (*txn_id, event->txn_id);
+ gf_uuid_copy (*txn_id, event->txn_id);
else {
ret = -1;
goto out;
@@ -5445,7 +5445,7 @@ get_replica_index_for_per_replica_cmd (glusterd_volinfo_t *volinfo,
replica_count = volinfo->replica_count;
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (uuid_is_null (brickinfo->uuid))
+ if (gf_uuid_is_null (brickinfo->uuid))
(void)glusterd_resolve_brick (brickinfo);
if (!strcmp (brickinfo->path, path) &&
!strcmp (brickinfo->hostname, hostname)) {
@@ -5483,10 +5483,10 @@ _select_hxlator_with_matching_brick (xlator_t *this,
hxl_children = _get_hxl_children_count (volinfo);
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (uuid_is_null (brickinfo->uuid))
+ if (gf_uuid_is_null (brickinfo->uuid))
(void)glusterd_resolve_brick (brickinfo);
- if (!uuid_compare (MY_UUID, brickinfo->uuid)) {
+ if (!gf_uuid_compare (MY_UUID, brickinfo->uuid)) {
_add_hxlator_to_dict (dict, volinfo,
(index - 1)/hxl_children, 0);
return 1;
@@ -5512,10 +5512,10 @@ _select_hxlators_with_local_bricks (xlator_t *this, glusterd_volinfo_t *volinfo,
hxl_children = _get_hxl_children_count (volinfo);
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (uuid_is_null (brickinfo->uuid))
+ if (gf_uuid_is_null (brickinfo->uuid))
(void)glusterd_resolve_brick (brickinfo);
- if (!uuid_compare (MY_UUID, brickinfo->uuid))
+ if (!gf_uuid_compare (MY_UUID, brickinfo->uuid))
add = _gf_true;
if (index % hxl_children == 0) {
@@ -5554,20 +5554,20 @@ _select_hxlators_for_full_self_heal (xlator_t *this,
}
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (uuid_is_null (brickinfo->uuid))
+ if (gf_uuid_is_null (brickinfo->uuid))
(void)glusterd_resolve_brick (brickinfo);
- if (uuid_compare (brickinfo->uuid, candidate) > 0)
- uuid_copy (candidate, brickinfo->uuid);
+ if (gf_uuid_compare (brickinfo->uuid, candidate) > 0)
+ gf_uuid_copy (candidate, brickinfo->uuid);
if (index % hxl_children == 0) {
- if (!uuid_compare (MY_UUID, candidate)) {
+ if (!gf_uuid_compare (MY_UUID, candidate)) {
_add_hxlator_to_dict (dict, volinfo,
(index-1)/hxl_children,
hxlator_count);
hxlator_count++;
}
- uuid_clear (candidate);
+ gf_uuid_clear (candidate);
}
index++;
@@ -5606,7 +5606,7 @@ glusterd_bricks_select_snap (dict_t *dict, char **op_errstr,
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
brick_index++;
- if (uuid_compare (brickinfo->uuid, MY_UUID) ||
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID) ||
!glusterd_is_brick_started (brickinfo)) {
continue;
}
@@ -5658,10 +5658,10 @@ fill_shd_status_for_local_bricks (dict_t *dict, glusterd_volinfo_t *volinfo,
}
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (uuid_is_null (brickinfo->uuid))
+ if (gf_uuid_is_null (brickinfo->uuid))
(void)glusterd_resolve_brick (brickinfo);
- if (uuid_compare (MY_UUID, brickinfo->uuid)) {
+ if (gf_uuid_compare (MY_UUID, brickinfo->uuid)) {
index++;
continue;
}
@@ -5950,7 +5950,7 @@ glusterd_bricks_select_status_volume (dict_t *dict, char **op_errstr,
if (ret)
goto out;
- if (uuid_compare (brickinfo->uuid, MY_UUID)||
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID)||
!glusterd_is_brick_started (brickinfo))
goto out;
@@ -6049,7 +6049,7 @@ glusterd_bricks_select_status_volume (dict_t *dict, char **op_errstr,
cds_list_for_each_entry (brickinfo, &volinfo->bricks,
brick_list) {
brick_index++;
- if (uuid_compare (brickinfo->uuid, MY_UUID) ||
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID) ||
!glusterd_is_brick_started (brickinfo)) {
continue;
}
@@ -6101,7 +6101,7 @@ glusterd_bricks_select_barrier (dict_t *dict, struct cds_list_head *selected)
}
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (uuid_compare (brickinfo->uuid, MY_UUID) ||
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID) ||
!glusterd_is_brick_started (brickinfo)) {
continue;
}
@@ -6143,7 +6143,7 @@ glusterd_op_ac_send_brick_op (glusterd_op_sm_event_t *event, void *ctx)
gf_gld_mt_op_allack_ctx_t);
op = glusterd_op_get_op ();
req_ctx->op = op;
- uuid_copy (req_ctx->uuid, MY_UUID);
+ gf_uuid_copy (req_ctx->uuid, MY_UUID);
ret = glusterd_op_build_payload (&req_ctx->dict, &op_errstr,
NULL);
if (ret) {
@@ -6618,7 +6618,7 @@ glusterd_op_sm_inject_event (glusterd_op_sm_event_type_t event_type,
event->ctx = ctx;
if (txn_id)
- uuid_copy (event->txn_id, *txn_id);
+ gf_uuid_copy (event->txn_id, *txn_id);
gf_log (THIS->name, GF_LOG_DEBUG, "Enqueue event: '%s'",
glusterd_op_sm_event_name_get (event->event));
diff --git a/xlators/mgmt/glusterd/src/glusterd-peer-utils.c b/xlators/mgmt/glusterd/src/glusterd-peer-utils.c
index 046142b36df..5f098839398 100644
--- a/xlators/mgmt/glusterd/src/glusterd-peer-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-peer-utils.c
@@ -151,10 +151,10 @@ glusterd_hostname_to_uuid (char *hostname, uuid_t uuid)
peerinfo = glusterd_peerinfo_find_by_hostname (hostname);
if (peerinfo) {
ret = 0;
- uuid_copy (uuid, peerinfo->uuid);
+ gf_uuid_copy (uuid, peerinfo->uuid);
} else {
if (gf_is_local_addr (hostname)) {
- uuid_copy (uuid, MY_UUID);
+ gf_uuid_copy (uuid, MY_UUID);
ret = 0;
} else {
ret = -1;
@@ -184,12 +184,12 @@ glusterd_peerinfo_find_by_uuid (uuid_t uuid)
GF_ASSERT (priv);
- if (uuid_is_null (uuid))
+ if (gf_uuid_is_null (uuid))
return NULL;
rcu_read_lock ();
cds_list_for_each_entry_rcu (entry, &priv->peers, uuid_list) {
- if (!uuid_compare (entry->uuid, uuid)) {
+ if (!gf_uuid_compare (entry->uuid, uuid)) {
gf_log (this->name, GF_LOG_DEBUG,
"Friend found... state: %s",
@@ -282,7 +282,7 @@ glusterd_peerinfo_new (glusterd_friend_sm_state_t state, uuid_t *uuid,
}
if (uuid) {
- uuid_copy (new_peer->uuid, *uuid);
+ gf_uuid_copy (new_peer->uuid, *uuid);
}
ret = glusterd_sm_tr_log_init (&new_peer->sm_log,
@@ -321,7 +321,7 @@ glusterd_chk_peers_connected_befriended (uuid_t skip_uuid)
rcu_read_lock ();
cds_list_for_each_entry_rcu (peerinfo, &priv->peers, uuid_list) {
- if (!uuid_is_null (skip_uuid) && !uuid_compare (skip_uuid,
+ if (!gf_uuid_is_null (skip_uuid) && !gf_uuid_compare (skip_uuid,
peerinfo->uuid))
continue;
@@ -351,13 +351,13 @@ glusterd_uuid_to_hostname (uuid_t uuid)
priv = THIS->private;
GF_ASSERT (priv);
- if (!uuid_compare (MY_UUID, uuid)) {
+ if (!gf_uuid_compare (MY_UUID, uuid)) {
hostname = gf_strdup ("localhost");
}
rcu_read_lock ();
if (!cds_list_empty (&priv->peers)) {
cds_list_for_each_entry_rcu (entry, &priv->peers, uuid_list) {
- if (!uuid_compare (entry->uuid, uuid)) {
+ if (!gf_uuid_compare (entry->uuid, uuid)) {
hostname = gf_strdup (entry->hostname);
break;
}
@@ -371,7 +371,7 @@ glusterd_uuid_to_hostname (uuid_t uuid)
char*
gd_peer_uuid_str (glusterd_peerinfo_t *peerinfo)
{
- if ((peerinfo == NULL) || uuid_is_null (peerinfo->uuid))
+ if ((peerinfo == NULL) || gf_uuid_is_null (peerinfo->uuid))
return NULL;
if (peerinfo->uuid_str[0] == '\0')
@@ -390,12 +390,12 @@ glusterd_are_vol_all_peers_up (glusterd_volinfo_t *volinfo,
gf_boolean_t ret = _gf_false;
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (!uuid_compare (brickinfo->uuid, MY_UUID))
+ if (!gf_uuid_compare (brickinfo->uuid, MY_UUID))
continue;
rcu_read_lock ();
cds_list_for_each_entry_rcu (peerinfo, peers, uuid_list) {
- if (uuid_compare (peerinfo->uuid, brickinfo->uuid))
+ if (gf_uuid_compare (peerinfo->uuid, brickinfo->uuid))
continue;
/*Found peer who owns the brick, return false
@@ -828,7 +828,7 @@ gd_peerinfo_from_dict (dict_t *dict, const char *prefix)
"dictionary", key);
goto out;
}
- uuid_parse (uuid_str, new_peer->uuid);
+ gf_uuid_parse (uuid_str, new_peer->uuid);
ret = gd_update_peerinfo_from_dict (new_peer, dict, prefix);
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index 9179bf63ba9..08e5d97a26b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -554,7 +554,7 @@ glusterd_find_gfid_match (uuid_t gfid, unsigned char *buf, size_t bytes_read,
while (gfid_index != bytes_read) {
memcpy ((void *)tmp_buf, (void *)&buf[gfid_index], 16);
- if (!uuid_compare (gfid, tmp_buf)) {
+ if (!gf_uuid_compare (gfid, tmp_buf)) {
if (opcode == GF_QUOTA_OPTION_TYPE_REMOVE) {
shift_count = bytes_read - (gfid_index + 16);
memmove ((void *)&buf[gfid_index],
@@ -674,7 +674,7 @@ glusterd_store_quota_config (glusterd_volinfo_t *volinfo, char *path,
ret = -1;
goto out;
}
- uuid_parse (gfid_str, gfid);
+ gf_uuid_parse (gfid_str, gfid);
for (;;) {
bytes_read = read (conf_fd, (void*)&buf, entry_sz);
@@ -1251,7 +1251,7 @@ glusterd_get_gfid_from_brick (dict_t *dict, glusterd_volinfo_t *volinfo,
goto out;
}
- if (uuid_compare (brickinfo->uuid, MY_UUID))
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID))
continue;
if (brickinfo->vg[0])
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index 5a46410cf1d..ad7038b0e51 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -702,7 +702,7 @@ glusterd_op_rebalance (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
if (cmd == GF_DEFRAG_CMD_STATUS ||
cmd == GF_DEFRAG_CMD_STOP ||
cmd == GF_DEFRAG_CMD_STATUS_TIER) {
- if (!uuid_is_null (volinfo->rebal.rebalance_id)) {
+ if (!gf_uuid_is_null (volinfo->rebal.rebalance_id)) {
ctx = glusterd_op_get_ctx ();
if (!ctx) {
gf_log (this->name, GF_LOG_ERROR,
@@ -744,7 +744,7 @@ glusterd_op_rebalance (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
"id");
ret = 0;
} else {
- uuid_parse (task_id_str, volinfo->rebal.rebalance_id) ;
+ gf_uuid_parse (task_id_str, volinfo->rebal.rebalance_id) ;
volinfo->rebal.op = GD_OP_REBALANCE;
}
if (!gd_should_i_start_rebalance (volinfo)) {
@@ -767,7 +767,7 @@ glusterd_op_rebalance (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
* Also clear the stored operation, so it doesn't cause trouble
* with future rebalance/remove-brick starts
*/
- uuid_clear (volinfo->rebal.rebalance_id);
+ gf_uuid_clear (volinfo->rebal.rebalance_id);
volinfo->rebal.op = GD_OP_NONE;
/* Fall back to the old volume file in case of decommission*/
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index 3098761c2b3..92cfcd2fa95 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -1682,7 +1682,7 @@ glusterd_op_replace_brick (dict_t *dict, dict_t *rsp_dict)
ret = -1;
goto out;
}
- if (!uuid_is_null (volinfo->rep_brick.rb_id)) {
+ if (!gf_uuid_is_null (volinfo->rep_brick.rb_id)) {
ret = glusterd_copy_uuid_to_dict
(volinfo->rep_brick.rb_id, ctx,
GF_REPLACE_BRICK_TID_KEY);
@@ -1709,7 +1709,7 @@ glusterd_op_replace_brick (dict_t *dict, dict_t *rsp_dict)
"Missing replace-brick-id");
ret = 0;
} else {
- uuid_parse (task_id_str, volinfo->rep_brick.rb_id);
+ gf_uuid_parse (task_id_str, volinfo->rep_brick.rb_id);
}
if (gf_is_local_addr (dst_brickinfo->hostname)) {
@@ -1815,7 +1815,7 @@ glusterd_op_replace_brick (dict_t *dict, dict_t *rsp_dict)
glusterd_brickinfo_delete (volinfo->rep_brick.dst_brick);
volinfo->rep_brick.src_brick = NULL;
volinfo->rep_brick.dst_brick = NULL;
- uuid_clear (volinfo->rep_brick.rb_id);
+ gf_uuid_clear (volinfo->rep_brick.rb_id);
}
break;
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index 655f4b07f56..59b0e5f072e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -292,7 +292,7 @@ __glusterd_probe_cbk (struct rpc_req *req, struct iovec *iov,
* command was used to begin the probe process.
*/
if ((conf->op_version >= GD_OP_VERSION_3_6_0) &&
- (uuid_compare (rsp.uuid, peerinfo->uuid) == 0)) {
+ (gf_uuid_compare (rsp.uuid, peerinfo->uuid) == 0)) {
ctx = ((call_frame_t *)myframe)->local;
/* Presence of ctx->req implies this probe was started by a cli
* probe command
@@ -322,7 +322,7 @@ __glusterd_probe_cbk (struct rpc_req *req, struct iovec *iov,
&event);
if (!ret) {
event->peername = gf_strdup (peerinfo->hostname);
- uuid_copy (event->peerid, peerinfo->uuid);
+ gf_uuid_copy (event->peerid, peerinfo->uuid);
ret = glusterd_friend_sm_inject_event (event);
}
@@ -379,7 +379,7 @@ reply:
}
cont:
- uuid_copy (peerinfo->uuid, rsp.uuid);
+ gf_uuid_copy (peerinfo->uuid, rsp.uuid);
ret = glusterd_friend_sm_new_event
(GD_FRIEND_EVENT_INIT_FRIEND_REQ, &event);
@@ -391,7 +391,7 @@ cont:
}
event->peername = gf_strdup (peerinfo->hostname);
- uuid_copy (event->peerid, peerinfo->uuid);
+ gf_uuid_copy (event->peerid, peerinfo->uuid);
event->ctx = ((call_frame_t *)myframe)->local;
((call_frame_t *)myframe)->local = NULL;
@@ -492,11 +492,11 @@ __glusterd_friend_add_cbk (struct rpc_req * req, struct iovec *iov,
goto unlock;
}
- uuid_copy (ev_ctx->uuid, rsp.uuid);
+ gf_uuid_copy (ev_ctx->uuid, rsp.uuid);
ev_ctx->hostname = gf_strdup (rsp.hostname);
event->peername = gf_strdup (peerinfo->hostname);
- uuid_copy (event->peerid, peerinfo->uuid);
+ gf_uuid_copy (event->peerid, peerinfo->uuid);
event->ctx = ev_ctx;
ret = glusterd_friend_sm_inject_event (event);
@@ -596,7 +596,7 @@ inject:
goto unlock;
}
event->peername = gf_strdup (peerinfo->hostname);
- uuid_copy (event->peerid, peerinfo->uuid);
+ gf_uuid_copy (event->peerid, peerinfo->uuid);
ret = glusterd_friend_sm_inject_event (event);
@@ -1408,7 +1408,7 @@ glusterd_rpc_probe (call_frame_t *frame, xlator_t *this,
if (ret)
goto out;
- uuid_copy (req.uuid, MY_UUID);
+ gf_uuid_copy (req.uuid, MY_UUID);
req.hostname = gf_strdup (hostname);
req.port = port;
@@ -1457,7 +1457,7 @@ glusterd_rpc_friend_add (call_frame_t *frame, xlator_t *this,
goto out;
}
- uuid_copy (req.uuid, MY_UUID);
+ gf_uuid_copy (req.uuid, MY_UUID);
req.hostname = gf_strdup (peerinfo->hostname);
req.port = peerinfo->port;
@@ -1542,7 +1542,7 @@ glusterd_rpc_friend_remove (call_frame_t *frame, xlator_t *this,
goto out;
}
- uuid_copy (req.uuid, MY_UUID);
+ gf_uuid_copy (req.uuid, MY_UUID);
req.hostname = gf_strdup (peerinfo->hostname);
req.port = peerinfo->port;
@@ -1590,7 +1590,7 @@ glusterd_rpc_friend_update (call_frame_t *frame, xlator_t *this,
if (ret)
goto out;
- uuid_copy (req.uuid, MY_UUID);
+ gf_uuid_copy (req.uuid, MY_UUID);
dummy_frame = create_frame (this, this->ctx->pool);
ret = glusterd_submit_request (peerinfo->rpc, &req, dummy_frame,
@@ -1686,7 +1686,7 @@ glusterd_mgmt_v3_lock_peers (call_frame_t *frame, xlator_t *this,
} else {
gf_log (this->name, GF_LOG_DEBUG,
"Transaction_id = %s", uuid_utoa (*txn_id));
- uuid_copy (req.txn_id, *txn_id);
+ gf_uuid_copy (req.txn_id, *txn_id);
}
if (!frame)
@@ -1701,7 +1701,7 @@ glusterd_mgmt_v3_lock_peers (call_frame_t *frame, xlator_t *this,
ret = -1;
goto out;
}
- uuid_copy (frame->cookie, req.txn_id);
+ gf_uuid_copy (frame->cookie, req.txn_id);
ret = glusterd_submit_request (peerinfo->rpc, &req, frame,
peerinfo->mgmt_v3,
@@ -1759,7 +1759,7 @@ glusterd_mgmt_v3_unlock_peers (call_frame_t *frame, xlator_t *this,
} else {
gf_log (this->name, GF_LOG_DEBUG,
"Transaction_id = %s", uuid_utoa (*txn_id));
- uuid_copy (req.txn_id, *txn_id);
+ gf_uuid_copy (req.txn_id, *txn_id);
}
if (!frame)
@@ -1774,7 +1774,7 @@ glusterd_mgmt_v3_unlock_peers (call_frame_t *frame, xlator_t *this,
ret = -1;
goto out;
}
- uuid_copy (frame->cookie, req.txn_id);
+ gf_uuid_copy (frame->cookie, req.txn_id);
ret = glusterd_submit_request (peerinfo->rpc, &req, frame,
peerinfo->mgmt_v3,
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c
index 9de701ed6bf..2ea473aeb16 100644
--- a/xlators/mgmt/glusterd/src/glusterd-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.c
@@ -252,7 +252,7 @@ glusterd_ac_reverse_probe_begin (glusterd_friend_sm_event_t *event, void *ctx)
new_ev_ctx->req = NULL;
new_event->peername = gf_strdup (peerinfo->hostname);
- uuid_copy (new_event->peerid, peerinfo->uuid);
+ gf_uuid_copy (new_event->peerid, peerinfo->uuid);
new_event->ctx = new_ev_ctx;
ret = glusterd_friend_sm_inject_event (new_event);
@@ -438,7 +438,7 @@ glusterd_ac_send_friend_remove_req (glusterd_friend_sm_event_t *event,
if (!ret) {
new_event->peername = peerinfo->hostname;
- uuid_copy (new_event->peerid, peerinfo->uuid);
+ gf_uuid_copy (new_event->peerid, peerinfo->uuid);
ret = glusterd_friend_sm_inject_event (new_event);
} else {
gf_log ("glusterd", GF_LOG_ERROR,
@@ -646,7 +646,7 @@ glusterd_ac_handle_friend_remove_req (glusterd_friend_sm_event_t *event,
}
new_event->peername = gf_strdup (peerinfo->hostname);
- uuid_copy (new_event->peerid, peerinfo->uuid);
+ gf_uuid_copy (new_event->peerid, peerinfo->uuid);
ret = glusterd_friend_sm_inject_event (new_event);
if (ret) {
@@ -739,7 +739,7 @@ glusterd_ac_handle_friend_add_req (glusterd_friend_sm_event_t *event, void *ctx)
GF_ASSERT (ctx);
ev_ctx = ctx;
- uuid_copy (uuid, ev_ctx->uuid);
+ gf_uuid_copy (uuid, ev_ctx->uuid);
rcu_read_lock ();
peerinfo = glusterd_peerinfo_find (event->peerid, event->peername);
@@ -755,7 +755,7 @@ glusterd_ac_handle_friend_add_req (glusterd_friend_sm_event_t *event, void *ctx)
/* TODO: Updating within a read-critical section is also invalid
* Update properly with updater synchronization
*/
- uuid_copy (peerinfo->uuid, ev_ctx->uuid);
+ gf_uuid_copy (peerinfo->uuid, ev_ctx->uuid);
rcu_read_unlock ();
@@ -822,7 +822,7 @@ glusterd_ac_handle_friend_add_req (glusterd_friend_sm_event_t *event, void *ctx)
}
new_event->peername = gf_strdup (event->peername);
- uuid_copy (new_event->peerid, event->peerid);
+ gf_uuid_copy (new_event->peerid, event->peerid);
new_ev_ctx = GF_CALLOC (1, sizeof (*new_ev_ctx),
gf_gld_mt_friend_update_ctx_t);
@@ -831,7 +831,7 @@ glusterd_ac_handle_friend_add_req (glusterd_friend_sm_event_t *event, void *ctx)
goto out;
}
- uuid_copy (new_ev_ctx->uuid, ev_ctx->uuid);
+ gf_uuid_copy (new_ev_ctx->uuid, ev_ctx->uuid);
new_ev_ctx->hostname = gf_strdup (ev_ctx->hostname);
new_ev_ctx->op = GD_FRIEND_UPDATE_ADD;
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
index 404866dff14..8819f69c594 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
@@ -177,7 +177,7 @@ glusterd_snap_volinfo_restore (dict_t *dict, dict_t *rsp_dict,
/* If the brick is not of this peer, or snapshot is missed *
* for the brick do not replace the xattr for it */
- if ((!uuid_compare (brickinfo->uuid, MY_UUID)) &&
+ if ((!gf_uuid_compare (brickinfo->uuid, MY_UUID)) &&
(brickinfo->snap_status != -1)) {
/* We need to replace the volume id of all the bricks
* to the volume id of the origin volume. new_volinfo
@@ -264,14 +264,14 @@ glusterd_snap_volinfo_find_by_volume_id (uuid_t volume_id,
GF_ASSERT (priv);
GF_ASSERT (volinfo);
- if (uuid_is_null(volume_id)) {
+ if (gf_uuid_is_null(volume_id)) {
gf_log (this->name, GF_LOG_WARNING, "Volume UUID is NULL");
goto out;
}
cds_list_for_each_entry (snap, &priv->snapshots, snap_list) {
cds_list_for_each_entry (voliter, &snap->volumes, vol_list) {
- if (uuid_compare (volume_id, voliter->volume_id))
+ if (gf_uuid_compare (volume_id, voliter->volume_id))
continue;
*volinfo = voliter;
ret = 0;
@@ -606,7 +606,7 @@ glusterd_add_snap_to_dict (glusterd_snap_t *snap, dict_t *peer_data,
cds_list_for_each_entry (brickinfo, &volinfo->bricks,
brick_list) {
- if (!uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (!gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
host_bricks = _gf_true;
break;
}
@@ -856,7 +856,7 @@ gd_import_volume_snap_details (dict_t *dict, glusterd_volinfo_t *volinfo,
goto out;
}
- uuid_parse (restored_snap, volinfo->restored_from_snap);
+ gf_uuid_parse (restored_snap, volinfo->restored_from_snap);
memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "%s.snap-max-hard-limit", prefix);
@@ -923,7 +923,7 @@ glusterd_perform_missed_op (glusterd_snap_t *snap, int32_t op)
}
volinfo->version--;
- uuid_copy (volinfo->restored_from_snap, null_uuid);
+ gf_uuid_copy (volinfo->restored_from_snap, null_uuid);
/* gd_restore_snap_volume() uses the dict and volcount
* to fetch snap brick info from other nodes, which were
@@ -945,7 +945,7 @@ glusterd_perform_missed_op (glusterd_snap_t *snap, int32_t op)
/* Restore is successful therefore delete the original
* volume's volinfo. If the volinfo is already restored
* then we should delete the backend LVMs */
- if (!uuid_is_null (volinfo->restored_from_snap)) {
+ if (!gf_uuid_is_null (volinfo->restored_from_snap)) {
ret = glusterd_lvm_snapshot_remove (dict,
volinfo);
if (ret) {
@@ -1023,7 +1023,7 @@ glusterd_perform_missed_snap_ops ()
continue;
/* Find the snap id */
- uuid_parse (missed_snapinfo->snap_uuid, snap_uuid);
+ gf_uuid_parse (missed_snapinfo->snap_uuid, snap_uuid);
snap = NULL;
snap = glusterd_find_snap_by_id (snap_uuid);
if (!snap) {
@@ -1157,8 +1157,8 @@ glusterd_is_peer_snap_conflicting (char *peer_snap_name, char *peer_snap_id,
*snap = glusterd_find_snap_by_name (peer_snap_name);
if (*snap) {
- uuid_parse (peer_snap_id, peer_snap_uuid);
- if (!uuid_compare (peer_snap_uuid, (*snap)->snap_id)) {
+ gf_uuid_parse (peer_snap_id, peer_snap_uuid);
+ if (!gf_uuid_compare (peer_snap_uuid, (*snap)->snap_id)) {
/* Current node contains the same snap having
* the same snapname and snap_id
*/
@@ -1201,7 +1201,7 @@ glusterd_are_snap_bricks_local (glusterd_snap_t *snap)
cds_list_for_each_entry (volinfo, &snap->volumes, vol_list) {
cds_list_for_each_entry (brickinfo, &volinfo->bricks,
brick_list) {
- if (!uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (!gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
is_local = _gf_true;
goto out;
}
@@ -1377,7 +1377,7 @@ glusterd_import_friend_snap (dict_t *peer_data, int32_t snap_count,
}
strcpy (snap->snapname, peer_snap_name);
- uuid_parse (peer_snap_id, snap->snap_id);
+ gf_uuid_parse (peer_snap_id, snap->snap_id);
snprintf (buf, sizeof(buf), "%s.snapid", prefix);
ret = dict_get_str (peer_data, buf, &snap->description);
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index a596d3eb30c..f20a12b25d9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -163,7 +163,7 @@ glusterd_find_missed_snap (dict_t *rsp_dict, glusterd_volinfo_t *vol,
brick_count = 0;
cds_list_for_each_entry (brickinfo, &vol->bricks, brick_list) {
- if (!uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (!gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
/* If the brick belongs to the same node */
brick_count++;
continue;
@@ -171,7 +171,7 @@ glusterd_find_missed_snap (dict_t *rsp_dict, glusterd_volinfo_t *vol,
rcu_read_lock ();
cds_list_for_each_entry_rcu (peerinfo, peers, uuid_list) {
- if (uuid_compare (peerinfo->uuid, brickinfo->uuid)) {
+ if (gf_uuid_compare (peerinfo->uuid, brickinfo->uuid)) {
/* If the brick doesnt belong to this peer */
continue;
}
@@ -845,7 +845,7 @@ glusterd_snapshot_restore (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
/* Restore is successful therefore delete the original volume's
* volinfo. If the volinfo is already restored then we should
* delete the backend LVMs */
- if (!uuid_is_null (parent_volinfo->restored_from_snap)) {
+ if (!gf_uuid_is_null (parent_volinfo->restored_from_snap)) {
ret = glusterd_lvm_snapshot_remove (rsp_dict,
parent_volinfo);
if (ret) {
@@ -995,7 +995,7 @@ glusterd_snapshot_restore_prevalidate (dict_t *dict, char **op_errstr,
cds_list_for_each_entry (brickinfo, &volinfo->bricks,
brick_list) {
brick_count++;
- if (uuid_compare (brickinfo->uuid, MY_UUID))
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID))
continue;
snprintf (key, sizeof (key), "snap%d.brick%d.path",
@@ -1862,7 +1862,7 @@ glusterd_snap_create_clone_common_prevalidate (dict_t *rsp_dict, int flags,
cds_list_for_each_entry (brickinfo, &volinfo->bricks,
brick_list) {
- if (uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
brick_order++;
continue;
}
@@ -2387,11 +2387,11 @@ glusterd_find_snap_by_id (uuid_t snap_id)
priv = THIS->private;
GF_ASSERT (priv);
- if (uuid_is_null(snap_id))
+ if (gf_uuid_is_null(snap_id))
goto out;
cds_list_for_each_entry (snap, &priv->snapshots, snap_list) {
- if (!uuid_compare (snap->snap_id, snap_id)) {
+ if (!gf_uuid_compare (snap->snap_id, snap_id)) {
gf_log (THIS->name, GF_LOG_DEBUG, "Found "
"snap %s (%s)", snap->snapname,
uuid_utoa (snap->snap_id));
@@ -2529,7 +2529,7 @@ glusterd_lvm_snapshot_remove (dict_t *rsp_dict, glusterd_volinfo_t *snap_vol)
GF_ASSERT (snap_vol);
if ((snap_vol->is_snap_volume == _gf_false) &&
- (uuid_is_null (snap_vol->restored_from_snap))) {
+ (gf_uuid_is_null (snap_vol->restored_from_snap))) {
gf_log (this->name, GF_LOG_DEBUG,
"Not a snap volume, or a restored snap volume.");
ret = 0;
@@ -2539,7 +2539,7 @@ glusterd_lvm_snapshot_remove (dict_t *rsp_dict, glusterd_volinfo_t *snap_vol)
brick_count = -1;
cds_list_for_each_entry (brickinfo, &snap_vol->bricks, brick_list) {
brick_count++;
- if (uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
gf_log (this->name, GF_LOG_DEBUG,
"%s:%s belongs to a different node",
brickinfo->hostname, brickinfo->path);
@@ -2715,7 +2715,7 @@ glusterd_snap_volume_remove (dict_t *rsp_dict,
}
cds_list_for_each_entry (brickinfo, &snap_vol->bricks, brick_list) {
- if (uuid_compare (brickinfo->uuid, MY_UUID))
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID))
continue;
ret = glusterd_brick_stop (snap_vol, brickinfo, _gf_false);
@@ -3690,7 +3690,7 @@ glusterd_handle_snapshot_create (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_generate (*uuid_ptr);
+ gf_uuid_generate (*uuid_ptr);
ret = dict_set_bin (dict, "snap-id", uuid_ptr, sizeof(uuid_t));
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "Unable to set snap-id");
@@ -3709,7 +3709,7 @@ glusterd_handle_snapshot_create (rpcsvc_request_t *req, glusterd_op_t op,
}
/* generate internal username and password for the snap*/
- uuid_generate (tmp_uuid);
+ gf_uuid_generate (tmp_uuid);
username = gf_strdup (uuid_utoa (tmp_uuid));
snprintf (key, sizeof(key), "volume%d_username", i);
ret = dict_set_dynstr (dict, key, username);
@@ -3720,7 +3720,7 @@ glusterd_handle_snapshot_create (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_generate (tmp_uuid);
+ gf_uuid_generate (tmp_uuid);
password = gf_strdup (uuid_utoa (tmp_uuid));
snprintf (key, sizeof(key), "volume%d_password", i);
ret = dict_set_dynstr (dict, key, password);
@@ -3739,7 +3739,7 @@ glusterd_handle_snapshot_create (rpcsvc_request_t *req, glusterd_op_t op,
}
snprintf (key, sizeof(key) - 1, "vol%d_volid", i);
- uuid_generate (*uuid_ptr);
+ gf_uuid_generate (*uuid_ptr);
ret = dict_set_bin (dict, key, uuid_ptr, sizeof(uuid_t));
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
@@ -3876,7 +3876,7 @@ glusterd_handle_snapshot_clone (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_generate (*uuid_ptr);
+ gf_uuid_generate (*uuid_ptr);
ret = dict_set_bin (dict, "clone-id", uuid_ptr, sizeof(uuid_t));
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "Unable to set clone-id");
@@ -3892,7 +3892,7 @@ glusterd_handle_snapshot_clone (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_generate (tmp_uuid);
+ gf_uuid_generate (tmp_uuid);
username = gf_strdup (uuid_utoa (tmp_uuid));
snprintf (key, sizeof(key), "volume1_username");
ret = dict_set_dynstr (dict, key, username);
@@ -3903,7 +3903,7 @@ glusterd_handle_snapshot_clone (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_generate (tmp_uuid);
+ gf_uuid_generate (tmp_uuid);
password = gf_strdup (uuid_utoa (tmp_uuid));
snprintf (key, sizeof(key), "volume1_password");
ret = dict_set_dynstr (dict, key, password);
@@ -3922,7 +3922,7 @@ glusterd_handle_snapshot_clone (rpcsvc_request_t *req, glusterd_op_t op,
}
snprintf (key, sizeof(key) - 1, "vol1_volid");
- uuid_generate (*uuid_ptr);
+ gf_uuid_generate (*uuid_ptr);
ret = dict_set_bin (dict, key, uuid_ptr, sizeof(uuid_t));
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
@@ -4088,7 +4088,7 @@ glusterd_create_snap_object (dict_t *dict, dict_t *rsp_dict)
cds_list_for_each_entry (snap, &priv->snapshots, snap_list) {
if (!strcmp (snap->snapname, snapname) ||
- !uuid_compare (snap->snap_id, *snap_id)) {
+ !gf_uuid_compare (snap->snap_id, *snap_id)) {
gf_log (THIS->name, GF_LOG_ERROR,
"Found duplicate snap %s (%s)",
snap->snapname, uuid_utoa (snap->snap_id));
@@ -4109,7 +4109,7 @@ glusterd_create_snap_object (dict_t *dict, dict_t *rsp_dict)
}
strcpy (snap->snapname, snapname);
- uuid_copy (snap->snap_id, *snap_id);
+ gf_uuid_copy (snap->snap_id, *snap_id);
snap->time_stamp = (time_t)time_stamp;
/* Set the status as GD_SNAP_STATUS_INIT and once the backend snapshot
is taken and snap is really ready to use, set the status to
@@ -4466,7 +4466,7 @@ glusterd_add_brick_to_snap_volume (dict_t *dict, dict_t *rsp_dict,
}
if ((snap_brickinfo->snap_status != -1) &&
- (!uuid_compare (original_brickinfo->uuid, MY_UUID)) &&
+ (!gf_uuid_compare (original_brickinfo->uuid, MY_UUID)) &&
(!glusterd_is_brick_started (original_brickinfo))) {
/* In case if the brick goes down after prevalidate. */
gf_log (this->name, GF_LOG_WARNING, "brick %s:%s is not"
@@ -4524,7 +4524,7 @@ glusterd_add_brick_to_snap_volume (dict_t *dict, dict_t *rsp_dict,
strcpy (snap_brickinfo->hostname, original_brickinfo->hostname);
strcpy (snap_brickinfo->path, snap_brick_path);
strcpy (snap_brickinfo->mount_dir, original_brickinfo->mount_dir);
- uuid_copy (snap_brickinfo->uuid, original_brickinfo->uuid);
+ gf_uuid_copy (snap_brickinfo->uuid, original_brickinfo->uuid);
/* AFR changelog names are based on brick_id and hence the snap
* volume's bricks must retain the same ID */
cds_list_add_tail (&snap_brickinfo->brick_list, &snap_vol->bricks);
@@ -4565,7 +4565,7 @@ glusterd_update_fs_label (glusterd_brickinfo_t *brickinfo)
GF_ASSERT (brickinfo);
/* Generate a new UUID */
- uuid_generate (uuid);
+ gf_uuid_generate (uuid);
GLUSTERD_GET_UUID_NOHYPHEN (label, uuid);
@@ -4753,7 +4753,7 @@ glusterd_do_snap_vol (glusterd_volinfo_t *origin_vol, glusterd_snap_t *snap,
/* uuid is used as lvm snapshot name.
This will avoid restrictions on snapshot names provided by user */
- uuid_copy (snap_vol->volume_id, *snap_volid);
+ gf_uuid_copy (snap_vol->volume_id, *snap_volid);
snap_vol->is_snap_volume = _gf_true;
snap_vol->snapshot = snap;
@@ -5824,9 +5824,9 @@ glusterd_schedule_brick_snapshot (dict_t *dict, dict_t *rsp_dict,
goto out;
}
- if ((uuid_compare (brickinfo->uuid, MY_UUID)) ||
+ if ((gf_uuid_compare (brickinfo->uuid, MY_UUID)) ||
(brickinfo->snap_status == -1)) {
- if (!uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (!gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
brickcount++;
snprintf (key, sizeof (key),
"snap-vol%d.brick%d.status",
@@ -5937,7 +5937,7 @@ glusterd_create_snap_object_for_clone (dict_t *dict, dict_t *rsp_dict)
}
strcpy (snap->snapname, snapname);
- uuid_copy (snap->snap_id, *snap_id);
+ gf_uuid_copy (snap->snap_id, *snap_id);
ret = 0;
@@ -8828,10 +8828,10 @@ gd_restore_snap_volume (dict_t *dict, dict_t *rsp_dict,
/* Following entries need to be derived from origin volume. */
strcpy (new_volinfo->volname, orig_vol->volname);
- uuid_copy (new_volinfo->volume_id, orig_vol->volume_id);
+ gf_uuid_copy (new_volinfo->volume_id, orig_vol->volume_id);
new_volinfo->snap_count = orig_vol->snap_count;
new_volinfo->snap_max_hard_limit = orig_vol->snap_max_hard_limit;
- uuid_copy (new_volinfo->restored_from_snap,
+ gf_uuid_copy (new_volinfo->restored_from_snap,
snap_vol->snapshot->snap_id);
/* Use the same version as the original version */
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index ce8bf1b203f..0e581b198a9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -1358,7 +1358,7 @@ glusterd_store_rbstate_write (int fd, glusterd_volinfo_t *volinfo)
buf);
if (ret)
goto out;
- uuid_unparse (volinfo->rep_brick.rb_id, buf);
+ gf_uuid_unparse (volinfo->rep_brick.rb_id, buf);
ret = gf_store_save_value (fd, GF_REPLACE_BRICK_TID_KEY, buf);
}
@@ -1440,7 +1440,7 @@ glusterd_store_node_state_write (int fd, glusterd_volinfo_t *volinfo)
if (ret)
goto out;
- uuid_unparse (volinfo->rebal.rebalance_id, buf);
+ gf_uuid_unparse (volinfo->rebal.rebalance_id, buf);
ret = gf_store_save_value (fd, GF_REBALANCE_TID_KEY, buf);
if (ret)
goto out;
@@ -2166,7 +2166,7 @@ glusterd_retrieve_uuid ()
goto out;
}
- uuid_parse (uuid_str, priv->uuid);
+ gf_uuid_parse (uuid_str, priv->uuid);
out:
GF_FREE (uuid_str);
@@ -2518,7 +2518,7 @@ glusterd_store_retrieve_rbstate (glusterd_volinfo_t *volinfo)
}
} else if (!strncmp (key, GF_REPLACE_BRICK_TID_KEY,
strlen (GF_REPLACE_BRICK_TID_KEY))) {
- uuid_parse (value,
+ gf_uuid_parse (value,
volinfo->rep_brick.rb_id);
}
}
@@ -2592,7 +2592,7 @@ glusterd_store_retrieve_node_state (glusterd_volinfo_t *volinfo)
volinfo->rebal.defrag_status = atoi (value);
} else if (!strncmp (key, GF_REBALANCE_TID_KEY,
strlen (GF_REBALANCE_TID_KEY))) {
- uuid_parse (value, volinfo->rebal.rebalance_id);
+ gf_uuid_parse (value, volinfo->rebal.rebalance_id);
} else if (!strncmp (key, GLUSTERD_STORE_KEY_DEFRAG_OP,
strlen (GLUSTERD_STORE_KEY_DEFRAG_OP))) {
volinfo->rebal.op = atoi (value);
@@ -2736,7 +2736,7 @@ glusterd_store_update_volinfo (glusterd_volinfo_t *volinfo)
volinfo->transport_type = atoi (value);
} else if (!strncmp (key, GLUSTERD_STORE_KEY_VOL_ID,
strlen (GLUSTERD_STORE_KEY_VOL_ID))) {
- ret = uuid_parse (value, volinfo->volume_id);
+ ret = gf_uuid_parse (value, volinfo->volume_id);
if (ret)
gf_log ("", GF_LOG_WARNING,
"failed to parse uuid");
@@ -2776,7 +2776,7 @@ glusterd_store_update_volinfo (glusterd_volinfo_t *volinfo)
volinfo->snap_max_hard_limit = (uint64_t) atoll (value);
} else if (!strncmp (key, GLUSTERD_STORE_KEY_VOL_RESTORED_SNAP,
strlen (GLUSTERD_STORE_KEY_VOL_RESTORED_SNAP))) {
- ret = uuid_parse (value, volinfo->restored_from_snap);
+ ret = gf_uuid_parse (value, volinfo->restored_from_snap);
if (ret)
gf_log (this->name, GF_LOG_WARNING,
"failed to parse restored snap's uuid");
@@ -3321,7 +3321,7 @@ glusterd_recreate_vol_brick_mounts (xlator_t *this,
* snapshot is pending, or the brick is not
* a snapshotted brick, we continue
*/
- if ((uuid_compare (brickinfo->uuid, MY_UUID)) ||
+ if ((gf_uuid_compare (brickinfo->uuid, MY_UUID)) ||
(brickinfo->snap_status == -1) ||
(strlen(brickinfo->device_path) == 0))
continue;
@@ -3461,7 +3461,7 @@ glusterd_store_update_snap (glusterd_snap_t *snap)
if (!strncmp (key, GLUSTERD_STORE_KEY_SNAP_ID,
strlen (GLUSTERD_STORE_KEY_SNAP_ID))) {
- ret = uuid_parse (value, snap->snap_id);
+ ret = gf_uuid_parse (value, snap->snap_id);
if (ret)
gf_log (this->name, GF_LOG_WARNING,
"Failed to parse uuid");
@@ -3826,7 +3826,7 @@ glusterd_store_delete_peerinfo (glusterd_peerinfo_t *peerinfo)
snprintf (peerdir, PATH_MAX, "%s/peers", priv->workdir);
- if (uuid_is_null (peerinfo->uuid)) {
+ if (gf_uuid_is_null (peerinfo->uuid)) {
if (peerinfo->hostname) {
snprintf (filepath, PATH_MAX, "%s/%s", peerdir,
@@ -3898,7 +3898,7 @@ glusterd_store_uuid_peerpath_set (glusterd_peerinfo_t *peerinfo, char *peerfpath
GF_ASSERT (len >= PATH_MAX);
glusterd_store_peerinfo_dirpath_set (peerdir, sizeof (peerdir));
- uuid_unparse (peerinfo->uuid, str);
+ gf_uuid_unparse (peerinfo->uuid, str);
snprintf (peerfpath, len, "%s/%s", peerdir, str);
}
@@ -3968,7 +3968,7 @@ glusterd_store_create_peer_shandle (glusterd_peerinfo_t *peerinfo)
GF_ASSERT (peerinfo);
- if (uuid_is_null (peerinfo->uuid)) {
+ if (gf_uuid_is_null (peerinfo->uuid)) {
ret = glusterd_store_peerinfo_hostname_shandle_create (peerinfo);
} else {
ret = glusterd_peerinfo_hostname_shandle_check_destroy (peerinfo);
@@ -4128,7 +4128,7 @@ glusterd_store_retrieve_peers (xlator_t *this)
if (!strncmp (GLUSTERD_STORE_KEY_PEER_UUID, key,
strlen (GLUSTERD_STORE_KEY_PEER_UUID))) {
if (value)
- uuid_parse (value, peerinfo->uuid);
+ gf_uuid_parse (value, peerinfo->uuid);
} else if (!strncmp (GLUSTERD_STORE_KEY_PEER_STATE,
key,
strlen (GLUSTERD_STORE_KEY_PEER_STATE))) {
@@ -4220,7 +4220,7 @@ glusterd_recreate_all_snap_brick_mounts (xlator_t *this)
/* Recreate bricks of volumes restored from snaps */
cds_list_for_each_entry (volinfo, &priv->volumes, vol_list) {
/* If the volume is not a restored volume then continue */
- if (uuid_is_null (volinfo->restored_from_snap))
+ if (gf_uuid_is_null (volinfo->restored_from_snap))
continue;
ret = glusterd_recreate_vol_brick_mounts (this, volinfo);
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 508a3883e6e..a00438e6d96 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -352,7 +352,7 @@ gd_syncop_mgmt_v3_lock_cbk_fn (struct rpc_req *req, struct iovec *iov,
if (ret < 0)
goto out;
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
op_ret = rsp.op_ret;
op_errno = rsp.op_errno;
@@ -393,8 +393,8 @@ gd_syncop_mgmt_v3_lock (glusterd_op_t op, dict_t *op_ctx,
if (ret)
goto out;
- uuid_copy (req.uuid, my_uuid);
- uuid_copy (req.txn_id, txn_id);
+ gf_uuid_copy (req.uuid, my_uuid);
+ gf_uuid_copy (req.txn_id, txn_id);
req.op = op;
synclock_unlock (&conf->big_lock);
ret = gd_syncop_submit_request (peerinfo->rpc, &req, args, peerinfo,
@@ -446,7 +446,7 @@ gd_syncop_mgmt_v3_unlock_cbk_fn (struct rpc_req *req, struct iovec *iov,
if (ret < 0)
goto out;
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
/* Set peer as locked, so we unlock only the locked peers */
if (rsp.op_ret == 0)
@@ -489,8 +489,8 @@ gd_syncop_mgmt_v3_unlock (dict_t *op_ctx, glusterd_peerinfo_t *peerinfo,
if (ret)
goto out;
- uuid_copy (req.uuid, my_uuid);
- uuid_copy (req.txn_id, txn_id);
+ gf_uuid_copy (req.uuid, my_uuid);
+ gf_uuid_copy (req.txn_id, txn_id);
synclock_unlock (&conf->big_lock);
ret = gd_syncop_submit_request (peerinfo->rpc, &req, args, peerinfo,
&gd_mgmt_v3_prog,
@@ -539,7 +539,7 @@ _gd_syncop_mgmt_lock_cbk (struct rpc_req *req, struct iovec *iov,
if (ret < 0)
goto out;
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
/* Set peer as locked, so we unlock only the locked peers */
if (rsp.op_ret == 0)
@@ -570,7 +570,7 @@ gd_syncop_mgmt_lock (glusterd_peerinfo_t *peerinfo, struct syncargs *args,
gd1_mgmt_cluster_lock_req req = {{0},};
glusterd_conf_t *conf = THIS->private;
- uuid_copy (req.uuid, my_uuid);
+ gf_uuid_copy (req.uuid, my_uuid);
synclock_unlock (&conf->big_lock);
ret = gd_syncop_submit_request (peerinfo->rpc, &req, args, peerinfo,
&gd_mgmt_prog,
@@ -615,7 +615,7 @@ _gd_syncop_mgmt_unlock_cbk (struct rpc_req *req, struct iovec *iov,
if (ret < 0)
goto out;
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
peerinfo->locked = _gf_false;
op_ret = rsp.op_ret;
@@ -645,7 +645,7 @@ gd_syncop_mgmt_unlock (glusterd_peerinfo_t *peerinfo, struct syncargs *args,
gd1_mgmt_cluster_unlock_req req = {{0},};
glusterd_conf_t *conf = THIS->private;
- uuid_copy (req.uuid, my_uuid);
+ gf_uuid_copy (req.uuid, my_uuid);
synclock_unlock (&conf->big_lock);
ret = gd_syncop_submit_request (peerinfo->rpc, &req, args, peerinfo,
&gd_mgmt_prog,
@@ -716,7 +716,7 @@ _gd_syncop_stage_op_cbk (struct rpc_req *req, struct iovec *iov,
goto out;
}
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
if (rsp.op == GD_OP_REPLACE_BRICK || rsp.op == GD_OP_QUOTA ||
rsp.op == GD_OP_CREATE_VOLUME || rsp.op == GD_OP_ADD_BRICK ||
rsp.op == GD_OP_START_VOLUME) {
@@ -769,7 +769,7 @@ gd_syncop_mgmt_stage_op (glusterd_peerinfo_t *peerinfo, struct syncargs *args,
if (!req)
goto out;
- uuid_copy (req->uuid, my_uuid);
+ gf_uuid_copy (req->uuid, my_uuid);
req->op = op;
ret = dict_allocate_and_serialize (dict_out,
@@ -986,7 +986,7 @@ _gd_syncop_commit_op_cbk (struct rpc_req *req, struct iovec *iov,
goto out;
}
- uuid_copy (args->uuid, rsp.uuid);
+ gf_uuid_copy (args->uuid, rsp.uuid);
if (rsp.op == GD_OP_QUOTA) {
ret = dict_get_int32 (args->dict, "type", &type);
if (ret) {
@@ -1046,7 +1046,7 @@ gd_syncop_mgmt_commit_op (glusterd_peerinfo_t *peerinfo, struct syncargs *args,
if (!req)
goto out;
- uuid_copy (req->uuid, my_uuid);
+ gf_uuid_copy (req->uuid, my_uuid);
req->op = op;
ret = dict_allocate_and_serialize (dict_out,
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 3195110ece6..59bfcdd535e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -101,14 +101,14 @@ static glusterd_lock_t lock;
int32_t
glusterd_get_lock_owner (uuid_t *uuid)
{
- uuid_copy (*uuid, lock.owner) ;
+ gf_uuid_copy (*uuid, lock.owner) ;
return 0;
}
static int32_t
glusterd_set_lock_owner (uuid_t owner)
{
- uuid_copy (lock.owner, owner);
+ gf_uuid_copy (lock.owner, owner);
//TODO: set timestamp
return 0;
}
@@ -116,7 +116,7 @@ glusterd_set_lock_owner (uuid_t owner)
static int32_t
glusterd_unset_lock_owner (uuid_t owner)
{
- uuid_clear (lock.owner);
+ gf_uuid_clear (lock.owner);
//TODO: set timestamp
return 0;
}
@@ -156,7 +156,7 @@ glusterd_lock (uuid_t uuid)
glusterd_get_lock_owner (&owner);
- if (!uuid_is_null (owner)) {
+ if (!gf_uuid_is_null (owner)) {
gf_log (this->name, GF_LOG_ERROR, "Unable to get lock"
" for uuid: %s, lock held by: %s",
uuid_utoa_r (uuid, new_owner_str),
@@ -192,12 +192,12 @@ glusterd_unlock (uuid_t uuid)
glusterd_get_lock_owner (&owner);
- if (uuid_is_null (owner)) {
+ if (gf_uuid_is_null (owner)) {
gf_log (this->name, GF_LOG_ERROR, "Cluster lock not held!");
goto out;
}
- ret = uuid_compare (uuid, owner);
+ ret = gf_uuid_compare (uuid, owner);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "Cluster lock held by %s ,"
@@ -230,7 +230,7 @@ glusterd_get_uuid (uuid_t *uuid)
GF_ASSERT (priv);
- uuid_copy (*uuid, MY_UUID);
+ gf_uuid_copy (*uuid, MY_UUID);
return 0;
}
@@ -614,7 +614,7 @@ glusterd_brickinfo_dup (glusterd_brickinfo_t *brickinfo,
"brick path");
goto out;
}
- uuid_copy (dup_brickinfo->uuid, brickinfo->uuid);
+ gf_uuid_copy (dup_brickinfo->uuid, brickinfo->uuid);
dup_brickinfo->port = brickinfo->port;
dup_brickinfo->rdma_port = brickinfo->rdma_port;
@@ -872,7 +872,7 @@ glusterd_get_brick_mount_dir (char *brickpath, char *hostname, char *mount_dir)
goto out;
}
- if (!uuid_compare (brick_uuid, MY_UUID)) {
+ if (!gf_uuid_compare (brick_uuid, MY_UUID)) {
ret = glusterd_get_brick_root (brickpath, &mnt_pt);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
@@ -1028,7 +1028,7 @@ glusterd_is_brickpath_available (uuid_t uuid, char *path)
cds_list_for_each_entry (volinfo, &priv->volumes, vol_list) {
cds_list_for_each_entry (brickinfo, &volinfo->bricks,
brick_list) {
- if (uuid_compare (uuid, brickinfo->uuid))
+ if (gf_uuid_compare (uuid, brickinfo->uuid))
continue;
if (!realpath (brickinfo->path, tmp_brickpath)) {
@@ -1225,7 +1225,7 @@ glusterd_volume_brickinfo_get (uuid_t uuid, char *hostname, char *path,
this = THIS;
if (uuid) {
- uuid_copy (peer_uuid, uuid);
+ gf_uuid_copy (peer_uuid, uuid);
} else {
ret = glusterd_hostname_to_uuid (hostname, peer_uuid);
if (ret)
@@ -1234,10 +1234,10 @@ glusterd_volume_brickinfo_get (uuid_t uuid, char *hostname, char *path,
ret = -1;
cds_list_for_each_entry (brickiter, &volinfo->bricks, brick_list) {
- if ((uuid_is_null (brickiter->uuid)) &&
+ if ((gf_uuid_is_null (brickiter->uuid)) &&
(glusterd_resolve_brick (brickiter) != 0))
goto out;
- if (uuid_compare (peer_uuid, brickiter->uuid))
+ if (gf_uuid_compare (peer_uuid, brickiter->uuid))
continue;
if (strcmp (brickiter->path, path) == 0) {
@@ -1312,7 +1312,7 @@ glusterd_volinfo_find_by_volume_id (uuid_t volume_id, glusterd_volinfo_t **volin
priv = this->private;
cds_list_for_each_entry (voliter, &priv->volumes, vol_list) {
- if (uuid_compare (volume_id, voliter->volume_id))
+ if (gf_uuid_compare (volume_id, voliter->volume_id))
continue;
*volinfo = voliter;
ret = 0;
@@ -2998,7 +2998,7 @@ glusterd_import_quota_conf (dict_t *peer_data, int vol_idx,
if (ret)
goto out;
- uuid_parse (gfid_str, gfid);
+ gf_uuid_parse (gfid_str, gfid);
ret = write (fd, (void*)gfid, 16);
if (ret != 16) {
gf_log (this->name, GF_LOG_CRITICAL, "Unable to write "
@@ -3234,7 +3234,7 @@ glusterd_import_volinfo (dict_t *peer_data, int count,
goto out;
}
- uuid_parse (volume_id_str, new_volinfo->volume_id);
+ gf_uuid_parse (volume_id_str, new_volinfo->volume_id);
memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "%s%d.username", prefix, count);
@@ -3281,7 +3281,7 @@ glusterd_import_volinfo (dict_t *peer_data, int count,
*/
ret = 0;
} else {
- uuid_parse (rebalance_id_str, new_volinfo->rebal.rebalance_id);
+ gf_uuid_parse (rebalance_id_str, new_volinfo->rebal.rebalance_id);
}
memset (key, 0, sizeof (key));
@@ -3350,7 +3350,7 @@ glusterd_import_volinfo (dict_t *peer_data, int count,
*/
ret = 0;
} else {
- uuid_parse (rb_id_str, new_volinfo->rep_brick.rb_id);
+ gf_uuid_parse (rb_id_str, new_volinfo->rep_brick.rb_id);
}
}
@@ -3549,8 +3549,8 @@ glusterd_delete_stale_volume (glusterd_volinfo_t *stale_volinfo,
valid_volinfo->snap_count++;
}
- if ((!uuid_is_null (stale_volinfo->restored_from_snap)) &&
- (uuid_compare (stale_volinfo->restored_from_snap,
+ if ((!gf_uuid_is_null (stale_volinfo->restored_from_snap)) &&
+ (gf_uuid_compare (stale_volinfo->restored_from_snap,
valid_volinfo->restored_from_snap))) {
ret = glusterd_lvm_snapshot_remove (NULL, stale_volinfo);
if (ret) {
@@ -3624,8 +3624,8 @@ gd_check_and_update_rebalance_info (glusterd_volinfo_t *old_volinfo,
rpc_transport_disconnect (old->defrag->rpc->conn.trans);
}
- if (!uuid_is_null (old->rebalance_id) &&
- uuid_compare (old->rebalance_id, new->rebalance_id)) {
+ if (!gf_uuid_is_null (old->rebalance_id) &&
+ gf_uuid_compare (old->rebalance_id, new->rebalance_id)) {
(void)gd_stop_rebalance_process (old_volinfo);
goto out;
}
@@ -4263,7 +4263,7 @@ glusterd_brick_start (glusterd_volinfo_t *volinfo,
if ((!brickinfo) || (!volinfo))
goto out;
- if (uuid_is_null (brickinfo->uuid)) {
+ if (gf_uuid_is_null (brickinfo->uuid)) {
ret = glusterd_resolve_brick (brickinfo);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, FMTSTR_RESOLVE_BRICK,
@@ -4272,7 +4272,7 @@ glusterd_brick_start (glusterd_volinfo_t *volinfo,
}
}
- if (uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
ret = 0;
goto out;
}
@@ -4618,14 +4618,14 @@ glusterd_friend_brick_belongs (glusterd_volinfo_t *volinfo,
GF_ASSERT (brickinfo);
GF_ASSERT (uuid);
- if (uuid_is_null (brickinfo->uuid)) {
+ if (gf_uuid_is_null (brickinfo->uuid)) {
ret = glusterd_resolve_brick (brickinfo);
if (ret) {
GF_ASSERT (0);
goto out;
}
}
- if (!uuid_compare (brickinfo->uuid, *((uuid_t *)uuid)))
+ if (!gf_uuid_compare (brickinfo->uuid, *((uuid_t *)uuid)))
return 0;
out:
return -1;
@@ -5221,7 +5221,7 @@ glusterd_brick_stop (glusterd_volinfo_t *volinfo,
if ((!brickinfo) || (!volinfo))
goto out;
- if (uuid_is_null (brickinfo->uuid)) {
+ if (gf_uuid_is_null (brickinfo->uuid)) {
ret = glusterd_resolve_brick (brickinfo);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, FMTSTR_RESOLVE_BRICK,
@@ -5230,7 +5230,7 @@ glusterd_brick_stop (glusterd_volinfo_t *volinfo,
}
}
- if (uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
ret = 0;
if (del_brick)
glusterd_delete_brick (volinfo, brickinfo);
@@ -5309,7 +5309,7 @@ glusterd_new_brick_validate (char *brick, glusterd_brickinfo_t *brickinfo,
goto out;
}
- if (!uuid_compare (MY_UUID, newbrickinfo->uuid)) {
+ if (!gf_uuid_compare (MY_UUID, newbrickinfo->uuid)) {
/* brick is local */
if (!glusterd_is_brickpath_available (newbrickinfo->uuid,
newbrickinfo->path)) {
@@ -5861,7 +5861,7 @@ glusterd_get_local_brickpaths (glusterd_volinfo_t *volinfo, char **pathlist)
}
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (uuid_compare (brickinfo->uuid, MY_UUID))
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID))
continue;
pathlen = snprintf (path, sizeof(path),
@@ -6193,7 +6193,7 @@ glusterd_brick_statedump (glusterd_volinfo_t *volinfo,
conf = this->private;
GF_ASSERT (conf);
- if (uuid_is_null (brickinfo->uuid)) {
+ if (gf_uuid_is_null (brickinfo->uuid)) {
ret = glusterd_resolve_brick (brickinfo);
if (ret) {
gf_log ("glusterd", GF_LOG_ERROR,
@@ -6203,7 +6203,7 @@ glusterd_brick_statedump (glusterd_volinfo_t *volinfo,
}
}
- if (uuid_compare (brickinfo->uuid, MY_UUID)) {
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
ret = 0;
goto out;
}
@@ -6417,7 +6417,7 @@ glusterd_friend_contains_vol_bricks (glusterd_volinfo_t *volinfo,
GF_ASSERT (volinfo);
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
- if (!uuid_compare (brickinfo->uuid, friend_uuid)) {
+ if (!gf_uuid_compare (brickinfo->uuid, friend_uuid)) {
count++;
}
}
@@ -6633,13 +6633,13 @@ glusterd_is_local_brick (xlator_t *this, glusterd_volinfo_t *volinfo,
int ret = 0;
glusterd_conf_t *conf = NULL;
- if (uuid_is_null (brickinfo->uuid)) {
+ if (gf_uuid_is_null (brickinfo->uuid)) {
ret = glusterd_resolve_brick (brickinfo);
if (ret)
goto out;
}
conf = this->private;
- local = !uuid_compare (brickinfo->uuid, MY_UUID);
+ local = !gf_uuid_compare (brickinfo->uuid, MY_UUID);
out:
return local;
}
@@ -6660,14 +6660,14 @@ glusterd_validate_volume_id (dict_t *op_dict, glusterd_volinfo_t *volinfo)
"volume %s", volinfo->volname);
goto out;
}
- ret = uuid_parse (volid_str, vol_uid);
+ ret = gf_uuid_parse (volid_str, vol_uid);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "Failed to parse volume id "
"for volume %s", volinfo->volname);
goto out;
}
- if (uuid_compare (vol_uid, volinfo->volume_id)) {
+ if (gf_uuid_compare (vol_uid, volinfo->volume_id)) {
gf_log (this->name, GF_LOG_ERROR, "Volume ids of volume %s - %s"
" and %s - are different. Possibly a split brain among "
"peers.", volinfo->volname, volid_str,
@@ -8477,7 +8477,7 @@ glusterd_set_originator_uuid (dict_t *dict)
goto out;
}
- uuid_copy (*originator_uuid, MY_UUID);
+ gf_uuid_copy (*originator_uuid, MY_UUID);
ret = dict_set_bin (dict, "originator_uuid",
originator_uuid, sizeof (uuid_t));
if (ret) {
@@ -8516,9 +8516,9 @@ is_origin_glusterd (dict_t *dict)
ret = _gf_false;
goto out;
}
- ret = !uuid_compare (MY_UUID, lock_owner);
+ ret = !gf_uuid_compare (MY_UUID, lock_owner);
} else
- ret = !uuid_compare (MY_UUID, *originator_uuid);
+ ret = !gf_uuid_compare (MY_UUID, *originator_uuid);
out:
return ret;
@@ -8537,7 +8537,7 @@ glusterd_generate_and_set_task_id (dict_t *dict, char *key)
this = THIS;
GF_ASSERT (this);
- uuid_generate (task_id);
+ gf_uuid_generate (task_id);
uuid_str = gf_strdup (uuid_utoa (task_id));
if (!uuid_str) {
ret = -1;
@@ -8569,7 +8569,7 @@ glusterd_copy_uuid_to_dict (uuid_t uuid, dict_t *dict, char *key)
GF_ASSERT (dict);
GF_ASSERT (key);
- uuid_unparse (uuid, tmp_str);
+ gf_uuid_unparse (uuid, tmp_str);
task_id_str = gf_strdup (tmp_str);
if (!task_id_str)
return -1;
@@ -8692,7 +8692,7 @@ gd_is_remove_brick_committed (glusterd_volinfo_t *volinfo)
GF_ASSERT (volinfo);
if ((GD_OP_REMOVE_BRICK == volinfo->rebal.op) &&
- !uuid_is_null (volinfo->rebal.rebalance_id))
+ !gf_uuid_is_null (volinfo->rebal.rebalance_id))
return _gf_false;
return _gf_true;
@@ -8747,7 +8747,7 @@ gd_should_i_start_rebalance (glusterd_volinfo_t *volinfo) {
switch (volinfo->rebal.op) {
case GD_OP_REBALANCE:
cds_list_for_each_entry (brick, &volinfo->bricks, brick_list) {
- if (uuid_compare (MY_UUID, brick->uuid) == 0) {
+ if (gf_uuid_compare (MY_UUID, brick->uuid) == 0) {
retval = _gf_true;
break;
}
@@ -8770,7 +8770,7 @@ gd_should_i_start_rebalance (glusterd_volinfo_t *volinfo) {
&brick);
if (ret)
goto out;
- if (uuid_compare (MY_UUID, brick->uuid) == 0) {
+ if (gf_uuid_compare (MY_UUID, brick->uuid) == 0) {
retval = _gf_true;
break;
}
@@ -8870,7 +8870,7 @@ glusterd_validate_and_set_gfid (dict_t *op_ctx, dict_t *req_dict,
goto out;
}
- uuid_parse (uuid1_str, uuid1);
+ gf_uuid_parse (uuid1_str, uuid1);
for (i = 1; i < count; i++) {
snprintf (key, sizeof (key)-1, "gfid%d", i);
@@ -8882,9 +8882,9 @@ glusterd_validate_and_set_gfid (dict_t *op_ctx, dict_t *req_dict,
goto out;
}
- uuid_parse (uuid2_str, uuid2);
+ gf_uuid_parse (uuid2_str, uuid2);
- if (uuid_compare (uuid1, uuid2)) {
+ if (gf_uuid_compare (uuid1, uuid2)) {
gf_asprintf (op_errstr, "gfid mismatch between %s and "
"%s for path %s", uuid1_str, uuid2_str,
path);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 65f446e8548..8a61da2e8ec 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1793,7 +1793,7 @@ brick_graph_add_marker (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
if (!xl)
goto out;
- uuid_unparse (volinfo->volume_id, volume_id);
+ gf_uuid_unparse (volinfo->volume_id, volume_id);
ret = xlator_set_option (xl, "volume-uuid", volume_id);
if (ret)
goto out;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index 8f20db77d01..a42f08c1600 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -358,7 +358,7 @@ __glusterd_handle_create_volume (rpcsvc_request_t *req)
goto out;
}
- uuid_generate (volume_id);
+ gf_uuid_generate (volume_id);
free_ptr = gf_strdup (uuid_utoa (volume_id));
ret = dict_set_dynstr (dict, "volume-id", free_ptr);
if (ret) {
@@ -371,7 +371,7 @@ __glusterd_handle_create_volume (rpcsvc_request_t *req)
/* generate internal username and password */
- uuid_generate (tmp_uuid);
+ gf_uuid_generate (tmp_uuid);
username = gf_strdup (uuid_utoa (tmp_uuid));
ret = dict_set_dynstr (dict, "internal-username", username);
if (ret) {
@@ -380,7 +380,7 @@ __glusterd_handle_create_volume (rpcsvc_request_t *req)
goto out;
}
- uuid_generate (tmp_uuid);
+ gf_uuid_generate (tmp_uuid);
password = gf_strdup (uuid_utoa (tmp_uuid));
ret = dict_set_dynstr (dict, "internal-password", password);
if (ret) {
@@ -1058,7 +1058,7 @@ glusterd_op_stage_create_volume (dict_t *dict, char **op_errstr,
goto out;
}
- ret = uuid_parse (volume_uuid_str, volume_uuid);
+ ret = gf_uuid_parse (volume_uuid_str, volume_uuid);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "Unable to parse volume id of"
" volume %s", volname);
@@ -1120,7 +1120,7 @@ glusterd_op_stage_create_volume (dict_t *dict, char **op_errstr,
goto out;
}
- if (!uuid_compare (brick_info->uuid, MY_UUID)) {
+ if (!gf_uuid_compare (brick_info->uuid, MY_UUID)) {
#ifdef HAVE_BD_XLATOR
if (brick_info->vg[0]) {
ret = glusterd_is_valid_vg (brick_info, 1, msg);
@@ -1338,7 +1338,7 @@ glusterd_op_stage_start_volume (dict_t *dict, char **op_errstr,
goto out;
}
- if ((uuid_compare (brickinfo->uuid, MY_UUID)) ||
+ if ((gf_uuid_compare (brickinfo->uuid, MY_UUID)) ||
(brickinfo->snap_status == -1))
continue;
@@ -1376,7 +1376,7 @@ glusterd_op_stage_start_volume (dict_t *dict, char **op_errstr,
continue;
}
}
- if (uuid_compare (volinfo->volume_id, volume_id)) {
+ if (gf_uuid_compare (volinfo->volume_id, volume_id)) {
snprintf (msg, sizeof (msg), "Volume id mismatch for "
"brick %s:%s. Expected volume id %s, "
"volume id %s found", brickinfo->hostname,
@@ -2069,7 +2069,7 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr)
"Unable to get volume-id of volume %s", volname);
goto out;
}
- ret = uuid_parse (str, volinfo->volume_id);
+ ret = gf_uuid_parse (str, volinfo->volume_id);
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
"unable to parse uuid %s of volume %s", str, volname);
@@ -2146,7 +2146,7 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr)
}
#ifdef HAVE_BD_XLATOR
- if (!uuid_compare (brickinfo->uuid, MY_UUID)
+ if (!gf_uuid_compare (brickinfo->uuid, MY_UUID)
&& brickinfo->vg[0]) {
ret = glusterd_is_valid_vg (brickinfo, 0, msg);
if (ret) {
@@ -2298,7 +2298,7 @@ glusterd_op_start_volume (dict_t *dict, char **op_errstr)
brick_count++;
/* Don't check bricks that are not owned by you
*/
- if (uuid_compare (brickinfo->uuid, MY_UUID))
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID))
continue;
if (strlen(brickinfo->mount_dir) < 1) {
brick_mount_dir = NULL;
@@ -2707,7 +2707,7 @@ glusterd_clearlocks_get_local_client_ports (glusterd_volinfo_t *volinfo,
index = -1;
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
index++;
- if (uuid_compare (brickinfo->uuid, MY_UUID))
+ if (gf_uuid_compare (brickinfo->uuid, MY_UUID))
continue;
if (volinfo->transport_type == GF_TRANSPORT_RDMA) {
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 550cae456a3..30461d39fad 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -178,7 +178,7 @@ glusterd_uuid_generate_save ()
priv = this->private;
GF_ASSERT (priv);
- uuid_generate (priv->uuid);
+ gf_uuid_generate (priv->uuid);
gf_log (this->name, GF_LOG_INFO, "generated UUID: %s",
uuid_utoa (priv->uuid));
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index b4ef8232399..8f8af26acfe 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -664,7 +664,7 @@ __glusterd_uuid()
{
glusterd_conf_t *priv = THIS->private;
- if (uuid_is_null (priv->uuid))
+ if (gf_uuid_is_null (priv->uuid))
glusterd_uuid_init();
return &priv->uuid[0];
}