summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2015-04-02 15:51:30 +0200
committerVijay Bellur <vbellur@redhat.com>2015-04-04 10:48:35 -0700
commit28397cae4102ac3f08576ebaf071ad92683097e8 (patch)
tree4c8be92299a951c8a28e1dc85bf2671f60da6e08 /xlators
parent0aebfaa349c7c68c2d59531eabae5a03a748e16a (diff)
Avoid conflict between contrib/uuid and system uuid
glusterfs relies on Linux uuid implementation, which API is incompatible with most other systems's uuid. As a result, libglusterfs has to embed contrib/uuid, which is the Linux implementation, on non Linux systems. This implementation is incompatible with systtem's built in, but the symbols have the same names. Usually this is not a problem because when we link with -lglusterfs, libc's symbols are trumped. However there is a problem when a program not linked with -lglusterfs will dlopen() glusterfs component. In such a case, libc's uuid implementation is already loaded in the calling program, and it will be used instead of libglusterfs's implementation, causing crashes. A possible workaround is to use pre-load libglusterfs in the calling program (using LD_PRELOAD on NetBSD for instance), but such a mechanism is not portable, nor is it flexible. A much better approach is to rename libglusterfs's uuid_* functions to gf_uuid_* to avoid any possible conflict. This is what this change attempts. BUG: 1206587 Change-Id: I9ccd3e13afed1c7fc18508e92c7beb0f5d49f31a Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/10017 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-common.c18
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c4
-rw-r--r--xlators/cluster/afr/src/afr-lk-common.c2
-rw-r--r--xlators/cluster/afr/src/afr-open.c2
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c22
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c4
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c12
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c2
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-name.c24
-rw-r--r--xlators/cluster/afr/src/afr-self-heald.c12
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c2
-rw-r--r--xlators/cluster/afr/src/pump.c24
-rw-r--r--xlators/cluster/dht/src/dht-common.c90
-rw-r--r--xlators/cluster/dht/src/dht-helper.c8
-rw-r--r--xlators/cluster/dht/src/dht-layout.c4
-rw-r--r--xlators/cluster/dht/src/dht-linkfile.c12
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c34
-rw-r--r--xlators/cluster/dht/src/dht-rename.c20
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c18
-rw-r--r--xlators/cluster/dht/src/dht-shared.c2
-rw-r--r--xlators/cluster/dht/src/tier.c12
-rw-r--r--xlators/cluster/dht/src/unittest/dht_layout_mock.c2
-rw-r--r--xlators/cluster/ec/src/ec-combine.c2
-rw-r--r--xlators/cluster/ec/src/ec-common.c6
-rw-r--r--xlators/cluster/ec/src/ec-heal.c10
-rw-r--r--xlators/cluster/ec/src/ec-heald.c8
-rw-r--r--xlators/cluster/ec/src/ec-helpers.c20
-rw-r--r--xlators/cluster/stripe/src/stripe.c20
-rw-r--r--xlators/debug/io-stats/src/io-stats.c8
-rw-r--r--xlators/encryption/crypt/src/crypt.c2
-rw-r--r--xlators/features/barrier/src/barrier.c2
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot.c14
-rw-r--r--xlators/features/bit-rot/src/stub/bit-rot-stub.c10
-rw-r--r--xlators/features/changelog/src/changelog-helpers.c2
-rw-r--r--xlators/features/changelog/src/changelog-helpers.h2
-rw-r--r--xlators/features/changelog/src/changelog.c14
-rw-r--r--xlators/features/changetimerecorder/src/changetimerecorder.c4
-rw-r--r--xlators/features/changetimerecorder/src/ctr-helper.c6
-rw-r--r--xlators/features/changetimerecorder/src/ctr-helper.h4
-rw-r--r--xlators/features/gfid-access/src/gfid-access.c32
-rw-r--r--xlators/features/index/src/index.c42
-rw-r--r--xlators/features/locks/src/common.c2
-rw-r--r--xlators/features/locks/src/posix.c2
-rw-r--r--xlators/features/marker/src/marker-quota-helper.c16
-rw-r--r--xlators/features/marker/src/marker-quota.c90
-rw-r--r--xlators/features/marker/src/marker-quota.h2
-rw-r--r--xlators/features/marker/src/marker.c46
-rw-r--r--xlators/features/qemu-block/src/bdrv-xlator.c6
-rw-r--r--xlators/features/qemu-block/src/qb-coroutines.c12
-rw-r--r--xlators/features/qemu-block/src/qemu-block.c6
-rw-r--r--xlators/features/quota/src/quota-enforcer-client.c6
-rw-r--r--xlators/features/quota/src/quota.c52
-rw-r--r--xlators/features/quota/src/quota.h2
-rw-r--r--xlators/features/quota/src/quotad-aggregator.c2
-rw-r--r--xlators/features/shard/src/shard.c10
-rw-r--r--xlators/features/snapview-client/src/snapview-client.c12
-rw-r--r--xlators/features/snapview-server/src/snapview-server-helpers.c4
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c72
-rw-r--r--xlators/features/trash/src/trash.c46
-rw-r--r--xlators/features/upcall/src/upcall-internal.c2
-rw-r--r--xlators/features/upcall/src/upcall.c2
-rw-r--r--xlators/lib/src/libxlator.c2
-rw-r--r--xlators/meta/src/meta-helpers.c6
-rw-r--r--xlators/meta/src/meta.c2
-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
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c26
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c6
-rw-r--r--xlators/mount/fuse/src/fuse-resolve.c30
-rw-r--r--xlators/nfs/server/src/acl3.c6
-rw-r--r--xlators/nfs/server/src/auth-cache.c6
-rw-r--r--xlators/nfs/server/src/exports.c4
-rw-r--r--xlators/nfs/server/src/mount3.c10
-rw-r--r--xlators/nfs/server/src/nfs-common.c10
-rw-r--r--xlators/nfs/server/src/nfs-fops.c4
-rw-r--r--xlators/nfs/server/src/nfs3-fh.c24
-rw-r--r--xlators/nfs/server/src/nfs3-helpers.c2
-rw-r--r--xlators/nfs/server/src/nfs3.c24
-rw-r--r--xlators/nfs/server/src/nlm4.c6
-rw-r--r--xlators/performance/io-cache/src/io-cache.c2
-rw-r--r--xlators/performance/md-cache/src/md-cache.c2
-rw-r--r--xlators/protocol/client/src/client-handshake.c4
-rw-r--r--xlators/protocol/client/src/client-rpc-fops.c120
-rw-r--r--xlators/protocol/server/src/server-resolve.c24
-rw-r--r--xlators/protocol/server/src/server-rpc-fops.c2
-rw-r--r--xlators/storage/bd/src/bd-helper.c6
-rw-r--r--xlators/storage/bd/src/bd.c8
-rw-r--r--xlators/storage/posix/src/posix-handle.c10
-rw-r--r--xlators/storage/posix/src/posix-handle.h4
-rw-r--r--xlators/storage/posix/src/posix-helpers.c12
-rw-r--r--xlators/storage/posix/src/posix.c44
113 files changed, 935 insertions, 935 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 58c33e20d36..efe8f8bc435 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -680,7 +680,7 @@ afr_inode_refresh_subvol (call_frame_t *frame, xlator_t *this, int i,
priv = this->private;
loc.inode = inode;
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
STACK_WIND_COOKIE (frame, afr_inode_refresh_subvol_cbk,
(void *) (long) i, priv->children[i],
@@ -850,7 +850,7 @@ afr_hash_child (inode_t *inode, int32_t child_count, int hashmode)
}
if (inode) {
- uuid_copy (gfid_copy, inode->gfid);
+ gf_uuid_copy (gfid_copy, inode->gfid);
}
if (hashmode > 1 && inode->ia_type != IA_IFDIR) {
@@ -1379,7 +1379,7 @@ afr_lookup_done (call_frame_t *frame, xlator_t *this)
if (read_subvol == -1 || !readable[read_subvol]) {
read_subvol = i;
- uuid_copy (read_gfid, replies[i].poststat.ia_gfid);
+ gf_uuid_copy (read_gfid, replies[i].poststat.ia_gfid);
local->op_ret = 0;
}
}
@@ -1398,7 +1398,7 @@ afr_lookup_done (call_frame_t *frame, xlator_t *this)
continue;
}
- if (!uuid_compare (replies[i].poststat.ia_gfid, read_gfid))
+ if (!gf_uuid_compare (replies[i].poststat.ia_gfid, read_gfid))
continue;
can_interpret = _gf_false;
@@ -1637,7 +1637,7 @@ afr_can_start_metadata_self_heal(call_frame_t *frame, xlator_t *this)
continue;
}
- if (uuid_compare (stbuf.ia_gfid, replies[i].poststat.ia_gfid)) {
+ if (gf_uuid_compare (stbuf.ia_gfid, replies[i].poststat.ia_gfid)) {
start = _gf_false;
break;
}
@@ -1753,7 +1753,7 @@ afr_lookup_entry_heal (call_frame_t *frame, xlator_t *this)
break;
}
- if (uuid_compare (replies[i].poststat.ia_gfid,
+ if (gf_uuid_compare (replies[i].poststat.ia_gfid,
replies[first].poststat.ia_gfid)) {
need_heal = _gf_true;
break;
@@ -2004,7 +2004,7 @@ afr_discover (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req
allocate one for us */
local->xattr_req = dict_ref (xattr_req);
- if (uuid_is_null (loc->inode->gfid)) {
+ if (gf_uuid_is_null (loc->inode->gfid)) {
afr_discover_do (frame, this, 0);
return 0;
}
@@ -2115,7 +2115,7 @@ afr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
void *gfid_req = NULL;
int ret = 0;
- if (!loc->parent && uuid_is_null (loc->pargfid)) {
+ if (!loc->parent && gf_uuid_is_null (loc->pargfid)) {
if (xattr_req)
dict_del (xattr_req, "gfid-req");
afr_discover (frame, this, loc, xattr_req);
@@ -2149,7 +2149,7 @@ afr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
allocate one for us */
ret = dict_get_ptr (xattr_req, "gfid-req", &gfid_req);
if (ret == 0) {
- uuid_copy (local->cont.lookup.gfid_req, gfid_req);
+ gf_uuid_copy (local->cont.lookup.gfid_req, gfid_req);
dict_del (xattr_req, "gfid-req");
}
local->xattr_req = dict_ref (xattr_req);
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index 4cee1ed9bea..f7ca9108092 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -69,7 +69,7 @@ afr_build_parent_loc (loc_t *parent, loc_t *child, int32_t *op_errno)
}
parent->inode = inode_ref (child->parent);
- uuid_copy (parent->gfid, child->pargfid);
+ gf_uuid_copy (parent->gfid, child->pargfid);
ret = 0;
out:
@@ -314,7 +314,7 @@ afr_mark_new_entry_changelog (call_frame_t *frame, xlator_t *this)
goto out;
new_local->pending = changelog;
- uuid_copy (new_local->loc.gfid, local->cont.dir_fop.buf.ia_gfid);
+ gf_uuid_copy (new_local->loc.gfid, local->cont.dir_fop.buf.ia_gfid);
new_local->loc.inode = inode_ref (local->inode);
new_local->call_count = call_count;
diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c
index 4b7f8b7fcc2..dc4dfbc42c0 100644
--- a/xlators/cluster/afr/src/afr-lk-common.c
+++ b/xlators/cluster/afr/src/afr-lk-common.c
@@ -65,7 +65,7 @@ afr_entry_lockee_cmp (const void *l1, const void *l2)
loc_gfid ((loc_t*)&r1->loc, gfid1);
loc_gfid ((loc_t*)&r2->loc, gfid2);
- ret = uuid_compare (gfid1, gfid2);
+ ret = gf_uuid_compare (gfid1, gfid2);
/*Entrylks with NULL basename are the 'smallest'*/
if (ret == 0) {
if (!r1->basename)
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c
index f8ad8544e10..f1da8b05201 100644
--- a/xlators/cluster/afr/src/afr-open.c
+++ b/xlators/cluster/afr/src/afr-open.c
@@ -52,7 +52,7 @@ afr_is_fd_fixable (fd_t *fd)
return _gf_false;
else if (fd_is_anonymous (fd))
return _gf_false;
- else if (uuid_is_null (fd->inode->gfid))
+ else if (gf_uuid_is_null (fd->inode->gfid))
return _gf_false;
return _gf_true;
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index 21b4c4414d9..f3d1f8b0b14 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -45,7 +45,7 @@ afr_selfheal_post_op (call_frame_t *frame, xlator_t *this, inode_t *inode,
local = frame->local;
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
STACK_WIND (frame, afr_selfheal_post_op_cbk, priv->children[subvol],
priv->children[subvol]->fops->xattrop, &loc,
@@ -711,7 +711,7 @@ afr_selfheal_unlocked_lookup_on (call_frame_t *frame, inode_t *parent,
}
loc.parent = inode_ref (parent);
- uuid_copy (loc.pargfid, parent->gfid);
+ gf_uuid_copy (loc.pargfid, parent->gfid);
loc.name = name;
loc.inode = inode_ref (inode);
@@ -749,7 +749,7 @@ afr_selfheal_unlocked_discover_on (call_frame_t *frame, inode_t *inode,
}
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, gfid);
+ gf_uuid_copy (loc.gfid, gfid);
AFR_ONLIST (discover_on, frame, afr_selfheal_discover_cbk, lookup, &loc,
xattr_req);
@@ -840,7 +840,7 @@ afr_selfheal_tryinodelk (call_frame_t *frame, xlator_t *this, inode_t *inode,
struct gf_flock flock = {0, };
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
flock.l_type = F_WRLCK;
flock.l_start = off;
@@ -870,7 +870,7 @@ afr_selfheal_inodelk (call_frame_t *frame, xlator_t *this, inode_t *inode,
local = frame->local;
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
flock.l_type = F_WRLCK;
flock.l_start = off;
@@ -908,7 +908,7 @@ afr_selfheal_uninodelk (call_frame_t *frame, xlator_t *this, inode_t *inode,
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
flock.l_type = F_UNLCK;
flock.l_start = off;
@@ -930,7 +930,7 @@ afr_selfheal_tryentrylk (call_frame_t *frame, xlator_t *this, inode_t *inode,
loc_t loc = {0,};
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
AFR_ONALL (frame, afr_selfheal_lock_cbk, entrylk, dom,
&loc, name, ENTRYLK_LOCK_NB, ENTRYLK_WRLCK, NULL);
@@ -954,7 +954,7 @@ afr_selfheal_entrylk (call_frame_t *frame, xlator_t *this, inode_t *inode,
local = frame->local;
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
AFR_ONALL (frame, afr_selfheal_lock_cbk, entrylk, dom, &loc,
name, ENTRYLK_LOCK_NB, ENTRYLK_WRLCK, NULL);
@@ -985,7 +985,7 @@ afr_selfheal_unentrylk (call_frame_t *frame, xlator_t *this, inode_t *inode,
loc_t loc = {0,};
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
AFR_ONLIST (locked_on, frame, afr_selfheal_lock_cbk, entrylk,
dom, &loc, name, ENTRYLK_UNLOCK, ENTRYLK_WRLCK, NULL);
@@ -1225,7 +1225,7 @@ afr_inode_find (xlator_t *this, uuid_t gfid)
if (!inode)
return NULL;
- uuid_copy (inode->gfid, gfid);
+ gf_uuid_copy (inode->gfid, gfid);
return inode;
}
@@ -1271,7 +1271,7 @@ afr_selfheal_newentry_mark (call_frame_t *frame, xlator_t *this, inode_t *inode,
priv = this->private;
- uuid_copy (inode->gfid, replies[source].poststat.ia_gfid);
+ gf_uuid_copy (inode->gfid, replies[source].poststat.ia_gfid);
xattr = dict_new();
if (!xattr)
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index c0f444a776e..d20b6945a7e 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -296,7 +296,7 @@ afr_selfheal_data_restore_time (call_frame_t *frame, xlator_t *this,
loc_t loc = {0, };
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
AFR_ONLIST (healed_sinks, frame, attr_cbk, setattr, &loc,
&replies[source].poststat,
@@ -748,7 +748,7 @@ afr_selfheal_data_open (xlator_t *this, inode_t *inode)
return NULL;
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
ret = syncop_open (this, &loc, O_RDWR|O_LARGEFILE, fd);
if (ret) {
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index 13825e1ebad..1f3ea38ffd9 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -44,7 +44,7 @@ afr_selfheal_entry_delete (xlator_t *this, inode_t *dir, const char *name,
subvol = priv->children[child];
loc.parent = inode_ref (dir);
- uuid_copy (loc.pargfid, dir->gfid);
+ gf_uuid_copy (loc.pargfid, dir->gfid);
loc.name = name;
loc.inode = inode_ref (inode);
@@ -97,7 +97,7 @@ afr_selfheal_recreate_entry (xlator_t *this, int dst, int source, inode_t *dir,
return -ENOMEM;
loc.parent = inode_ref (dir);
- uuid_copy (loc.pargfid, dir->gfid);
+ gf_uuid_copy (loc.pargfid, dir->gfid);
loc.name = name;
loc.inode = inode_ref (inode);
@@ -113,7 +113,7 @@ afr_selfheal_recreate_entry (xlator_t *this, int dst, int source, inode_t *dir,
iatt = &replies[source].poststat;
srcloc.inode = inode_ref (inode);
- uuid_copy (srcloc.gfid, iatt->ia_gfid);
+ gf_uuid_copy (srcloc.gfid, iatt->ia_gfid);
mode = st_mode_from_ia (iatt->ia_prot, iatt->ia_type);
@@ -186,7 +186,7 @@ __afr_selfheal_heal_dirent (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = afr_selfheal_entry_delete (this, fd->inode, name,
inode, i, replies);
} else {
- if (!uuid_compare (replies[i].poststat.ia_gfid,
+ if (!gf_uuid_compare (replies[i].poststat.ia_gfid,
replies[source].poststat.ia_gfid))
continue;
@@ -227,7 +227,7 @@ afr_selfheal_detect_gfid_and_type_mismatch (xlator_t *this,
if (replies[i].op_ret != 0)
continue;
- if (uuid_compare (replies[src_idx].poststat.ia_gfid,
+ if (gf_uuid_compare (replies[src_idx].poststat.ia_gfid,
replies[i].poststat.ia_gfid)) {
gf_log (this->name, GF_LOG_ERROR, "Gfid mismatch "
"detected for <%s/%s>, %s on %s and %s on %s. "
@@ -680,7 +680,7 @@ afr_selfheal_data_opendir (xlator_t *this, inode_t *inode)
return NULL;
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
ret = syncop_opendir (this, &loc, fd);
if (ret) {
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index b08bd4ebe34..3d76647e974 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -49,7 +49,7 @@ __afr_selfheal_metadata_do (call_frame_t *frame, xlator_t *this, inode_t *inode,
priv = this->private;
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
gf_log (this->name, GF_LOG_INFO, "performing metadata selfheal on %s",
uuid_utoa (inode->gfid));
diff --git a/xlators/cluster/afr/src/afr-self-heal-name.c b/xlators/cluster/afr/src/afr-self-heal-name.c
index af635f06d52..12163298f7e 100644
--- a/xlators/cluster/afr/src/afr-self-heal-name.c
+++ b/xlators/cluster/afr/src/afr-self-heal-name.c
@@ -43,7 +43,7 @@ __afr_selfheal_assign_gfid (xlator_t *this, inode_t *parent, uuid_t pargfid,
new_local = new_frame->local;
- uuid_copy (parent->gfid, pargfid);
+ gf_uuid_copy (parent->gfid, pargfid);
xdata = dict_new ();
if (!xdata) {
@@ -59,7 +59,7 @@ __afr_selfheal_assign_gfid (xlator_t *this, inode_t *parent, uuid_t pargfid,
loc.parent = inode_ref (parent);
loc.inode = inode_ref (inode);
- uuid_copy (loc.pargfid, pargfid);
+ gf_uuid_copy (loc.pargfid, pargfid);
loc.name = bname;
if (is_gfid_absent) {
@@ -121,13 +121,13 @@ __afr_selfheal_name_impunge (call_frame_t *frame, xlator_t *this,
newentry = alloca0 (priv->child_count);
sources = alloca0 (priv->child_count);
- uuid_copy (parent->gfid, pargfid);
+ gf_uuid_copy (parent->gfid, pargfid);
for (i = 0; i < priv->child_count; i++) {
if (!replies[i].valid)
continue;
- if (uuid_compare (replies[i].poststat.ia_gfid,
+ if (gf_uuid_compare (replies[i].poststat.ia_gfid,
replies[gfid_idx].poststat.ia_gfid) == 0) {
sources[i] = 1;
continue;
@@ -159,7 +159,7 @@ __afr_selfheal_name_expunge (xlator_t *this, inode_t *parent, uuid_t pargfid,
priv = this->private;
loc.parent = inode_ref (parent);
- uuid_copy (loc.pargfid, pargfid);
+ gf_uuid_copy (loc.pargfid, pargfid);
loc.name = bname;
loc.inode = inode_ref (inode);
@@ -216,7 +216,7 @@ afr_selfheal_gfid_idx_get (xlator_t *this, struct afr_reply *replies,
if (!sources[i])
continue;
- if (uuid_is_null (replies[i].poststat.ia_gfid))
+ if (gf_uuid_is_null (replies[i].poststat.ia_gfid))
continue;
gfid_idx = i;
@@ -251,12 +251,12 @@ afr_selfheal_name_need_heal_check (xlator_t *this, struct afr_reply *replies)
if (replies[i].op_ret != replies[first_idx].op_ret)
need_heal = _gf_true;
- if (uuid_compare (replies[i].poststat.ia_gfid,
+ if (gf_uuid_compare (replies[i].poststat.ia_gfid,
replies[first_idx].poststat.ia_gfid))
need_heal = _gf_true;
if ((replies[i].op_ret == 0) &&
- (uuid_is_null(replies[i].poststat.ia_gfid)))
+ (gf_uuid_is_null(replies[i].poststat.ia_gfid)))
need_heal = _gf_true;
}
@@ -328,7 +328,7 @@ afr_selfheal_name_gfid_mismatch_check (xlator_t *this, struct afr_reply *replies
if (!replies[i].valid)
continue;
- if (uuid_is_null (replies[i].poststat.ia_gfid))
+ if (gf_uuid_is_null (replies[i].poststat.ia_gfid))
continue;
if (!gfid) {
@@ -339,7 +339,7 @@ afr_selfheal_name_gfid_mismatch_check (xlator_t *this, struct afr_reply *replies
if (sources[i] || source == -1) {
if ((sources[gfid_idx_iter] || source == -1) &&
- uuid_compare (gfid, replies[i].poststat.ia_gfid)) {
+ gf_uuid_compare (gfid, replies[i].poststat.ia_gfid)) {
gf_msg (this->name, GF_LOG_WARNING, 0,
AFR_MSG_SPLIT_BRAIN,
"GFID mismatch for <gfid:%s>/%s "
@@ -428,7 +428,7 @@ __afr_selfheal_name_do (call_frame_t *frame, xlator_t *this, inode_t *parent,
return ret;
if (gfid_idx == -1) {
- if (!gfid_req || uuid_is_null (gfid_req))
+ if (!gfid_req || gf_uuid_is_null (gfid_req))
return -1;
gfid = gfid_req;
} else {
@@ -654,7 +654,7 @@ afr_selfheal_name_unlocked_inspect (call_frame_t *frame, xlator_t *this,
if (replies[i].op_ret != replies[first_idx].op_ret)
*need_heal = _gf_true;
- if (uuid_compare (replies[i].poststat.ia_gfid,
+ if (gf_uuid_compare (replies[i].poststat.ia_gfid,
replies[first_idx].poststat.ia_gfid))
*need_heal = _gf_true;
}
diff --git a/xlators/cluster/afr/src/afr-self-heald.c b/xlators/cluster/afr/src/afr-self-heald.c
index c38440b4c9b..177e92497fe 100644
--- a/xlators/cluster/afr/src/afr-self-heald.c
+++ b/xlators/cluster/afr/src/afr-self-heald.c
@@ -82,7 +82,7 @@ afr_shd_is_subvol_local (xlator_t *this, int subvol)
loc_t loc = {0, };
loc.inode = this->itable->root;
- uuid_copy (loc.gfid, loc.inode->gfid);
+ gf_uuid_copy (loc.gfid, loc.inode->gfid);
priv = this->private;
syncop_is_subvol_local(priv->children[subvol], &loc, &is_local);
return is_local;
@@ -171,7 +171,7 @@ afr_shd_inode_find (xlator_t *this, xlator_t *subvol, uuid_t gfid)
loc.inode = inode_new (this->itable);
if (!loc.inode)
goto out;
- uuid_copy (loc.gfid, gfid);
+ gf_uuid_copy (loc.gfid, gfid);
ret = syncop_lookup (subvol, &loc, NULL, &iatt, NULL, NULL);
if (ret < 0)
@@ -196,7 +196,7 @@ afr_shd_index_inode (xlator_t *this, xlator_t *subvol)
void *index_gfid = NULL;
rootloc.inode = inode_ref (this->itable->root);
- uuid_copy (rootloc.gfid, rootloc.inode->gfid);
+ gf_uuid_copy (rootloc.gfid, rootloc.inode->gfid);
ret = syncop_getxattr (subvol, &rootloc, &xattr,
GF_XATTROP_INDEX_GFID, NULL);
@@ -408,7 +408,7 @@ afr_shd_index_heal (xlator_t *subvol, gf_dirent_t *entry, loc_t *parent,
gf_log (healer->this->name, GF_LOG_DEBUG, "got entry: %s",
entry->d_name);
- ret = uuid_parse (entry->d_name, gfid);
+ ret = gf_uuid_parse (entry->d_name, gfid);
if (ret)
return 0;
@@ -847,7 +847,7 @@ afr_shd_gather_entry (xlator_t *subvol, gf_dirent_t *entry, loc_t *parent,
gf_log (this->name, GF_LOG_DEBUG, "got entry: %s",
entry->d_name);
- ret = uuid_parse (entry->d_name, gfid);
+ ret = gf_uuid_parse (entry->d_name, gfid);
if (ret)
return 0;
@@ -1035,7 +1035,7 @@ afr_shd_get_index_count (xlator_t *this, int i, uint64_t *count)
subvol = priv->children[i];
rootloc.inode = inode_ref (this->itable->root);
- uuid_copy (rootloc.gfid, rootloc.inode->gfid);
+ gf_uuid_copy (rootloc.gfid, rootloc.inode->gfid);
ret = syncop_getxattr (subvol, &rootloc, &xattr,
GF_XATTROP_INDEX_COUNT, NULL);
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index afa11bba7ab..d2111060035 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -548,7 +548,7 @@ afr_handle_quorum (call_frame_t *frame)
return;
if (local->fd) {
- uuid_copy (gfid, local->fd->inode->gfid);
+ gf_uuid_copy (gfid, local->fd->inode->gfid);
file = uuid_utoa (gfid);
} else {
loc_path (&local->loc, local->loc.name);
diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c
index 70038b9406e..139c9b6c447 100644
--- a/xlators/cluster/afr/src/pump.c
+++ b/xlators/cluster/afr/src/pump.c
@@ -38,7 +38,7 @@ afr_set_dict_gfid (dict_t *dict, uuid_t gfid)
goto out;
}
- uuid_copy (*pgfid, gfid);
+ gf_uuid_copy (*pgfid, gfid);
ret = dict_set_dynptr (dict, "gfid-req", pgfid, sizeof (uuid_t));
if (ret)
@@ -73,12 +73,12 @@ afr_build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name)
if (!child)
goto out;
- if (!uuid_is_null (parent->inode->gfid))
- uuid_copy (pargfid, parent->inode->gfid);
- else if (!uuid_is_null (parent->gfid))
- uuid_copy (pargfid, parent->gfid);
+ if (!gf_uuid_is_null (parent->inode->gfid))
+ gf_uuid_copy (pargfid, parent->inode->gfid);
+ else if (!gf_uuid_is_null (parent->gfid))
+ gf_uuid_copy (pargfid, parent->gfid);
- if (uuid_is_null (pargfid))
+ if (gf_uuid_is_null (pargfid))
goto out;
if (strcmp (parent->path, "/") == 0)
@@ -98,7 +98,7 @@ afr_build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name)
child->parent = inode_ref (parent->inode);
child->inode = inode_new (parent->inode->table);
- uuid_copy (child->pargfid, pargfid);
+ gf_uuid_copy (child->pargfid, pargfid);
if (!child->inode) {
ret = -1;
@@ -122,7 +122,7 @@ afr_build_root_loc (xlator_t *this, loc_t *loc)
loc->path = gf_strdup ("/");
loc->name = "";
loc->inode = inode_ref (priv->root_inode);
- uuid_copy (loc->gfid, loc->inode->gfid);
+ gf_uuid_copy (loc->gfid, loc->inode->gfid);
}
static void
@@ -131,9 +131,9 @@ afr_update_loc_gfids (loc_t *loc, struct iatt *buf, struct iatt *postparent)
GF_ASSERT (loc);
GF_ASSERT (buf);
- uuid_copy (loc->gfid, buf->ia_gfid);
+ gf_uuid_copy (loc->gfid, buf->ia_gfid);
if (postparent)
- uuid_copy (loc->pargfid, postparent->ia_gfid);
+ gf_uuid_copy (loc->pargfid, postparent->ia_gfid);
}
static uint64_t pump_pid = 0;
@@ -141,7 +141,7 @@ static inline void
pump_fill_loc_info (loc_t *loc, struct iatt *iatt, struct iatt *parent)
{
afr_update_loc_gfids (loc, iatt, parent);
- uuid_copy (loc->inode->gfid, iatt->ia_gfid);
+ gf_uuid_copy (loc->inode->gfid, iatt->ia_gfid);
}
static int
@@ -489,7 +489,7 @@ gf_pump_traverse_directory (loc_t *loc)
"found readdir entry=%s", entry->d_name);
offset = entry->d_off;
- if (uuid_is_null (entry->d_stat.ia_gfid)) {
+ if (gf_uuid_is_null (entry->d_stat.ia_gfid)) {
gf_log (this->name, GF_LOG_WARNING, "%s/%s: No "
"gfid present skipping",
loc->path, entry->d_name);
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 9a98ebfab30..6d36fdbe284 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -294,7 +294,7 @@ selfheal:
main_frame->local = local;
discover_frame->local = NULL;
FRAME_SU_DO (main_frame, dht_local_t);
- uuid_copy (local->loc.gfid, local->gfid);
+ gf_uuid_copy (local->loc.gfid, local->gfid);
ret = dht_selfheal_directory_for_nameless_lookup (main_frame,
dht_lookup_selfheal_cbk,
&local->loc, layout);
@@ -334,10 +334,10 @@ dht_discover_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* Check if the gfid is different for file from other node */
- if (!op_ret && uuid_compare (local->gfid, stbuf->ia_gfid)) {
+ if (!op_ret && gf_uuid_compare (local->gfid, stbuf->ia_gfid)) {
- uuid_unparse(stbuf->ia_gfid, gfid_node);
- uuid_unparse(local->gfid, gfid_local);
+ gf_uuid_unparse(stbuf->ia_gfid, gfid_node);
+ gf_uuid_unparse(local->gfid, gfid_local);
gf_msg (this->name, GF_LOG_WARNING, 0,
DHT_MSG_GFID_MISMATCH,
@@ -469,7 +469,7 @@ dht_discover (call_frame_t *frame, xlator_t *this, loc_t *loc)
goto err;
}
- uuid_copy (local->gfid, loc->gfid);
+ gf_uuid_copy (local->gfid, loc->gfid);
discover_frame = copy_frame (frame);
if (!discover_frame) {
@@ -524,15 +524,15 @@ dht_lookup_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
layout = local->layout;
- if (!op_ret && uuid_is_null (local->gfid))
+ if (!op_ret && gf_uuid_is_null (local->gfid))
memcpy (local->gfid, stbuf->ia_gfid, 16);
/* Check if the gfid is different for file from other node */
- if (!op_ret && uuid_compare (local->gfid, stbuf->ia_gfid)) {
+ if (!op_ret && gf_uuid_compare (local->gfid, stbuf->ia_gfid)) {
- uuid_unparse(stbuf->ia_gfid, gfid_node);
- uuid_unparse(local->gfid, gfid_local);
+ gf_uuid_unparse(stbuf->ia_gfid, gfid_node);
+ gf_uuid_unparse(local->gfid, gfid_local);
gf_msg (this->name, GF_LOG_WARNING, 0,
DHT_MSG_GFID_MISMATCH,
@@ -631,7 +631,7 @@ unlock:
selfheal:
FRAME_SU_DO (frame, dht_local_t);
- uuid_copy (local->loc.gfid, local->gfid);
+ gf_uuid_copy (local->loc.gfid, local->gfid);
ret = dht_selfheal_directory (frame, dht_lookup_selfheal_cbk,
&local->loc, layout);
out:
@@ -667,7 +667,7 @@ dht_revalidate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (!conf)
goto out;
- uuid_unparse (local->loc.gfid, gfid);
+ gf_uuid_unparse (local->loc.gfid, gfid);
LOCK (&frame->lock);
{
@@ -803,7 +803,7 @@ out:
}
if (local->need_selfheal) {
local->need_selfheal = 0;
- uuid_copy (local->gfid, local->stbuf.ia_gfid);
+ gf_uuid_copy (local->gfid, local->stbuf.ia_gfid);
local->stbuf.ia_gid = local->prebuf.ia_gid;
local->stbuf.ia_uid = local->prebuf.ia_uid;
copy = create_frame (this, this->ctx->pool);
@@ -888,7 +888,7 @@ dht_lookup_linkfile_create_cbk (call_frame_t *frame, void *cookie,
cached_subvol = local->cached_subvol;
conf = this->private;
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
ret = dht_layout_preset (this, local->cached_subvol, local->loc.inode);
if (ret < 0) {
@@ -1118,7 +1118,7 @@ dht_lookup_everywhere_done (call_frame_t *frame, xlator_t *this)
hashed_subvol = local->hashed_subvol;
cached_subvol = local->cached_subvol;
- uuid_unparse (local->loc.gfid, gfid);
+ gf_uuid_unparse (local->loc.gfid, gfid);
if (local->file_count && local->dir_count) {
gf_msg (this->name, GF_LOG_ERROR, 0,
@@ -1244,7 +1244,7 @@ dht_lookup_everywhere_done (call_frame_t *frame, xlator_t *this)
if (local->skip_unlink.handle_valid_link == _gf_true) {
if (cached_subvol == local->skip_unlink.hash_links_to) {
- if (uuid_compare (local->skip_unlink.cached_gfid,
+ if (gf_uuid_compare (local->skip_unlink.cached_gfid,
local->skip_unlink.hashed_gfid)){
/*GFID different, return error*/
@@ -1335,7 +1335,7 @@ preset_layout:
if (found_non_linkto_on_hashed) {
if (local->need_lookup_everywhere) {
- if (uuid_compare (local->gfid, local->inode->gfid)) {
+ if (gf_uuid_compare (local->gfid, local->inode->gfid)) {
/* GFID different, return error */
DHT_STACK_UNWIND (lookup, frame, -1, ENOENT,
NULL, NULL, NULL, NULL);
@@ -1478,12 +1478,12 @@ dht_lookup_everywhere_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto unlock;
}
- if (uuid_is_null (local->gfid))
- uuid_copy (local->gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->gfid))
+ gf_uuid_copy (local->gfid, buf->ia_gfid);
- uuid_unparse(local->gfid, gfid);
+ gf_uuid_unparse(local->gfid, gfid);
- if (uuid_compare (local->gfid, buf->ia_gfid)) {
+ if (gf_uuid_compare (local->gfid, buf->ia_gfid)) {
gf_msg (this->name, GF_LOG_WARNING, 0,
DHT_MSG_GFID_MISMATCH,
"%s: gfid differs on subvolume %s,"
@@ -1515,7 +1515,7 @@ dht_lookup_everywhere_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
/* non linkfile GFID takes precedence */
- uuid_copy (local->gfid, buf->ia_gfid);
+ gf_uuid_copy (local->gfid, buf->ia_gfid);
if (is_dir) {
local->dir_count++;
@@ -1544,7 +1544,7 @@ dht_lookup_everywhere_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
dht_iatt_merge (this, &local->postparent,
postparent, subvol);
- uuid_copy (local->skip_unlink.cached_gfid,
+ gf_uuid_copy (local->skip_unlink.cached_gfid,
buf->ia_gfid);
} else {
/* This is where we need 'rename' both entries logic */
@@ -1580,7 +1580,7 @@ unlock:
local->skip_unlink.handle_valid_link = _gf_true;
local->skip_unlink.opend_fd_count = fd_count;
local->skip_unlink.hash_links_to = link_subvol;
- uuid_copy (local->skip_unlink.hashed_gfid,
+ gf_uuid_copy (local->skip_unlink.hashed_gfid,
buf->ia_gfid);
gf_msg_debug (this->name, 0, "Found"
@@ -1708,7 +1708,7 @@ dht_lookup_linkfile_cbk (call_frame_t *frame, void *cookie,
local = frame->local;
loc = &local->loc;
- uuid_unparse(loc->gfid, gfid);
+ gf_uuid_unparse(loc->gfid, gfid);
if (op_ret == -1) {
gf_log (this->name, GF_LOG_INFO,
@@ -1741,7 +1741,7 @@ dht_lookup_linkfile_cbk (call_frame_t *frame, void *cookie,
goto err;
}
- if (uuid_compare (local->gfid, stbuf->ia_gfid)) {
+ if (gf_uuid_compare (local->gfid, stbuf->ia_gfid)) {
gf_msg (this->name, GF_LOG_WARNING, 0,
DHT_MSG_GFID_MISMATCH,
"%s: gfid different on data file on %s,"
@@ -1815,7 +1815,7 @@ dht_lookup_directory (call_frame_t *frame, xlator_t *this, loc_t *loc)
local->xattr = NULL;
}
- if (!uuid_is_null (local->gfid)) {
+ if (!gf_uuid_is_null (local->gfid)) {
ret = dict_set_static_bin (local->xattr_req, "gfid-req",
local->gfid, 16);
if (ret)
@@ -1871,7 +1871,7 @@ dht_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* This is required for handling stale linkfile deletion,
* or any more call which happens from this 'loc'.
*/
- if (!op_ret && uuid_is_null (local->gfid))
+ if (!op_ret && gf_uuid_is_null (local->gfid))
memcpy (local->gfid, stbuf->ia_gfid, 16);
gf_msg_debug (this->name, 0,
@@ -2074,7 +2074,7 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
local->xattr_req = dict_new ();
}
- if (uuid_is_null (loc->pargfid) && !uuid_is_null (loc->gfid) &&
+ if (gf_uuid_is_null (loc->pargfid) && !gf_uuid_is_null (loc->gfid) &&
!__is_root_gfid (loc->inode->gfid)) {
local->cached_subvol = NULL;
dht_discover (frame, this, loc);
@@ -4762,7 +4762,7 @@ dht_link (call_frame_t *frame, xlator_t *this,
}
if (hashed_subvol != cached_subvol) {
- uuid_copy (local->gfid, oldloc->inode->gfid);
+ gf_uuid_copy (local->gfid, oldloc->inode->gfid);
dht_linkfile_create (frame, dht_link_linkfile_cbk, this,
cached_subvol, hashed_subvol, newloc);
} else {
@@ -5068,8 +5068,8 @@ dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie,
conf = this->private;
hashed_subvol = local->hashed_subvol;
- if (uuid_is_null (local->loc.gfid) && !op_ret)
- uuid_copy (local->loc.gfid, stbuf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid) && !op_ret)
+ gf_uuid_copy (local->loc.gfid, stbuf->ia_gfid);
if (dht_is_subvol_filled (this, hashed_subvol))
ret = dht_layout_merge (this, layout, prev->this,
@@ -5098,8 +5098,8 @@ dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie,
local->call_cnt = conf->subvolume_cnt - 1;
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, stbuf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, stbuf->ia_gfid);
if (local->call_cnt == 0) {
dht_selfheal_directory (frame, dht_mkdir_selfheal_cbk,
&local->loc, layout);
@@ -5214,7 +5214,7 @@ dht_rmdir_hashed_subvol_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
prev = cookie;
conf = this->private;
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
LOCK (&frame->lock);
{
@@ -5252,7 +5252,7 @@ unlock:
/* TODO: neater interface needed below */
local->stbuf.ia_type = local->loc.inode->ia_type;
- uuid_copy (local->gfid, local->loc.inode->gfid);
+ gf_uuid_copy (local->gfid, local->loc.inode->gfid);
dht_selfheal_restore (frame, dht_rmdir_selfheal_cbk,
&local->loc, local->layout);
} else {
@@ -5305,7 +5305,7 @@ dht_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->need_selfheal = 1;
}
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
gf_msg_debug (this->name, 0,
"rmdir on %s for %s failed."
@@ -5343,7 +5343,7 @@ unlock:
/* TODO: neater interface needed below */
local->stbuf.ia_type = local->loc.inode->ia_type;
- uuid_copy (local->gfid, local->loc.inode->gfid);
+ gf_uuid_copy (local->gfid, local->loc.inode->gfid);
dht_selfheal_restore (frame, dht_rmdir_selfheal_cbk,
&local->loc, local->layout);
} else if (this_call_cnt) {
@@ -5405,7 +5405,7 @@ dht_rmdir_do (call_frame_t *frame, xlator_t *this)
hashed_subvol = dht_subvol_get_hashed (this, &local->loc);
if (!hashed_subvol) {
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
gf_msg (this->name, GF_LOG_WARNING, 0,
DHT_MSG_HASHED_SUBVOL_GET_FAILED,
@@ -5465,7 +5465,7 @@ dht_rmdir_linkfile_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this
main_frame = local->main_frame;
main_local = main_frame->local;
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
if (op_ret == 0) {
gf_msg_trace (this->name, 0,
@@ -5517,7 +5517,7 @@ dht_rmdir_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
main_local->op_ret = -1;
main_local->op_errno = ENOTEMPTY;
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
gf_log (this->name, GF_LOG_WARNING,
"%s on %s is not a linkfile (type=0%o, gfid = %s)",
@@ -5691,9 +5691,9 @@ dht_rmdir_is_subvol_empty (call_frame_t *frame, xlator_t *this,
if (build_ret != 0)
goto err;
- uuid_copy (lookup_local->loc.gfid, trav->d_stat.ia_gfid);
+ gf_uuid_copy (lookup_local->loc.gfid, trav->d_stat.ia_gfid);
- uuid_unparse(lookup_local->loc.gfid, gfid);
+ gf_uuid_unparse(lookup_local->loc.gfid, gfid);
gf_msg_trace (this->name, 0,
"looking up %s on subvolume %s, gfid = %s",
@@ -5802,7 +5802,7 @@ dht_rmdir_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
this_call_cnt = dht_frame_return (frame);
if (op_ret == -1) {
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
gf_msg_debug (this->name, 0,
"opendir on %s for %s failed, "
@@ -5946,7 +5946,7 @@ dht_entrylk (call_frame_t *frame, xlator_t *this,
subvol = local->cached_subvol;
if (!subvol) {
- uuid_unparse(loc->gfid, gfid);
+ gf_uuid_unparse(loc->gfid, gfid);
gf_msg_debug (this->name, 0,
"no cached subvolume for path=%s, "
@@ -5996,7 +5996,7 @@ dht_fentrylk (call_frame_t *frame, xlator_t *this,
VALIDATE_OR_GOTO (fd, err);
VALIDATE_OR_GOTO(fd->inode, err);
- uuid_unparse(fd->inode->gfid, gfid);
+ gf_uuid_unparse(fd->inode->gfid, gfid);
subvol = dht_subvol_get_cached (this, fd->inode);
if (!subvol) {
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index 346d19bec88..35d3d0f9dba 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -674,7 +674,7 @@ dht_iatt_merge (xlator_t *this, struct iatt *to,
to->ia_dev = from->ia_dev;
- uuid_copy (to->ia_gfid, from->ia_gfid);
+ gf_uuid_copy (to->ia_gfid, from->ia_gfid);
to->ia_ino = from->ia_ino;
to->ia_prot = from->ia_prot;
@@ -914,7 +914,7 @@ dht_migration_complete_check_task (void *data)
goto out;
}
- if (uuid_compare (stbuf.ia_gfid, local->loc.inode->gfid)) {
+ if (gf_uuid_compare (stbuf.ia_gfid, local->loc.inode->gfid)) {
gf_msg (this->name, GF_LOG_ERROR, 0,
DHT_MSG_GFID_MISMATCH,
"%s: gfid different on the target file on %s",
@@ -1111,7 +1111,7 @@ dht_rebalance_inprogress_task (void *data)
goto out;
}
- if (uuid_compare (stbuf.ia_gfid, local->loc.inode->gfid)) {
+ if (gf_uuid_compare (stbuf.ia_gfid, local->loc.inode->gfid)) {
gf_msg (this->name, GF_LOG_ERROR, 0,
DHT_MSG_GFID_MISMATCH,
"%s: gfid different on the target file on %s",
@@ -1693,7 +1693,7 @@ dht_lock_request_cmp (const void *val1, const void *val2)
ret = strcmp (lock1->xl->name, lock2->xl->name);
if (ret == 0) {
- ret = uuid_compare (lock1->loc.gfid, lock2->loc.gfid);
+ ret = gf_uuid_compare (lock1->loc.gfid, lock2->loc.gfid);
}
out:
diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c
index 15b183861a7..bbac904743e 100644
--- a/xlators/cluster/dht/src/dht-layout.c
+++ b/xlators/cluster/dht/src/dht-layout.c
@@ -667,7 +667,7 @@ dht_layout_normalize (xlator_t *this, loc_t *loc, dht_layout_t *layout)
goto out;
}
- uuid_unparse(loc->gfid, gfid);
+ gf_uuid_unparse(loc->gfid, gfid);
ret = dht_layout_anomalies (this, loc, layout,
&holes, &overlaps,
@@ -733,7 +733,7 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
char gfid[GF_UUID_BUF_SIZE] = {0};
if(loc && loc->inode)
- uuid_unparse(loc->inode->gfid, gfid);
+ gf_uuid_unparse(loc->inode->gfid, gfid);
for (idx = 0; idx < layout->cnt; idx++) {
if (layout->list[idx].xlator == subvol) {
diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c
index 90892a8a9bd..14df3187097 100644
--- a/xlators/cluster/dht/src/dht-linkfile.c
+++ b/xlators/cluster/dht/src/dht-linkfile.c
@@ -39,7 +39,7 @@ dht_linkfile_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret)
goto out;
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
is_linkfile = check_is_linkfile (inode, stbuf, xattr,
conf->link_xattr_name);
@@ -136,8 +136,8 @@ dht_linkfile_create (call_frame_t *frame, fop_mknod_cbk_t linkfile_cbk,
}
- if (!uuid_is_null (local->gfid)) {
- uuid_unparse(local->gfid, gfid);
+ if (!gf_uuid_is_null (local->gfid)) {
+ gf_uuid_unparse(local->gfid, gfid);
ret = dict_set_static_bin (dict, "gfid-req", local->gfid, 16);
if (ret)
@@ -146,7 +146,7 @@ dht_linkfile_create (call_frame_t *frame, fop_mknod_cbk_t linkfile_cbk,
"%s: Failed to set dictionary value: "
"key = gfid-req, gfid = %s ", loc->path, gfid);
} else {
- uuid_unparse(loc->gfid, gfid);
+ gf_uuid_unparse(loc->gfid, gfid);
}
ret = dict_set_str (dict, GLUSTERFS_INTERNAL_FOP_KEY, "yes");
@@ -208,7 +208,7 @@ dht_linkfile_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1) {
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
gf_msg (this->name, GF_LOG_INFO, op_errno,
DHT_MSG_UNLINK_FAILED,
"Unlinking linkfile %s (gfid = %s)on "
@@ -327,7 +327,7 @@ dht_linkfile_attr_heal (call_frame_t *frame, xlator_t *this)
if (local->stbuf.ia_type == IA_INVAL)
return 0;
- uuid_copy (local->loc.gfid, local->stbuf.ia_gfid);
+ gf_uuid_copy (local->loc.gfid, local->stbuf.ia_gfid);
copy = copy_frame (frame);
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index fc3b6124dd5..a0837e38528 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -154,7 +154,7 @@ gf_defrag_handle_hardlink (xlator_t *this, loc_t *loc, dict_t *xattrs,
conf = this->private;
- if (uuid_is_null (loc->pargfid)) {
+ if (gf_uuid_is_null (loc->pargfid)) {
gf_msg ("", GF_LOG_ERROR, 0,
DHT_MSG_MIGRATE_FILE_FAILED,
"Migrate file failed :"
@@ -162,7 +162,7 @@ gf_defrag_handle_hardlink (xlator_t *this, loc_t *loc, dict_t *xattrs,
goto out;
}
- if (uuid_is_null (loc->gfid)) {
+ if (gf_uuid_is_null (loc->gfid)) {
gf_msg ("", GF_LOG_ERROR, 0,
DHT_MSG_MIGRATE_FILE_FAILED,
"Migrate file failed :"
@@ -381,7 +381,7 @@ __dht_rebalance_create_dst_file (xlator_t *to, xlator_t *from, loc_t *loc, struc
ret = syncop_lookup (to, loc, NULL, &new_stbuf, NULL, NULL);
if (!ret) {
/* File exits in the destination, check if gfid matches */
- if (uuid_compare (stbuf->ia_gfid, new_stbuf.ia_gfid) != 0) {
+ if (gf_uuid_compare (stbuf->ia_gfid, new_stbuf.ia_gfid) != 0) {
gf_msg (this->name, GF_LOG_ERROR, 0,
DHT_MSG_GFID_MISMATCH,
"file %s exists in %s with different gfid",
@@ -428,7 +428,7 @@ __dht_rebalance_create_dst_file (xlator_t *to, xlator_t *from, loc_t *loc, struc
ret = syncop_lookup (to, loc, NULL, &check_stbuf, NULL, NULL);
if (!ret) {
- if (uuid_compare (stbuf->ia_gfid, check_stbuf.ia_gfid) != 0) {
+ if (gf_uuid_compare (stbuf->ia_gfid, check_stbuf.ia_gfid) != 0) {
gf_msg (this->name, GF_LOG_ERROR, 0,
DHT_MSG_GFID_MISMATCH,
"file %s exists in %s with different gfid,"
@@ -918,7 +918,7 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to,
flock.l_type = F_WRLCK;
tmp_loc.inode = inode_ref (loc->inode);
- uuid_copy (tmp_loc.gfid, loc->gfid);
+ gf_uuid_copy (tmp_loc.gfid, loc->gfid);
tmp_loc.path = gf_strdup(loc->path);
ret = syncop_inodelk (from, DHT_FILE_MIGRATE_DOMAIN, &tmp_loc, F_SETLKW,
@@ -1155,7 +1155,7 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to,
rcvd_enoent_from_src = 1;
}
- if ((uuid_compare (empty_iatt.ia_gfid, loc->gfid) == 0 ) &&
+ if ((gf_uuid_compare (empty_iatt.ia_gfid, loc->gfid) == 0 ) &&
(!rcvd_enoent_from_src)) {
/* take out the source from namespace */
ret = syncop_unlink (from, loc);
@@ -1511,7 +1511,7 @@ gf_defrag_migrate_data (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
goto out;
}
- if (uuid_is_null (entry->d_stat.ia_gfid)) {
+ if (gf_uuid_is_null (entry->d_stat.ia_gfid)) {
gf_msg (this->name, GF_LOG_ERROR, 0,
DHT_MSG_GFID_NULL,
"%s/%s gfid not present", loc->path,
@@ -1519,9 +1519,9 @@ gf_defrag_migrate_data (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
continue;
}
- uuid_copy (entry_loc.gfid, entry->d_stat.ia_gfid);
+ gf_uuid_copy (entry_loc.gfid, entry->d_stat.ia_gfid);
- if (uuid_is_null (loc->gfid)) {
+ if (gf_uuid_is_null (loc->gfid)) {
gf_msg (this->name, GF_LOG_ERROR, 0,
DHT_MSG_GFID_NULL,
"%s/%s gfid not present", loc->path,
@@ -1529,7 +1529,7 @@ gf_defrag_migrate_data (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
continue;
}
- uuid_copy (entry_loc.pargfid, loc->gfid);
+ gf_uuid_copy (entry_loc.pargfid, loc->gfid);
entry_loc.inode->ia_type = entry->d_stat.ia_type;
@@ -1566,8 +1566,8 @@ gf_defrag_migrate_data (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
continue;
}
- if (uuid_parse (uuid_str, node_uuid)) {
- gf_log (this->name, GF_LOG_ERROR, "uuid_parse "
+ if (gf_uuid_parse (uuid_str, node_uuid)) {
+ gf_log (this->name, GF_LOG_ERROR, "gf_uuid_parse "
"failed for %s", entry_loc.path);
continue;
}
@@ -1575,7 +1575,7 @@ gf_defrag_migrate_data (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
/* if file belongs to different node, skip migration
* the other node will take responsibility of migration
*/
- if (uuid_compare (node_uuid, defrag->node_uuid)) {
+ if (gf_uuid_compare (node_uuid, defrag->node_uuid)) {
gf_msg_trace (this->name, 0, "%s does not"
"belong to this node",
entry_loc.path);
@@ -1781,7 +1781,7 @@ gf_defrag_fix_layout (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
goto out;
}
- if (uuid_is_null (entry->d_stat.ia_gfid)) {
+ if (gf_uuid_is_null (entry->d_stat.ia_gfid)) {
gf_log (this->name, GF_LOG_ERROR, "%s/%s"
" gfid not present", loc->path,
entry->d_name);
@@ -1789,7 +1789,7 @@ gf_defrag_fix_layout (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
}
- uuid_copy (entry_loc.gfid, entry->d_stat.ia_gfid);
+ gf_uuid_copy (entry_loc.gfid, entry->d_stat.ia_gfid);
/*In case the gfid stored in the inode by inode_link
* and the gfid obtained in the lookup differs, then
@@ -1805,14 +1805,14 @@ gf_defrag_fix_layout (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
entry_loc.inode = linked_inode;
inode_unref (inode);
- if (uuid_is_null (loc->gfid)) {
+ if (gf_uuid_is_null (loc->gfid)) {
gf_log (this->name, GF_LOG_ERROR, "%s/%s"
" gfid not present", loc->path,
entry->d_name);
continue;
}
- uuid_copy (entry_loc.pargfid, loc->gfid);
+ gf_uuid_copy (entry_loc.pargfid, loc->gfid);
ret = syncop_lookup (this, &entry_loc, NULL, &iatt,
NULL, NULL);
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c
index c8a05a3939d..7d73eb9f272 100644
--- a/xlators/cluster/dht/src/dht-rename.c
+++ b/xlators/cluster/dht/src/dht-rename.c
@@ -40,7 +40,7 @@ dht_rename_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1) {
/* TODO: undo the damage */
- uuid_unparse(local->loc.inode->gfid, gfid);
+ gf_uuid_unparse(local->loc.inode->gfid, gfid);
gf_msg (this->name, GF_LOG_INFO, op_errno,
DHT_MSG_RENAME_FAILED,
@@ -110,7 +110,7 @@ dht_rename_hashed_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1) {
/* TODO: undo the damage */
- uuid_unparse(local->loc.inode->gfid, gfid);
+ gf_uuid_unparse(local->loc.inode->gfid, gfid);
gf_msg (this->name, GF_LOG_INFO, op_errno,
DHT_MSG_RENAME_FAILED,
@@ -241,7 +241,7 @@ dht_rename_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1) {
- uuid_unparse(local->loc.inode->gfid, gfid);
+ gf_uuid_unparse(local->loc.inode->gfid, gfid);
gf_msg (this->name, GF_LOG_INFO, op_errno,
DHT_MSG_OPENDIR_FAILED,
"opendir on %s for %s failed,(gfid = %s) ",
@@ -501,7 +501,7 @@ dht_rename_cleanup (call_frame_t *frame)
DHT_MARK_FOP_INTERNAL (xattr);
- uuid_unparse(local->loc.inode->gfid, gfid);
+ gf_uuid_unparse(local->loc.inode->gfid, gfid);
if (local->linked && (dst_hashed != src_hashed) &&
(dst_hashed != src_cached)) {
@@ -535,7 +535,7 @@ dht_rename_cleanup (call_frame_t *frame)
xattr_new = dict_copy_with_ref (xattr, NULL);
- if (uuid_compare (local->loc.pargfid,
+ if (gf_uuid_compare (local->loc.pargfid,
local->loc2.pargfid) == 0) {
DHT_MARKER_DONT_ACCOUNT(xattr_new);
}
@@ -683,7 +683,7 @@ dht_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (link_local->loc.inode)
inode_unref (link_local->loc.inode);
link_local->loc.inode = inode_ref (local->loc.inode);
- uuid_copy (link_local->gfid, local->loc.inode->gfid);
+ gf_uuid_copy (link_local->gfid, local->loc.inode->gfid);
dht_linkfile_create (link_frame, dht_rename_links_create_cbk,
this, src_cached, dst_hashed,
@@ -740,7 +740,7 @@ err:
"deleting old src datafile %s @ %s",
local->loc.path, src_cached->name);
- if (uuid_compare (local->loc.pargfid,
+ if (gf_uuid_compare (local->loc.pargfid,
local->loc2.pargfid) == 0) {
DHT_MARKER_DONT_ACCOUNT(xattr_new);
}
@@ -920,7 +920,7 @@ dht_rename_linkto_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_msg_trace (this->name, 0,
"link %s => %s (%s)", local->loc.path,
local->loc2.path, src_cached->name);
- if (uuid_compare (local->loc.pargfid,
+ if (gf_uuid_compare (local->loc.pargfid,
local->loc2.pargfid) == 0) {
DHT_MARKER_DONT_ACCOUNT(xattr);
}
@@ -1062,7 +1062,7 @@ dht_rename_create_links (call_frame_t *frame)
gf_msg_trace (this->name, 0,
"link %s => %s (%s)", local->loc.path,
local->loc2.path, src_cached->name);
- if (uuid_compare (local->loc.pargfid,
+ if (gf_uuid_compare (local->loc.pargfid,
local->loc2.pargfid) == 0) {
DHT_MARKER_DONT_ACCOUNT(xattr_new);
}
@@ -1281,7 +1281,7 @@ dht_rename (call_frame_t *frame, xlator_t *this,
VALIDATE_OR_GOTO (oldloc, err);
VALIDATE_OR_GOTO (newloc, err);
- uuid_unparse(oldloc->inode->gfid, gfid);
+ gf_uuid_unparse(oldloc->inode->gfid, gfid);
src_hashed = dht_subvol_get_hashed (this, oldloc);
if (!src_hashed) {
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 727b2d6027d..f0f44ebf77a 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -657,7 +657,7 @@ dht_selfheal_dir_xattr_persubvol (call_frame_t *frame, loc_t *loc,
goto err;
}
- uuid_unparse(loc->inode->gfid, gfid);
+ gf_uuid_unparse(loc->inode->gfid, gfid);
ret = dht_disk_layout_extract (this, layout, i, &disk_layout);
if (ret == -1) {
@@ -700,8 +700,8 @@ dht_selfheal_dir_xattr_persubvol (call_frame_t *frame, loc_t *loc,
}
}
- if (!uuid_is_null (local->gfid))
- uuid_copy (loc->gfid, local->gfid);
+ if (!gf_uuid_is_null (local->gfid))
+ gf_uuid_copy (loc->gfid, local->gfid);
STACK_WIND (frame, dht_selfheal_dir_xattr_cbk,
subvol, subvol->fops->setxattr,
@@ -1041,8 +1041,8 @@ dht_selfheal_dir_setattr (call_frame_t *frame, loc_t *loc, struct iatt *stbuf,
return 0;
}
- if (!uuid_is_null (local->gfid))
- uuid_copy (loc->gfid, local->gfid);
+ if (!gf_uuid_is_null (local->gfid))
+ gf_uuid_copy (loc->gfid, local->gfid);
local->call_cnt = missing_attr;
for (i = 0; i < layout->cnt; i++) {
@@ -1093,7 +1093,7 @@ dht_selfheal_dir_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret) {
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
gf_msg (this->name, ((op_errno == EEXIST) ? GF_LOG_DEBUG :
GF_LOG_WARNING),
op_errno, DHT_MSG_DIR_SELFHEAL_FAILED,
@@ -1188,7 +1188,7 @@ dht_selfheal_dir_mkdir (call_frame_t *frame, loc_t *loc,
}
local->call_cnt = missing_dirs;
- if (!uuid_is_null (local->gfid)) {
+ if (!gf_uuid_is_null (local->gfid)) {
dict = dict_new ();
if (!dict)
return -1;
@@ -1739,7 +1739,7 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
local = frame->local;
this = frame->this;
- uuid_unparse(loc->gfid, gfid);
+ gf_uuid_unparse(loc->gfid, gfid);
dht_layout_anomalies (this, loc, layout,
&local->selfheal.hole_cnt,
@@ -1915,7 +1915,7 @@ dht_dir_attr_heal (void *data)
(GF_SET_ATTR_UID | GF_SET_ATTR_GID),
NULL, NULL);
if (ret) {
- uuid_unparse(local->loc.gfid, gfid);
+ gf_uuid_unparse(local->loc.gfid, gfid);
gf_msg ("dht", GF_LOG_ERROR, -ret,
DHT_MSG_DIR_ATTR_HEAL_FAILED,
diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c
index 3987510441f..0c008d83653 100644
--- a/xlators/cluster/dht/src/dht-shared.c
+++ b/xlators/cluster/dht/src/dht-shared.c
@@ -579,7 +579,7 @@ dht_init (xlator_t *this)
goto err;
}
- if (uuid_parse (node_uuid, defrag->node_uuid)) {
+ if (gf_uuid_parse (node_uuid, defrag->node_uuid)) {
gf_msg (this->name, GF_LOG_ERROR, 0,
DHT_MSG_INVALID_OPTION, "Invalid option:"
" Cannot parse glusterd node uuid");
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index 7e3eaa02c02..51a6a8340e9 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -134,7 +134,7 @@ tier_migrate_using_query_file (void *_args)
continue;
}
- uuid_parse (gfid_str, query_record->gfid);
+ gf_uuid_parse (gfid_str, query_record->gfid);
if (dict_get(migrate_data, GF_XATTR_FILE_MIGRATE_KEY))
dict_del(migrate_data, GF_XATTR_FILE_MIGRATE_KEY);
@@ -181,7 +181,7 @@ tier_migrate_using_query_file (void *_args)
goto error;
}
- uuid_copy (p_loc.gfid, link_info->pargfid);
+ gf_uuid_copy (p_loc.gfid, link_info->pargfid);
p_loc.inode = inode_new (defrag->root_inode->table);
if (!p_loc.inode) {
@@ -206,9 +206,9 @@ tier_migrate_using_query_file (void *_args)
inode_unref (p_loc.inode);
p_loc.inode = linked_inode;
- uuid_copy (loc.gfid, query_record->gfid);
+ gf_uuid_copy (loc.gfid, query_record->gfid);
loc.inode = inode_new (defrag->root_inode->table);
- uuid_copy (loc.pargfid, link_info->pargfid);
+ gf_uuid_copy (loc.pargfid, link_info->pargfid);
loc.parent = inode_ref(p_loc.inode);
loc.name = gf_strdup (link_info->file_name);
@@ -229,7 +229,7 @@ tier_migrate_using_query_file (void *_args)
goto error;
}
- uuid_copy (loc.parent->gfid, link_info->pargfid);
+ gf_uuid_copy (loc.parent->gfid, link_info->pargfid);
ret = syncop_lookup (this, &loc, NULL, &current,
NULL, NULL);
@@ -313,7 +313,7 @@ tier_gf_query_callback (gfdb_query_record_t *gfdb_query_record,
GF_VALIDATE_OR_GOTO ("tier", query_cbk_args->defrag, out);
GF_VALIDATE_OR_GOTO ("tier", query_cbk_args->queryFILE, out);
- uuid_unparse (gfdb_query_record->gfid, gfid_str);
+ gf_uuid_unparse (gfdb_query_record->gfid, gfid_str);
fprintf (query_cbk_args->queryFILE, "%s|%s|%ld\n", gfid_str,
gfdb_query_record->_link_info_str,
gfdb_query_record->link_info_size);
diff --git a/xlators/cluster/dht/src/unittest/dht_layout_mock.c b/xlators/cluster/dht/src/unittest/dht_layout_mock.c
index a5c6357a3da..faf871d49be 100644
--- a/xlators/cluster/dht/src/unittest/dht_layout_mock.c
+++ b/xlators/cluster/dht/src/unittest/dht_layout_mock.c
@@ -62,7 +62,7 @@ int _gf_log_callingfn (const char *domain, const char *file,
return 0;
}
-void uuid_unparse(const uuid_t uu, char *out)
+void gf_uuid_unparse(const uuid_t uu, char *out)
{
// could call a will-return function here
// to place the correct data in *out
diff --git a/xlators/cluster/ec/src/ec-combine.c b/xlators/cluster/ec/src/ec-combine.c
index a644d26ce82..709da555627 100644
--- a/xlators/cluster/ec/src/ec-combine.c
+++ b/xlators/cluster/ec/src/ec-combine.c
@@ -64,7 +64,7 @@ int32_t ec_iatt_combine(struct iatt * dst, struct iatt * src, int32_t count)
(dst[i].ia_size != src[i].ia_size)) ||
(st_mode_from_ia(dst[i].ia_prot, dst[i].ia_type) !=
st_mode_from_ia(src[i].ia_prot, src[i].ia_type)) ||
- (uuid_compare(dst[i].ia_gfid, src[i].ia_gfid) != 0))
+ (gf_uuid_compare(dst[i].ia_gfid, src[i].ia_gfid) != 0))
{
gf_log(THIS->name, GF_LOG_WARNING,
"Failed to combine iatt (inode: %lu-%lu, links: %u-%u, "
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c
index 1cae44fd0c9..7354277da1b 100644
--- a/xlators/cluster/ec/src/ec-common.c
+++ b/xlators/cluster/ec/src/ec-common.c
@@ -603,7 +603,7 @@ ec_lock_t * ec_lock_allocate(xlator_t * xl, int32_t kind, loc_t * loc)
ec_lock_t * lock;
if ((loc->inode == NULL) ||
- (uuid_is_null(loc->gfid) && uuid_is_null(loc->inode->gfid)))
+ (gf_uuid_is_null(loc->gfid) && gf_uuid_is_null(loc->inode->gfid)))
{
gf_log(xl->name, GF_LOG_ERROR, "Trying to lock based on an invalid "
"inode");
@@ -636,7 +636,7 @@ void ec_lock_destroy(ec_lock_t * lock)
int32_t ec_lock_compare(ec_lock_t * lock1, ec_lock_t * lock2)
{
- return uuid_compare(lock1->loc.gfid, lock2->loc.gfid);
+ return gf_uuid_compare(lock1->loc.gfid, lock2->loc.gfid);
}
ec_lock_link_t *ec_lock_insert(ec_fop_data_t *fop, ec_lock_t *lock,
@@ -1156,7 +1156,7 @@ void ec_get_size_version(ec_fop_data_t * fop)
{
goto out;
}
- if (uuid_is_null(loc.pargfid))
+ if (gf_uuid_is_null(loc.pargfid))
{
if (loc.parent != NULL)
{
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
index 6b513df8fe7..d82592d666e 100644
--- a/xlators/cluster/ec/src/ec-heal.c
+++ b/xlators/cluster/ec/src/ec-heal.c
@@ -357,7 +357,7 @@ int32_t ec_heal_create(ec_heal_t * heal, uintptr_t mask, int32_t try_link)
{
memset(&loc, 0, sizeof(loc));
loc.inode = heal->loc.inode;
- uuid_copy(loc.gfid, heal->iatt.ia_gfid);
+ gf_uuid_copy(loc.gfid, heal->iatt.ia_gfid);
ec_link(heal->fop->frame, heal->xl, mask, EC_MINIMUM_ONE,
ec_heal_link_cbk, heal, &loc, &heal->loc, xdata);
@@ -717,7 +717,7 @@ void ec_heal_prepare_others(ec_heal_t * heal)
else
{
if ((heal->iatt.ia_type != cbk->iatt[0].ia_type) ||
- (uuid_compare(heal->iatt.ia_gfid, cbk->iatt[0].ia_gfid) != 0))
+ (gf_uuid_compare(heal->iatt.ia_gfid, cbk->iatt[0].ia_gfid) != 0))
{
ec_heal_remove(heal, cbk);
}
@@ -846,7 +846,7 @@ int32_t ec_heal_open_others(ec_heal_t * heal)
cbk = list_entry(item, ec_cbk_data_t, list);
if ((cbk->op_ret < 0) || (cbk->iatt[0].ia_type != IA_IFREG) ||
- (uuid_compare(heal->iatt.ia_gfid, cbk->iatt[0].ia_gfid) != 0))
+ (gf_uuid_compare(heal->iatt.ia_gfid, cbk->iatt[0].ia_gfid) != 0))
{
ec_heal_exclude(heal, cbk->mask);
}
@@ -1293,7 +1293,7 @@ ec_manager_heal (ec_fop_data_t * fop, int32_t state)
heal = fop->heal;
/* root loc doesn't have pargfid/parent */
if (loc_is_root (&heal->loc) ||
- !uuid_is_null(heal->loc.pargfid) || heal->loc.parent) {
+ !gf_uuid_is_null(heal->loc.pargfid) || heal->loc.parent) {
heal->nameheal = _gf_true;
return EC_STATE_DISPATCH;
} else {
@@ -1332,7 +1332,7 @@ ec_manager_heal (ec_fop_data_t * fop, int32_t state)
return EC_STATE_HEAL_DISPATCH;
/* Only heal data/metadata if enough information is supplied. */
- if (uuid_is_null(heal->loc.gfid))
+ if (gf_uuid_is_null(heal->loc.gfid))
{
ec_heal_entrylk(heal, ENTRYLK_UNLOCK);
diff --git a/xlators/cluster/ec/src/ec-heald.c b/xlators/cluster/ec/src/ec-heald.c
index 6b899414d4d..c4b896a5fb3 100644
--- a/xlators/cluster/ec/src/ec-heald.c
+++ b/xlators/cluster/ec/src/ec-heald.c
@@ -144,7 +144,7 @@ ec_shd_inode_find (xlator_t *this, xlator_t *subvol, uuid_t gfid)
loc.inode = inode_new (this->itable);
if (!loc.inode)
goto out;
- uuid_copy (loc.gfid, gfid);
+ gf_uuid_copy (loc.gfid, gfid);
ret = syncop_lookup (subvol, &loc, NULL, &iatt, NULL, NULL);
if (ret < 0)
@@ -169,7 +169,7 @@ ec_shd_index_inode (xlator_t *this, xlator_t *subvol)
void *index_gfid = NULL;
rootloc.inode = inode_ref (this->itable->root);
- uuid_copy (rootloc.gfid, rootloc.inode->gfid);
+ gf_uuid_copy (rootloc.gfid, rootloc.inode->gfid);
ret = syncop_getxattr (subvol, &rootloc, &xattr,
GF_XATTROP_INDEX_GFID, NULL);
@@ -234,7 +234,7 @@ ec_shd_index_heal (xlator_t *subvol, gf_dirent_t *entry, loc_t *parent,
gf_log (healer->this->name, GF_LOG_DEBUG, "got entry: %s",
entry->d_name);
- ret = uuid_parse (entry->d_name, loc.gfid);
+ ret = gf_uuid_parse (entry->d_name, loc.gfid);
if (ret)
return 0;
@@ -301,7 +301,7 @@ ec_shd_full_heal (xlator_t *subvol, gf_dirent_t *entry, loc_t *parent,
loc.parent = inode_ref (parent->inode);
loc.name = entry->d_name;
- uuid_copy (loc.gfid, entry->d_stat.ia_gfid);
+ gf_uuid_copy (loc.gfid, entry->d_stat.ia_gfid);
/* If this fails with ENOENT/ESTALE index is stale */
ret = syncop_gfid_to_path (this->itable, subvol, loc.gfid,
diff --git a/xlators/cluster/ec/src/ec-helpers.c b/xlators/cluster/ec/src/ec-helpers.c
index 139957b55c6..65deba63959 100644
--- a/xlators/cluster/ec/src/ec-helpers.c
+++ b/xlators/cluster/ec/src/ec-helpers.c
@@ -256,19 +256,19 @@ int32_t ec_dict_del_config(dict_t * dict, char * key, ec_config_t * config)
int32_t ec_loc_gfid_check(xlator_t * xl, uuid_t dst, uuid_t src)
{
- if (uuid_is_null(src))
+ if (gf_uuid_is_null(src))
{
return 1;
}
- if (uuid_is_null(dst))
+ if (gf_uuid_is_null(dst))
{
- uuid_copy(dst, src);
+ gf_uuid_copy(dst, src);
return 1;
}
- if (uuid_compare(dst, src) != 0)
+ if (gf_uuid_compare(dst, src) != 0)
{
gf_log(xl->name, GF_LOG_WARNING, "Mismatching GFID's in loc");
@@ -287,7 +287,7 @@ int32_t ec_loc_setup_inode(xlator_t *xl, loc_t *loc)
goto out;
}
} else if (loc->parent != NULL) {
- if (!uuid_is_null(loc->gfid)) {
+ if (!gf_uuid_is_null(loc->gfid)) {
loc->inode = inode_find(loc->parent->table, loc->gfid);
} else if (loc->path && strchr (loc->path, '/')) {
loc->inode = inode_resolve(loc->parent->table, (char *)loc->path);
@@ -310,7 +310,7 @@ int32_t ec_loc_setup_parent(xlator_t *xl, loc_t *loc)
goto out;
}
} else if (loc->inode != NULL) {
- if (!uuid_is_null(loc->pargfid)) {
+ if (!gf_uuid_is_null(loc->pargfid)) {
loc->parent = inode_find(loc->inode->table, loc->pargfid);
} else if (loc->path && strchr (loc->path, '/')) {
path = gf_strdup(loc->path);
@@ -385,8 +385,8 @@ int32_t ec_loc_parent(xlator_t *xl, loc_t *loc, loc_t *parent)
if (loc->parent != NULL) {
parent->inode = inode_ref(loc->parent);
}
- if (!uuid_is_null(loc->pargfid)) {
- uuid_copy(parent->gfid, loc->pargfid);
+ if (!gf_uuid_is_null(loc->pargfid)) {
+ gf_uuid_copy(parent->gfid, loc->pargfid);
}
if (loc->path && strchr (loc->path, '/')) {
str = gf_strdup(loc->path);
@@ -412,7 +412,7 @@ int32_t ec_loc_parent(xlator_t *xl, loc_t *loc, loc_t *parent)
}
if ((parent->inode == NULL) && (parent->path == NULL) &&
- uuid_is_null(parent->gfid)) {
+ gf_uuid_is_null(parent->gfid)) {
gf_log(xl->name, GF_LOG_ERROR, "Parent inode missing for loc_t");
goto out;
@@ -441,7 +441,7 @@ int32_t ec_loc_update(xlator_t *xl, loc_t *loc, inode_t *inode,
inode_unref(loc->inode);
}
loc->inode = inode_ref(inode);
- uuid_copy(loc->gfid, inode->gfid);
+ gf_uuid_copy(loc->gfid, inode->gfid);
}
if (iatt != NULL) {
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index 8896d7a2ad2..7ac131b2ca9 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -244,11 +244,11 @@ stripe_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (local->postparent_size < postparent->ia_size)
local->postparent_size = postparent->ia_size;
- if (uuid_is_null (local->ia_gfid))
- uuid_copy (local->ia_gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->ia_gfid))
+ gf_uuid_copy (local->ia_gfid, buf->ia_gfid);
/* Make sure the gfid on all the nodes are same */
- if (uuid_compare (local->ia_gfid, buf->ia_gfid)) {
+ if (gf_uuid_compare (local->ia_gfid, buf->ia_gfid)) {
gf_log (this->name, GF_LOG_WARNING,
"%s: gfid different on subvolume %s",
local->loc.path, prev->this->name);
@@ -259,7 +259,7 @@ stripe_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (!callcnt) {
if (local->op_ret == 0 && local->entry_self_heal_needed &&
- !uuid_is_null (local->loc.inode->gfid))
+ !gf_uuid_is_null (local->loc.inode->gfid))
stripe_entry_self_heal (frame, this, local);
if (local->failed)
@@ -1485,8 +1485,8 @@ stripe_mknod_ifreg_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* Can be used as a mechanism to understand if mknod
was successful in at least one place */
- if (uuid_is_null (local->ia_gfid))
- uuid_copy (local->ia_gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->ia_gfid))
+ gf_uuid_copy (local->ia_gfid, buf->ia_gfid);
if (stripe_ctx_handle(this, prev, local, xdata))
gf_log(this->name, GF_LOG_ERROR,
@@ -1512,7 +1512,7 @@ stripe_mknod_ifreg_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (local->failed)
local->op_ret = -1;
- if ((local->op_ret == -1) && !uuid_is_null (local->ia_gfid)) {
+ if ((local->op_ret == -1) && !gf_uuid_is_null (local->ia_gfid)) {
/* ia_gfid set means, at least on one node 'mknod'
is successful */
local->call_count = priv->child_count;
@@ -1590,8 +1590,8 @@ stripe_mknod_first_ifreg_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->preparent = *preparent;
local->postparent = *postparent;
- if (uuid_is_null (local->ia_gfid))
- uuid_copy (local->ia_gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->ia_gfid))
+ gf_uuid_copy (local->ia_gfid, buf->ia_gfid);
local->preparent.ia_blocks = local->preparent_blocks;
local->preparent.ia_size = local->preparent_size;
local->postparent.ia_blocks = local->postparent_blocks;
@@ -4910,7 +4910,7 @@ stripe_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
loc.inode = inode_ref (local_entry->inode);
- uuid_copy (loc.gfid, local_entry->d_stat.ia_gfid);
+ gf_uuid_copy (loc.gfid, local_entry->d_stat.ia_gfid);
local_ent->orig_frame = frame;
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 6fba80c5e43..7acc3803107 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -450,7 +450,7 @@ ios_stat_add_to_list (struct ios_stat_head *list_head, uint64_t value,
if (cnt == list_head->members)
last = entry;
- if (!uuid_compare (iosstat->gfid,
+ if (!gf_uuid_compare (iosstat->gfid,
entry->iosstat->gfid)) {
list_entry = entry;
found = cnt;
@@ -1258,7 +1258,7 @@ io_stats_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto unwind;
}
iosstat->filename = gf_strdup (path);
- uuid_copy (iosstat->gfid, buf->ia_gfid);
+ gf_uuid_copy (iosstat->gfid, buf->ia_gfid);
LOCK_INIT (&iosstat->lock);
ios_inode_ctx_set (fd->inode, this, iosstat);
@@ -1308,7 +1308,7 @@ io_stats_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_io_stats_mt_ios_stat);
if (iosstat) {
iosstat->filename = gf_strdup (path);
- uuid_copy (iosstat->gfid, fd->inode->gfid);
+ gf_uuid_copy (iosstat->gfid, fd->inode->gfid);
LOCK_INIT (&iosstat->lock);
ios_inode_ctx_set (fd->inode, this, iosstat);
}
@@ -1562,7 +1562,7 @@ io_stats_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (iosstat) {
LOCK_INIT (&iosstat->lock);
iosstat->filename = gf_strdup(path);
- uuid_copy (iosstat->gfid, buf->ia_gfid);
+ gf_uuid_copy (iosstat->gfid, buf->ia_gfid);
ios_inode_ctx_set (inode, this, iosstat);
}
diff --git a/xlators/encryption/crypt/src/crypt.c b/xlators/encryption/crypt/src/crypt.c
index 750fa887f78..2c296061ff7 100644
--- a/xlators/encryption/crypt/src/crypt.c
+++ b/xlators/encryption/crypt/src/crypt.c
@@ -4014,7 +4014,7 @@ static int32_t crypt_lookup_cbk(call_frame_t *frame,
local->postbuf = *postparent;
if (xdata)
local->xdata = dict_ref(xdata);
- uuid_copy(local->loc->gfid, buf->ia_gfid);
+ gf_uuid_copy(local->loc->gfid, buf->ia_gfid);
STACK_WIND(frame,
load_file_size,
diff --git a/xlators/features/barrier/src/barrier.c b/xlators/features/barrier/src/barrier.c
index d94953bf30e..9620a73e71b 100644
--- a/xlators/features/barrier/src/barrier.c
+++ b/xlators/features/barrier/src/barrier.c
@@ -29,7 +29,7 @@ barrier_local_set_gfid (call_frame_t *frame, uuid_t gfid, xlator_t *this)
". gfid will not be dumped in statedump file.");
return;
}
- uuid_copy (*id, gfid);
+ gf_uuid_copy (*id, gfid);
frame->local = id;
}
}
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c
index ba326346cdf..d808c0dc69c 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.c
@@ -205,7 +205,7 @@ br_object_lookup (xlator_t *this, br_object_t *object,
goto out;
}
- uuid_copy (loc.gfid, object->gfid);
+ gf_uuid_copy (loc.gfid, object->gfid);
ret = syncop_lookup (object->child->xl, &loc, NULL, iatt, NULL, NULL);
if (ret < 0)
@@ -251,7 +251,7 @@ br_object_open (xlator_t *this,
}
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
ret = syncop_open (object->child->xl, &loc, O_RDONLY, fd);
if (ret) {
@@ -618,7 +618,7 @@ br_initialize_object (xlator_t *this, br_child_t *child, changelog_event_t *ev)
object->this = this;
object->child = child;
- uuid_copy (object->gfid, ev->u.releasebr.gfid);
+ gf_uuid_copy (object->gfid, ev->u.releasebr.gfid);
/* NOTE: it's BE, but no worry */
object->signedversion = ev->u.releasebr.version;
@@ -677,9 +677,9 @@ br_brick_callback (void *xl, char *brick,
GF_VALIDATE_OR_GOTO (this->name, this->private, out);
GF_ASSERT (ev->ev_type == CHANGELOG_OP_TYPE_BR_RELEASE);
- GF_ASSERT (!uuid_is_null (ev->u.releasebr.gfid));
+ GF_ASSERT (!gf_uuid_is_null (ev->u.releasebr.gfid));
- uuid_copy (gfid, ev->u.releasebr.gfid);
+ gf_uuid_copy (gfid, ev->u.releasebr.gfid);
gf_log (this->name, GF_LOG_DEBUG,
"RELEASE EVENT [GFID %s]", uuid_utoa (gfid));
@@ -830,7 +830,7 @@ br_prepare_loc (xlator_t *this, br_child_t *child, loc_t *parent,
}
loc->parent = inode_ref (parent->inode);
- uuid_copy (loc->pargfid, parent->inode->gfid);
+ gf_uuid_copy (loc->pargfid, parent->inode->gfid);
ret = inode_path (parent->inode, entry->d_name, (char **)&loc->path);
if (ret < 0 || !loc->path) {
@@ -1076,7 +1076,7 @@ br_brick_connect (xlator_t *this, br_child_t *child)
priv = this->private;
loc.inode = inode_ref (child->table->root);
- uuid_copy (loc.gfid, loc.inode->gfid);
+ gf_uuid_copy (loc.gfid, loc.inode->gfid);
loc.path = gf_strdup ("/");
ret = syncop_lookup (child->xl, &loc, NULL, &buf, NULL, &parent);
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
index 0a2be5f6b42..1a268e16b93 100644
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
@@ -282,7 +282,7 @@ br_stub_fill_local (br_stub_local_t *local,
local->u.context.fd = fd_ref (fd);
if (inode)
local->u.context.inode = inode_ref (inode);
- uuid_copy (local->u.context.gfid, gfid);
+ gf_uuid_copy (local->u.context.gfid, gfid);
/* mark inode dirty/fresh according to durability */
local->u.context.markdirty = (dirty) ? _gf_true : _gf_false;
@@ -799,8 +799,8 @@ br_stub_getxattr (call_frame_t *frame, xlator_t *this,
if (name
&& (strncmp (name, GLUSTERFS_GET_BR_STUB_INIT_TIME,
strlen (GLUSTERFS_GET_BR_STUB_INIT_TIME)) == 0)
- && ((uuid_compare (loc->gfid, rootgfid) == 0)
- || (uuid_compare (loc->inode->gfid, rootgfid) == 0))) {
+ && ((gf_uuid_compare (loc->gfid, rootgfid) == 0)
+ || (gf_uuid_compare (loc->inode->gfid, rootgfid) == 0))) {
br_stub_send_stub_init_time (frame, this);
return 0;
}
@@ -844,7 +844,7 @@ br_stub_fgetxattr (call_frame_t *frame, xlator_t *this,
if (name
&& (strncmp (name, GLUSTERFS_GET_BR_STUB_INIT_TIME,
strlen (GLUSTERFS_GET_BR_STUB_INIT_TIME)) == 0)
- && (uuid_compare (fd->inode->gfid, rootgfid) == 0)) {
+ && (gf_uuid_compare (fd->inode->gfid, rootgfid) == 0)) {
br_stub_send_stub_init_time (frame, this);
return 0;
}
@@ -1269,7 +1269,7 @@ br_stub_send_ipc_fop (xlator_t *this,
ev.ev_type = CHANGELOG_OP_TYPE_BR_RELEASE;
ev.u.releasebr.flags = flags;
ev.u.releasebr.version = releaseversion;
- uuid_copy (ev.u.releasebr.gfid, fd->inode->gfid);
+ gf_uuid_copy (ev.u.releasebr.gfid, fd->inode->gfid);
xdata = dict_new ();
if (!xdata) {
diff --git a/xlators/features/changelog/src/changelog-helpers.c b/xlators/features/changelog/src/changelog-helpers.c
index 5c755d76d69..ca326043acc 100644
--- a/xlators/features/changelog/src/changelog-helpers.c
+++ b/xlators/features/changelog/src/changelog-helpers.c
@@ -796,7 +796,7 @@ changelog_local_init (xlator_t *this, inode_t *inode,
local->update_no_check = update_flag;
- uuid_copy (local->cld.cld_gfid, gfid);
+ gf_uuid_copy (local->cld.cld_gfid, gfid);
local->cld.cld_iobuf = iobuf;
local->cld.cld_xtra_records = 0; /* set by the caller */
diff --git a/xlators/features/changelog/src/changelog-helpers.h b/xlators/features/changelog/src/changelog-helpers.h
index aca2e706e0c..765d5fd878b 100644
--- a/xlators/features/changelog/src/changelog-helpers.h
+++ b/xlators/features/changelog/src/changelog-helpers.h
@@ -557,7 +557,7 @@ __changelog_inode_ctx_get (xlator_t *, inode_t *, unsigned long **,
co->co_convert = converter; \
co->co_free = freefn; \
co->co_type = CHANGELOG_OPT_REC_ENTRY; \
- uuid_copy (co->co_entry.cef_uuid, pargfid); \
+ gf_uuid_copy (co->co_entry.cef_uuid, pargfid); \
co->co_entry.cef_bname = gf_strdup(bname); \
if (!co->co_entry.cef_bname) \
goto label; \
diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c
index 1c7166e52b5..e6553c7f6bb 100644
--- a/xlators/features/changelog/src/changelog.c
+++ b/xlators/features/changelog/src/changelog.c
@@ -575,7 +575,7 @@ changelog_mkdir (call_frame_t *frame, xlator_t *this,
"failed to get gfid from dict");
goto wind;
}
- uuid_copy (gfid, uuid_req);
+ gf_uuid_copy (gfid, uuid_req);
CHANGELOG_INIT_NOCHECK (this, frame->local, NULL, gfid, 5);
@@ -711,7 +711,7 @@ changelog_symlink (call_frame_t *frame, xlator_t *this,
"failed to get gfid from dict");
goto wind;
}
- uuid_copy (gfid, uuid_req);
+ gf_uuid_copy (gfid, uuid_req);
CHANGELOG_INIT_NOCHECK (this, frame->local, NULL, gfid, 2);
@@ -839,7 +839,7 @@ changelog_mknod (call_frame_t *frame,
"failed to get gfid from dict");
goto wind;
}
- uuid_copy (gfid, uuid_req);
+ gf_uuid_copy (gfid, uuid_req);
CHANGELOG_INIT_NOCHECK (this, frame->local, NULL, gfid, 5);
@@ -923,7 +923,7 @@ changelog_create_cbk (call_frame_t *frame,
/* fill the event structure.. similar to open() */
ev.ev_type = CHANGELOG_OP_TYPE_CREATE;
- uuid_copy (ev.u.create.gfid, buf->ia_gfid);
+ gf_uuid_copy (ev.u.create.gfid, buf->ia_gfid);
ev.u.create.flags = fd->flags;
changelog_dispatch_event (this, priv, &ev);
@@ -993,7 +993,7 @@ changelog_create (call_frame_t *frame, xlator_t *this,
"failed to get gfid from dict");
goto wind;
}
- uuid_copy (gfid, uuid_req);
+ gf_uuid_copy (gfid, uuid_req);
/* init with two extra records */
CHANGELOG_INIT_NOCHECK (this, frame->local, NULL, gfid, 5);
@@ -1676,7 +1676,7 @@ changelog_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* fill the event structure */
ev.ev_type = CHANGELOG_OP_TYPE_OPEN;
- uuid_copy (ev.u.open.gfid, fd->inode->gfid);
+ gf_uuid_copy (ev.u.open.gfid, fd->inode->gfid);
ev.u.open.flags = fd->flags;
changelog_dispatch_event (this, priv, &ev);
@@ -1768,7 +1768,7 @@ changelog_release (xlator_t *this, fd_t *fd)
priv = this->private;
ev.ev_type = CHANGELOG_OP_TYPE_RELEASE;
- uuid_copy (ev.u.release.gfid, fd->inode->gfid);
+ gf_uuid_copy (ev.u.release.gfid, fd->inode->gfid);
changelog_dispatch_event (this, priv, &ev);
(void) fd_ctx_del (fd, this, NULL);
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c
index 4a3ee339676..21772ab1a7e 100644
--- a/xlators/features/changetimerecorder/src/changetimerecorder.c
+++ b/xlators/features/changetimerecorder/src/changetimerecorder.c
@@ -703,7 +703,7 @@ ctr_mknod (call_frame_t *frame, xlator_t *this,
"failed to get gfid from dict");
goto out;
}
- uuid_copy (gfid, uuid_req);
+ gf_uuid_copy (gfid, uuid_req);
/*fill ctr link context*/
FILL_CTR_LINK_CX (_link_cx, loc->pargfid, loc->name, loc->path);
@@ -777,7 +777,7 @@ ctr_create (call_frame_t *frame, xlator_t *this,
"failed to get gfid from dict");
goto out;
}
- uuid_copy (gfid, uuid_req);
+ gf_uuid_copy (gfid, uuid_req);
/*fill ctr link context*/
FILL_CTR_LINK_CX(_link_cx, loc->pargfid, loc->name, loc->path);
diff --git a/xlators/features/changetimerecorder/src/ctr-helper.c b/xlators/features/changetimerecorder/src/ctr-helper.c
index 41eec753fe2..69d64d66690 100644
--- a/xlators/features/changetimerecorder/src/ctr-helper.c
+++ b/xlators/features/changetimerecorder/src/ctr-helper.c
@@ -91,13 +91,13 @@ fill_db_record_for_wind(gf_ctr_local_t *ctr_local,
}
/*Copy gfid into db record*/
- uuid_copy (CTR_DB_REC(ctr_local).gfid, *(ctr_inode_cx->gfid));
+ gf_uuid_copy (CTR_DB_REC(ctr_local).gfid, *(ctr_inode_cx->gfid));
/*Hard Links*/
if (isdentryfop(ctr_inode_cx->fop_type)) {
/*new link fop*/
if (NEW_LINK_CX(ctr_inode_cx)) {
- uuid_copy (CTR_DB_REC(ctr_local).pargfid,
+ gf_uuid_copy (CTR_DB_REC(ctr_local).pargfid,
*((NEW_LINK_CX(ctr_inode_cx))->pargfid));
strcpy (CTR_DB_REC(ctr_local).file_name,
NEW_LINK_CX(ctr_inode_cx)->basename);
@@ -106,7 +106,7 @@ fill_db_record_for_wind(gf_ctr_local_t *ctr_local,
}
/*rename fop*/
if (OLD_LINK_CX(ctr_inode_cx)) {
- uuid_copy (CTR_DB_REC(ctr_local).old_pargfid,
+ gf_uuid_copy (CTR_DB_REC(ctr_local).old_pargfid,
*((OLD_LINK_CX(ctr_inode_cx))->pargfid));
strcpy (CTR_DB_REC(ctr_local).old_file_name,
OLD_LINK_CX(ctr_inode_cx)->basename);
diff --git a/xlators/features/changetimerecorder/src/ctr-helper.h b/xlators/features/changetimerecorder/src/ctr-helper.h
index 9f381e4791c..c63b9c122d2 100644
--- a/xlators/features/changetimerecorder/src/ctr-helper.h
+++ b/xlators/features/changetimerecorder/src/ctr-helper.h
@@ -88,8 +88,8 @@ do {\
0, sizeof(gfdb_time_t));\
memset(&(ctr_local->gfdb_db_record.gfdb_unwind_change_time),\
0, sizeof(gfdb_time_t));\
- uuid_clear (ctr_local->gfdb_db_record.gfid);\
- uuid_clear (ctr_local->gfdb_db_record.pargfid);\
+ gf_uuid_clear (ctr_local->gfdb_db_record.gfid);\
+ gf_uuid_clear (ctr_local->gfdb_db_record.pargfid);\
memset(ctr_local->gfdb_db_record.file_name, 0, PATH_MAX);\
memset(ctr_local->gfdb_db_record.old_file_name, 0, PATH_MAX);\
ctr_local->gfdb_db_record.gfdb_fop_type = GFDB_FOP_INVALID_OP;\
diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c
index 119f795a2d3..d5054432d76 100644
--- a/xlators/features/gfid-access/src/gfid-access.c
+++ b/xlators/features/gfid-access/src/gfid-access.c
@@ -42,7 +42,7 @@ ga_valid_inode_loc_copy (loc_t *dst, loc_t *src, xlator_t *this)
}
inode_unref (dst->parent);
dst->parent = inode_ref ((inode_t*)value);
- uuid_copy (dst->pargfid, dst->parent->gfid);
+ gf_uuid_copy (dst->pargfid, dst->parent->gfid);
}
if (dst->inode) {
@@ -53,7 +53,7 @@ ga_valid_inode_loc_copy (loc_t *dst, loc_t *src, xlator_t *this)
}
inode_unref (dst->inode);
dst->inode = inode_ref ((inode_t*)value);
- uuid_copy (dst->gfid, dst->inode->gfid);
+ gf_uuid_copy (dst->gfid, dst->inode->gfid);
}
out:
@@ -305,18 +305,18 @@ ga_fill_tmp_loc (loc_t *loc, xlator_t *this, uuid_t gfid,
ret = inode_ctx_get (loc->inode, this, &value);
if (!ret) {
parent = (void *)value;
- if (uuid_is_null (parent->gfid))
+ if (gf_uuid_is_null (parent->gfid))
parent = loc->inode;
}
/* parent itself should be looked up */
- uuid_copy (new_loc->pargfid, parent->gfid);
+ gf_uuid_copy (new_loc->pargfid, parent->gfid);
new_loc->parent = inode_ref (parent);
new_loc->inode = inode_grep (parent->table, parent, bname);
if (!new_loc->inode) {
new_loc->inode = inode_new (parent->table);
- uuid_copy (new_loc->inode->gfid, gfid);
+ gf_uuid_copy (new_loc->inode->gfid, gfid);
}
loc_path (new_loc, bname);
@@ -331,7 +331,7 @@ ga_fill_tmp_loc (loc_t *loc, xlator_t *this, uuid_t gfid,
ret = -1;
goto out;
}
- uuid_copy (*gfid_ptr, gfid);
+ gf_uuid_copy (*gfid_ptr, gfid);
ret = dict_set_dynptr (xdata, "gfid-req", gfid_ptr, sizeof (uuid_t));
if (ret < 0)
goto out;
@@ -354,7 +354,7 @@ __is_gfid_access_dir (uuid_t gfid)
memset (aux_gfid, 0, 16);
aux_gfid[15] = GF_AUX_GFID;
- if (uuid_compare (gfid, aux_gfid) == 0)
+ if (gf_uuid_compare (gfid, aux_gfid) == 0)
return _gf_true;
return _gf_false;
@@ -517,7 +517,7 @@ ga_new_entry (call_frame_t *frame, xlator_t *this, loc_t *loc, data_t *data,
if (!args)
goto out;
- ret = uuid_parse (args->gfid, gfid);
+ ret = gf_uuid_parse (args->gfid, gfid);
if (ret)
goto out;
@@ -605,7 +605,7 @@ ga_heal_entry (call_frame_t *frame, xlator_t *this, loc_t *loc, data_t *data,
if (!args)
goto out;
- ret = uuid_parse (args->gfid, gfid);
+ ret = gf_uuid_parse (args->gfid, gfid);
if (ret)
goto out;
@@ -766,17 +766,17 @@ ga_virtual_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
inode = NULL;
}
- if (!uuid_is_null (cbk_inode->gfid)) {
+ if (!gf_uuid_is_null (cbk_inode->gfid)) {
/* if the previous linked inode is used, use the
same gfid */
- uuid_copy (random_gfid, cbk_inode->gfid);
+ gf_uuid_copy (random_gfid, cbk_inode->gfid);
} else {
/* replace the buf->ia_gfid to a random gfid
for directory, for files, what we received is fine */
- uuid_generate (random_gfid);
+ gf_uuid_generate (random_gfid);
}
- uuid_copy (buf->ia_gfid, random_gfid);
+ gf_uuid_copy (buf->ia_gfid, random_gfid);
for (i = 15; i > (15 - 8); i--) {
temp_ino += (uint64_t)(buf->ia_gfid[i]) << j;
@@ -858,7 +858,7 @@ ga_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
/* here, just send 'loc->gfid' and 'loc->inode' */
tmp_loc.inode = inode_ref (loc->inode);
- uuid_copy (tmp_loc.gfid, loc->inode->gfid);
+ gf_uuid_copy (tmp_loc.gfid, loc->inode->gfid);
STACK_WIND (frame, default_lookup_cbk,
FIRST_CHILD(this),
@@ -915,7 +915,7 @@ ga_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
/* make sure the 'basename' is actually a 'canonical-gfid',
otherwise, return error */
- ret = uuid_parse (loc->name, tmp_gfid);
+ ret = gf_uuid_parse (loc->name, tmp_gfid);
if (ret)
goto err;
@@ -953,7 +953,7 @@ discover:
if (xdata)
dict_del (xdata, "gfid-req");
- uuid_copy (tmp_loc.gfid, tmp_gfid);
+ gf_uuid_copy (tmp_loc.gfid, tmp_gfid);
/* if revalidate, then we need to have the proper reference */
if (inode) {
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index 827a96d75b9..0c962bbc6f3 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -191,7 +191,7 @@ index_get_index (index_priv_t *priv, uuid_t index)
{
LOCK (&priv->lock);
{
- uuid_copy (index, priv->index);
+ gf_uuid_copy (index, priv->index);
}
UNLOCK (&priv->lock);
}
@@ -204,9 +204,9 @@ index_generate_index (index_priv_t *priv, uuid_t index)
//To prevent duplicate generates.
//This method fails if number of contending threads is greater
//than MAX_LINK count of the fs
- if (!uuid_compare (priv->index, index))
- uuid_generate (priv->index);
- uuid_copy (index, priv->index);
+ if (!gf_uuid_compare (priv->index, index))
+ gf_uuid_generate (priv->index);
+ gf_uuid_copy (index, priv->index);
}
UNLOCK (&priv->lock);
}
@@ -398,7 +398,7 @@ index_add (xlator_t *this, uuid_t gfid, const char *subdir)
int fd = 0;
priv = this->private;
- GF_ASSERT_AND_GOTO_WITH_ERROR (this->name, !uuid_is_null (gfid),
+ GF_ASSERT_AND_GOTO_WITH_ERROR (this->name, !gf_uuid_is_null (gfid),
out, op_errno, EINVAL);
make_gfid_path (priv->index_basepath, subdir, gfid,
@@ -463,7 +463,7 @@ index_del (xlator_t *this, uuid_t gfid, const char *subdir)
char gfid_path[PATH_MAX] = {0};
priv = this->private;
- GF_ASSERT_AND_GOTO_WITH_ERROR (this->name, !uuid_is_null (gfid),
+ GF_ASSERT_AND_GOTO_WITH_ERROR (this->name, !gf_uuid_is_null (gfid),
out, op_errno, EINVAL);
make_gfid_path (priv->index_basepath, subdir, gfid,
gfid_path, sizeof (gfid_path));
@@ -576,7 +576,7 @@ __index_fd_ctx_get (fd_t *fd, xlator_t *this, index_fd_ctx_t **ctx)
index_priv_t *priv = NULL;
priv = this->private;
- if (uuid_compare (fd->inode->gfid, priv->xattrop_vgfid)) {
+ if (gf_uuid_compare (fd->inode->gfid, priv->xattrop_vgfid)) {
ret = -EINVAL;
goto out;
}
@@ -914,11 +914,11 @@ index_lookup_wrapper (call_frame_t *frame, xlator_t *this,
priv = this->private;
VALIDATE_OR_GOTO (loc, done);
- if (!uuid_compare (loc->gfid, priv->xattrop_vgfid)) {
+ if (!gf_uuid_compare (loc->gfid, priv->xattrop_vgfid)) {
make_index_dir_path (priv->index_basepath, XATTROP_SUBDIR,
path, sizeof (path));
is_dir = _gf_true;
- } else if (!uuid_compare (loc->pargfid, priv->xattrop_vgfid)) {
+ } else if (!gf_uuid_compare (loc->pargfid, priv->xattrop_vgfid)) {
make_file_path (priv->index_basepath, XATTROP_SUBDIR,
loc->name, path, sizeof (path));
}
@@ -943,9 +943,9 @@ index_lookup_wrapper (call_frame_t *frame, xlator_t *this,
iatt_from_stat (&stbuf, &lstatbuf);
if (is_dir)
- uuid_copy (stbuf.ia_gfid, priv->xattrop_vgfid);
+ gf_uuid_copy (stbuf.ia_gfid, priv->xattrop_vgfid);
else
- uuid_generate (stbuf.ia_gfid);
+ gf_uuid_generate (stbuf.ia_gfid);
stbuf.ia_ino = -1;
op_ret = 0;
done:
@@ -1023,9 +1023,9 @@ index_unlink_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc, int flag,
}
iatt_from_stat (&preparent, &lstatbuf);
- uuid_copy (preparent.ia_gfid, priv->xattrop_vgfid);
+ gf_uuid_copy (preparent.ia_gfid, priv->xattrop_vgfid);
preparent.ia_ino = -1;
- uuid_parse (loc->name, gfid);
+ gf_uuid_parse (loc->name, gfid);
ret = index_del (this, gfid, XATTROP_SUBDIR);
if (ret < 0) {
op_ret = -1;
@@ -1040,7 +1040,7 @@ index_unlink_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc, int flag,
goto done;
}
iatt_from_stat (&postparent, &lstatbuf);
- uuid_copy (postparent.ia_gfid, priv->xattrop_vgfid);
+ gf_uuid_copy (postparent.ia_gfid, priv->xattrop_vgfid);
postparent.ia_ino = -1;
done:
INDEX_STACK_UNWIND (unlink, frame, op_ret, op_errno, &preparent,
@@ -1084,8 +1084,8 @@ index_lookup (call_frame_t *frame, xlator_t *this,
priv = this->private;
- if (uuid_compare (loc->gfid, priv->xattrop_vgfid) &&
- uuid_compare (loc->pargfid, priv->xattrop_vgfid))
+ if (gf_uuid_compare (loc->gfid, priv->xattrop_vgfid) &&
+ gf_uuid_compare (loc->pargfid, priv->xattrop_vgfid))
goto normal;
stub = fop_lookup_stub (frame, index_lookup_wrapper, loc, xattr_req);
@@ -1110,7 +1110,7 @@ index_opendir (call_frame_t *frame, xlator_t *this,
index_priv_t *priv = NULL;
priv = this->private;
- if (uuid_compare (fd->inode->gfid, priv->xattrop_vgfid))
+ if (gf_uuid_compare (fd->inode->gfid, priv->xattrop_vgfid))
goto normal;
frame->local = NULL;
@@ -1131,7 +1131,7 @@ index_readdir (call_frame_t *frame, xlator_t *this,
index_priv_t *priv = NULL;
priv = this->private;
- if (uuid_compare (fd->inode->gfid, priv->xattrop_vgfid))
+ if (gf_uuid_compare (fd->inode->gfid, priv->xattrop_vgfid))
goto out;
stub = fop_readdir_stub (frame, index_readdir_wrapper, fd, size, off,
xdata);
@@ -1155,7 +1155,7 @@ index_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
index_priv_t *priv = NULL;
priv = this->private;
- if (uuid_compare (loc->pargfid, priv->xattrop_vgfid))
+ if (gf_uuid_compare (loc->pargfid, priv->xattrop_vgfid))
goto out;
stub = fop_unlink_stub (frame, index_unlink_wrapper, loc, xflag, xdata);
@@ -1308,8 +1308,8 @@ init (xlator_t *this)
if (ret)
goto out;
- uuid_generate (priv->index);
- uuid_generate (priv->xattrop_vgfid);
+ gf_uuid_generate (priv->index);
+ gf_uuid_generate (priv->xattrop_vgfid);
INIT_LIST_HEAD (&priv->callstubs);
this->private = priv;
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c
index e0a5f7c0533..5b1b2f9f446 100644
--- a/xlators/features/locks/src/common.c
+++ b/xlators/features/locks/src/common.c
@@ -437,7 +437,7 @@ pl_inode_get (xlator_t *this, inode_t *inode)
INIT_LIST_HEAD (&pl_inode->reservelk_list);
INIT_LIST_HEAD (&pl_inode->blocked_reservelks);
INIT_LIST_HEAD (&pl_inode->blocked_calls);
- uuid_copy (pl_inode->gfid, inode->gfid);
+ gf_uuid_copy (pl_inode->gfid, inode->gfid);
__inode_ctx_put (inode, this, (uint64_t)(long)(pl_inode));
}
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 610297abec7..ae513f3a28e 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -546,7 +546,7 @@ fetch_pathinfo (xlator_t *this, inode_t *inode, int32_t *op_errno,
if (!op_errno)
goto out;
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
loc.inode = inode_ref (inode);
ret = syncop_getxattr (FIRST_CHILD(this), &loc, &dict,
diff --git a/xlators/features/marker/src/marker-quota-helper.c b/xlators/features/marker/src/marker-quota-helper.c
index f13d5f650b9..67801c86403 100644
--- a/xlators/features/marker/src/marker-quota-helper.c
+++ b/xlators/features/marker/src/marker-quota-helper.c
@@ -37,8 +37,8 @@ mq_loc_fill (loc_t *loc, inode_t *inode, inode_t *parent, char *path)
if (parent)
loc->parent = inode_ref (parent);
- if (!uuid_is_null (inode->gfid))
- uuid_copy (loc->gfid, inode->gfid);
+ if (!gf_uuid_is_null (inode->gfid))
+ gf_uuid_copy (loc->gfid, inode->gfid);
loc->path = gf_strdup (path);
if (!loc->path) {
@@ -140,7 +140,7 @@ mq_get_contribution_node (inode_t *inode, quota_inode_ctx_t *ctx)
goto out;
list_for_each_entry (temp, &ctx->contribution_head, contri_list) {
- if (uuid_compare (temp->gfid, inode->gfid) == 0) {
+ if (gf_uuid_compare (temp->gfid, inode->gfid) == 0) {
contri = temp;
goto out;
}
@@ -171,7 +171,7 @@ __mq_add_new_contribution_node (xlator_t *this, quota_inode_ctx_t *ctx,
inode_contribution_t *contribution = NULL;
if (!loc->parent) {
- if (!uuid_is_null (loc->pargfid))
+ if (!gf_uuid_is_null (loc->pargfid))
loc->parent = inode_find (loc->inode->table,
loc->pargfid);
@@ -185,7 +185,7 @@ __mq_add_new_contribution_node (xlator_t *this, quota_inode_ctx_t *ctx,
list_for_each_entry (contribution, &ctx->contribution_head,
contri_list) {
if (loc->parent &&
- uuid_compare (contribution->gfid, loc->parent->gfid) == 0) {
+ gf_uuid_compare (contribution->gfid, loc->parent->gfid) == 0) {
goto out;
}
}
@@ -196,7 +196,7 @@ __mq_add_new_contribution_node (xlator_t *this, quota_inode_ctx_t *ctx,
contribution->contribution = 0;
- uuid_copy (contribution->gfid, loc->parent->gfid);
+ gf_uuid_copy (contribution->gfid, loc->parent->gfid);
LOCK_INIT (&contribution->lock);
INIT_LIST_HEAD (&contribution->contri_list);
@@ -218,7 +218,7 @@ mq_add_new_contribution_node (xlator_t *this, quota_inode_ctx_t *ctx,
return NULL;
if (((loc->path) && (strcmp (loc->path, "/") == 0))
- || (!loc->path && uuid_is_null (loc->pargfid)))
+ || (!loc->path && gf_uuid_is_null (loc->pargfid)))
return NULL;
LOCK (&ctx->lock);
@@ -242,7 +242,7 @@ mq_dict_set_contribution (xlator_t *this, dict_t *dict, loc_t *loc,
GF_VALIDATE_OR_GOTO ("marker", dict, out);
GF_VALIDATE_OR_GOTO ("marker", loc, out);
- if (gfid && !uuid_is_null(gfid)) {
+ if (gfid && !gf_uuid_is_null(gfid)) {
GET_CONTRI_KEY (key, gfid, ret);
} else if (loc->parent) {
GET_CONTRI_KEY (key, loc->parent->gfid, ret);
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index 6034b963dfe..2975e564fa6 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -32,7 +32,7 @@ mq_loc_copy (loc_t *dst, loc_t *src)
GF_VALIDATE_OR_GOTO ("marker", src, out);
if (src->inode == NULL ||
- ((src->parent == NULL) && (uuid_is_null (src->pargfid))
+ ((src->parent == NULL) && (gf_uuid_is_null (src->pargfid))
&& !__is_root_gfid (src->inode->gfid))) {
gf_log ("marker", GF_LOG_WARNING,
"src loc is not valid");
@@ -173,7 +173,7 @@ mq_loc_fill_from_name (xlator_t *this, loc_t *newloc, loc_t *oldloc,
}
newloc->parent = inode_ref (oldloc->inode);
- uuid_copy (newloc->pargfid, oldloc->inode->gfid);
+ gf_uuid_copy (newloc->pargfid, oldloc->inode->gfid);
if (!oldloc->path) {
ret = loc_path (oldloc, NULL);
@@ -309,8 +309,8 @@ wind:
if (ret)
goto err;
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, local->loc.inode->gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, local->loc.inode->gfid);
GF_UUID_ASSERT (local->loc.gfid);
STACK_WIND (frame, mq_release_lock_on_dirty_inode,
@@ -382,8 +382,8 @@ mq_update_size_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
if (ret)
goto err;
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, buf->ia_gfid);
GF_UUID_ASSERT (local->loc.gfid);
@@ -447,8 +447,8 @@ mq_get_dirty_inode_size (call_frame_t *frame, xlator_t *this)
if (ret)
goto err;
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, local->loc.inode->gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, local->loc.inode->gfid);
GF_UUID_ASSERT (local->loc.gfid);
@@ -773,8 +773,8 @@ mq_check_if_still_dirty (call_frame_t *frame,
local->d_off = 0;
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, buf->ia_gfid);
GF_UUID_ASSERT (local->loc.gfid);
STACK_WIND(frame,
@@ -823,10 +823,10 @@ mq_get_dirty_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
if (ret)
goto err;
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, local->loc.inode->gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, local->loc.inode->gfid);
- if (uuid_is_null (local->loc.gfid)) {
+ if (gf_uuid_is_null (local->loc.gfid)) {
ret = -1;
goto err;
}
@@ -992,7 +992,7 @@ mq_create_dirty_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
goto err;
}
- uuid_copy (local->loc.gfid, local->loc.inode->gfid);
+ gf_uuid_copy (local->loc.gfid, local->loc.inode->gfid);
GF_UUID_ASSERT (local->loc.gfid);
STACK_WIND (frame, mq_xattr_creation_release_lock,
@@ -1057,9 +1057,9 @@ mq_create_xattr (xlator_t *this, call_frame_t *frame)
}
if ((local->loc.path && strcmp (local->loc.path, "/") != 0)
- || (local->loc.inode && !uuid_is_null (local->loc.inode->gfid) &&
+ || (local->loc.inode && !gf_uuid_is_null (local->loc.inode->gfid) &&
!__is_root_gfid (local->loc.inode->gfid))
- || (!uuid_is_null (local->loc.gfid)
+ || (!gf_uuid_is_null (local->loc.gfid)
&& !__is_root_gfid (local->loc.gfid))) {
contri = mq_add_new_contribution_node (this, ctx, &local->loc);
if (contri == NULL)
@@ -1073,7 +1073,7 @@ mq_create_xattr (xlator_t *this, call_frame_t *frame)
goto free_value;
}
- if (uuid_is_null (local->loc.gfid)) {
+ if (gf_uuid_is_null (local->loc.gfid)) {
ret = -1;
goto out;
}
@@ -1134,10 +1134,10 @@ mq_check_n_set_inode_xattr (call_frame_t *frame, void *cookie,
//check contribution xattr if not root
if ((local->loc.path && strcmp (local->loc.path, "/") != 0)
- || (!uuid_is_null (local->loc.gfid)
+ || (!gf_uuid_is_null (local->loc.gfid)
&& !__is_root_gfid (local->loc.gfid))
|| (local->loc.inode
- && !uuid_is_null (local->loc.inode->gfid)
+ && !gf_uuid_is_null (local->loc.inode->gfid)
&& !__is_root_gfid (local->loc.inode->gfid))) {
GET_CONTRI_KEY (contri_key, local->loc.parent->gfid, ret);
if (ret < 0)
@@ -1153,8 +1153,8 @@ out:
return 0;
create_xattr:
- if (uuid_is_null (local->loc.gfid)) {
- uuid_copy (local->loc.gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid)) {
+ gf_uuid_copy (local->loc.gfid, buf->ia_gfid);
}
mq_create_xattr (this, frame);
@@ -1187,10 +1187,10 @@ mq_get_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
goto err;
}
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, local->loc.inode->gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, local->loc.inode->gfid);
- if (uuid_is_null (local->loc.gfid)) {
+ if (gf_uuid_is_null (local->loc.gfid)) {
ret = -1;
goto err;
}
@@ -1527,7 +1527,7 @@ mq_mark_undirty (call_frame_t *frame,
goto err;
}
- uuid_copy (local->parent_loc.gfid, local->parent_loc.inode->gfid);
+ gf_uuid_copy (local->parent_loc.gfid, local->parent_loc.inode->gfid);
GF_UUID_ASSERT (local->parent_loc.gfid);
STACK_WIND (frame, mq_release_parent_lock,
@@ -1613,8 +1613,8 @@ mq_update_parent_size (call_frame_t *frame,
goto err;
}
- if (uuid_is_null (local->parent_loc.gfid))
- uuid_copy (local->parent_loc.gfid,
+ if (gf_uuid_is_null (local->parent_loc.gfid))
+ gf_uuid_copy (local->parent_loc.gfid,
local->parent_loc.inode->gfid);
GF_UUID_ASSERT (local->parent_loc.gfid);
@@ -1741,8 +1741,8 @@ unlock:
goto err;
}
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, buf->ia_gfid);
GF_UUID_ASSERT (local->loc.gfid);
@@ -1838,8 +1838,8 @@ mq_fetch_child_size_and_contri (call_frame_t *frame, void *cookie,
mq_set_ctx_updation_status (local->ctx, _gf_false);
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, local->loc.inode->gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, local->loc.inode->gfid);
GF_UUID_ASSERT (local->loc.gfid);
@@ -1900,7 +1900,7 @@ mq_markdirty (call_frame_t *frame, void *cookie,
if (ret == -1)
goto err;
- uuid_copy (local->parent_loc.gfid,
+ gf_uuid_copy (local->parent_loc.gfid,
local->parent_loc.inode->gfid);
GF_UUID_ASSERT (local->parent_loc.gfid);
@@ -2780,10 +2780,10 @@ mq_start_quota_txn_v2 (xlator_t *this, loc_t *loc, quota_inode_ctx_t *ctx,
goto out;
}
- if (uuid_is_null (child_loc.gfid))
- uuid_copy (child_loc.gfid, child_loc.inode->gfid);
+ if (gf_uuid_is_null (child_loc.gfid))
+ gf_uuid_copy (child_loc.gfid, child_loc.inode->gfid);
- if (uuid_is_null (child_loc.gfid)) {
+ if (gf_uuid_is_null (child_loc.gfid)) {
ret = -1;
gf_log (this->name, GF_LOG_DEBUG, "UUID is null for %s",
child_loc.path);
@@ -2906,10 +2906,10 @@ mq_create_xattrs_task (void *opaque)
this = args->this;
THIS = this;
- if (uuid_is_null (loc->gfid))
- uuid_copy (loc->gfid, loc->inode->gfid);
+ if (gf_uuid_is_null (loc->gfid))
+ gf_uuid_copy (loc->gfid, loc->inode->gfid);
- if (uuid_is_null (loc->gfid)) {
+ if (gf_uuid_is_null (loc->gfid)) {
ret = -1;
gf_log (this->name, GF_LOG_DEBUG, "UUID is null for %s",
loc->path);
@@ -3228,10 +3228,10 @@ mq_update_dirty_inode_v2 (xlator_t *this, loc_t *loc, quota_inode_ctx_t *ctx,
goto out;
}
- if (uuid_is_null (loc->gfid))
- uuid_copy (loc->gfid, loc->inode->gfid);
+ if (gf_uuid_is_null (loc->gfid))
+ gf_uuid_copy (loc->gfid, loc->inode->gfid);
- if (uuid_is_null (loc->gfid)) {
+ if (gf_uuid_is_null (loc->gfid)) {
ret = -1;
gf_log (this->name, GF_LOG_DEBUG, "UUID is null for %s",
loc->path);
@@ -3402,7 +3402,7 @@ mq_inspect_directory_xattr_task (void *opaque)
if (!loc_is_root(loc)) {
contribution = mq_add_new_contribution_node (this, ctx, loc);
if (contribution == NULL) {
- if (!uuid_is_null (loc->inode->gfid))
+ if (!gf_uuid_is_null (loc->inode->gfid))
gf_log (this->name, GF_LOG_DEBUG,
"cannot add a new contribution node "
"(%s)", uuid_utoa (loc->inode->gfid));
@@ -3720,9 +3720,9 @@ _mq_inode_remove_done (call_frame_t *frame, void *cookie, xlator_t *this,
else {
loc.parent = inode_ref (other_dentry->parent);
loc.name = gf_strdup (other_dentry->name);
- uuid_copy (loc.pargfid , other_dentry->parent->gfid);
+ gf_uuid_copy (loc.pargfid , other_dentry->parent->gfid);
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
inode_path (other_dentry->parent, other_dentry->name,
(char **)&loc.path);
@@ -3839,7 +3839,7 @@ mq_reduce_parent_size_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
if (ret < 0)
goto err;
- uuid_copy (local->parent_loc.gfid,
+ gf_uuid_copy (local->parent_loc.gfid,
local->parent_loc.inode->gfid);
GF_UUID_ASSERT (local->parent_loc.gfid);
diff --git a/xlators/features/marker/src/marker-quota.h b/xlators/features/marker/src/marker-quota.h
index 4600954c6a2..a81db7fa684 100644
--- a/xlators/features/marker/src/marker-quota.h
+++ b/xlators/features/marker/src/marker-quota.h
@@ -63,7 +63,7 @@
do { \
if (_gfid != NULL) { \
char _gfid_unparsed[40]; \
- uuid_unparse (_gfid, _gfid_unparsed); \
+ gf_uuid_unparse (_gfid, _gfid_unparsed); \
_ret = snprintf (var, CONTRI_KEY_MAX, \
QUOTA_XATTR_PREFIX \
".%s.%s." CONTRIBUTION, "quota", \
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index dc56714a94c..b1eb252c5c2 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -66,8 +66,8 @@ marker_loc_fill (loc_t *loc, inode_t *inode, inode_t *parent, char *path)
if (inode) {
loc->inode = inode_ref (inode);
- if (uuid_is_null (loc->gfid)) {
- uuid_copy (loc->gfid, loc->inode->gfid);
+ if (gf_uuid_is_null (loc->gfid)) {
+ gf_uuid_copy (loc->gfid, loc->inode->gfid);
}
}
@@ -501,8 +501,8 @@ marker_start_setxattr (call_frame_t *frame, xlator_t *this)
if (!dict)
goto out;
- if (local->loc.inode && uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, local->loc.inode->gfid);
+ if (local->loc.inode && gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, local->loc.inode->gfid);
GF_UUID_ASSERT (local->loc.gfid);
@@ -605,8 +605,8 @@ marker_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1 || local == NULL)
goto out;
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, buf->ia_gfid);
priv = this->private;
@@ -679,8 +679,8 @@ marker_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1 || local == NULL)
goto out;
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, buf->ia_gfid);
priv = this->private;
@@ -1089,7 +1089,7 @@ marker_rename_done (call_frame_t *frame, void *cookie, xlator_t *this,
if (priv->feature_enabled & GF_XTIME) {
//update marks on oldpath
- uuid_copy (local->loc.gfid, oplocal->loc.inode->gfid);
+ gf_uuid_copy (local->loc.gfid, oplocal->loc.inode->gfid);
marker_xtime_update_marks (this, oplocal);
marker_xtime_update_marks (this, local);
}
@@ -1244,7 +1244,7 @@ marker_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (newloc.name)
newloc.name++;
newloc.parent = inode_ref (local->loc.parent);
- uuid_copy (newloc.gfid, oplocal->loc.inode->gfid);
+ gf_uuid_copy (newloc.gfid, oplocal->loc.inode->gfid);
STACK_WIND_COOKIE (frame, marker_rename_release_oldp_lock,
frame->cookie, FIRST_CHILD(this),
@@ -1265,7 +1265,7 @@ marker_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (priv->feature_enabled & GF_XTIME) {
//update marks on oldpath
- uuid_copy (local->loc.gfid, oplocal->loc.inode->gfid);
+ gf_uuid_copy (local->loc.gfid, oplocal->loc.inode->gfid);
marker_xtime_update_marks (this, oplocal);
marker_xtime_update_marks (this, local);
}
@@ -1385,8 +1385,8 @@ marker_get_newpath_contribution (call_frame_t *frame, void *cookie,
* reset them in the callback.
*/
MARKER_SET_UID_GID (frame, local, frame->root);
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, local->loc.inode->gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, local->loc.inode->gfid);
GF_UUID_ASSERT (local->loc.gfid);
@@ -1439,8 +1439,8 @@ marker_get_oldpath_contribution (call_frame_t *frame, void *cookie,
*/
MARKER_SET_UID_GID (frame, local, frame->root);
- if (uuid_is_null (oplocal->loc.gfid))
- uuid_copy (oplocal->loc.gfid,
+ if (gf_uuid_is_null (oplocal->loc.gfid))
+ gf_uuid_copy (oplocal->loc.gfid,
oplocal->loc.inode->gfid);
GF_UUID_ASSERT (oplocal->loc.gfid);
@@ -1567,7 +1567,7 @@ marker_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
goto err;
if ((newloc->inode != NULL) && (newloc->parent != oldloc->parent)
- && (uuid_compare (newloc->parent->gfid,
+ && (gf_uuid_compare (newloc->parent->gfid,
oldloc->parent->gfid) < 0)) {
lock_on = &local->parent_loc;
local->next_lock_on = &oplocal->parent_loc;
@@ -1767,8 +1767,8 @@ marker_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1 || local == NULL)
goto out;
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, buf->ia_gfid);
priv = this->private;
@@ -1841,8 +1841,8 @@ marker_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1 || local == NULL)
goto out;
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, buf->ia_gfid);
priv = this->private;
@@ -2675,8 +2675,8 @@ marker_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
* would have not yet linked to the inode table which happens
* in protocol/server.
*/
- if (uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, buf->ia_gfid);
+ if (gf_uuid_is_null (local->loc.gfid))
+ gf_uuid_copy (local->loc.gfid, buf->ia_gfid);
if (priv->feature_enabled & GF_QUOTA) {
@@ -2915,7 +2915,7 @@ init_xtime_priv (xlator_t *this, dict_t *options)
if((data = dict_get (options, VOLUME_UUID)) != NULL) {
priv->volume_uuid = data->data;
- ret = uuid_parse (priv->volume_uuid, priv->volume_uuid_bin);
+ ret = gf_uuid_parse (priv->volume_uuid, priv->volume_uuid_bin);
if (ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
"invalid volume uuid %s", priv->volume_uuid);
diff --git a/xlators/features/qemu-block/src/bdrv-xlator.c b/xlators/features/qemu-block/src/bdrv-xlator.c
index 1e55b5fb70b..5a14f89e5af 100644
--- a/xlators/features/qemu-block/src/bdrv-xlator.c
+++ b/xlators/features/qemu-block/src/bdrv-xlator.c
@@ -96,15 +96,15 @@ qemu_gluster_open (BlockDriverState *bs, QDict *options, int bdrv_flags)
struct iatt buf = {0,};
uuid_t gfid;
- uuid_parse(gfid_str, gfid);
+ gf_uuid_parse(gfid_str, gfid);
loc.inode = inode_find(conf->root_inode->table, gfid);
if (!loc.inode) {
loc.inode = inode_new(conf->root_inode->table);
- uuid_copy(loc.inode->gfid, gfid);
+ gf_uuid_copy(loc.inode->gfid, gfid);
}
- uuid_copy(loc.gfid, loc.inode->gfid);
+ gf_uuid_copy(loc.gfid, loc.inode->gfid);
ret = syncop_lookup(FIRST_CHILD(THIS), &loc, NULL, &buf, NULL,
NULL);
if (ret) {
diff --git a/xlators/features/qemu-block/src/qb-coroutines.c b/xlators/features/qemu-block/src/qb-coroutines.c
index 974312f1268..7dee80d1d00 100644
--- a/xlators/features/qemu-block/src/qb-coroutines.c
+++ b/xlators/features/qemu-block/src/qb-coroutines.c
@@ -56,20 +56,20 @@ qb_format_and_resume (void *opaque)
/*
* See if the caller specified a backing image.
*/
- if (!uuid_is_null(qb_inode->backing_gfid) || qb_inode->backing_fname) {
+ if (!gf_uuid_is_null(qb_inode->backing_gfid) || qb_inode->backing_fname) {
loc_t loc = {0,};
char gfid_str[64];
struct iatt buf;
- if (!uuid_is_null(qb_inode->backing_gfid)) {
+ if (!gf_uuid_is_null(qb_inode->backing_gfid)) {
loc.inode = inode_find(qb_conf->root_inode->table,
qb_inode->backing_gfid);
if (!loc.inode) {
loc.inode = inode_new(qb_conf->root_inode->table);
- uuid_copy(loc.inode->gfid,
+ gf_uuid_copy(loc.inode->gfid,
qb_inode->backing_gfid);
}
- uuid_copy(loc.gfid, loc.inode->gfid);
+ gf_uuid_copy(loc.gfid, loc.inode->gfid);
} else if (qb_inode->backing_fname) {
loc.inode = inode_new(qb_conf->root_inode->table);
loc.name = qb_inode->backing_fname;
@@ -90,7 +90,7 @@ qb_format_and_resume (void *opaque)
goto err;
}
- uuid_copy(qb_inode->backing_gfid, buf.ia_gfid);
+ gf_uuid_copy(qb_inode->backing_gfid, buf.ia_gfid);
loc_wipe(&loc);
/*
@@ -100,7 +100,7 @@ qb_format_and_resume (void *opaque)
* the block subsystem needs to operate on the backing image on
* behalf of the clone.
*/
- uuid_unparse(qb_inode->backing_gfid, gfid_str);
+ gf_uuid_unparse(qb_inode->backing_gfid, gfid_str);
snprintf(base_filename, sizeof(base_filename),
"gluster://gfid:%s", gfid_str);
use_base = 1;
diff --git a/xlators/features/qemu-block/src/qemu-block.c b/xlators/features/qemu-block/src/qemu-block.c
index 6f3d28041b9..8cc78ff165c 100644
--- a/xlators/features/qemu-block/src/qemu-block.c
+++ b/xlators/features/qemu-block/src/qemu-block.c
@@ -141,7 +141,7 @@ qb_format_extract (xlator_t *this, char *format, inode_t *inode)
goto invalid;
ret = sscanf(s, "<gfid:%[^>]s", gfid_str);
if (ret == 1) {
- ret = uuid_parse(gfid_str, gfid);
+ ret = gf_uuid_parse(gfid_str, gfid);
if (ret < 0)
goto invalid;
}
@@ -164,8 +164,8 @@ qb_format_extract (xlator_t *this, char *format, inode_t *inode)
* associated with a backing image as a filename local to the parent
* directory. The format processing will validate further.
*/
- if (!uuid_is_null(gfid))
- uuid_copy(qb_inode->backing_gfid, gfid);
+ if (!gf_uuid_is_null(gfid))
+ gf_uuid_copy(qb_inode->backing_gfid, gfid);
else if (s)
qb_inode->backing_fname = gf_strdup(s);
diff --git a/xlators/features/quota/src/quota-enforcer-client.c b/xlators/features/quota/src/quota-enforcer-client.c
index ff4d341cc96..01cc4472664 100644
--- a/xlators/features/quota/src/quota-enforcer-client.c
+++ b/xlators/features/quota/src/quota-enforcer-client.c
@@ -164,8 +164,8 @@ quota_enforcer_lookup_cbk (struct rpc_req *req, struct iovec *iov,
(rsp.xdata.xdata_len), rsp.op_ret,
op_errno, out);
- if ((!uuid_is_null (inode->gfid))
- && (uuid_compare (stbuf.ia_gfid, inode->gfid) != 0)) {
+ if ((!gf_uuid_is_null (inode->gfid))
+ && (gf_uuid_compare (stbuf.ia_gfid, inode->gfid) != 0)) {
gf_log (frame->this->name, GF_LOG_DEBUG,
"gfid changed for %s", local->validate_loc.path);
rsp.op_ret = -1;
@@ -223,7 +223,7 @@ quota_enforcer_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
if (!(loc && loc->inode))
goto unwind;
- if (!uuid_is_null (loc->inode->gfid))
+ if (!gf_uuid_is_null (loc->inode->gfid))
memcpy (req.gfid, loc->inode->gfid, 16);
else
memcpy (req.gfid, loc->gfid, 16);
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 3f94498f5ad..61a68e2464f 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -81,7 +81,7 @@ quota_loc_fill (loc_t *loc, inode_t *inode, inode_t *parent, char *path)
if (inode) {
loc->inode = inode_ref (inode);
- uuid_copy (loc->gfid, inode->gfid);
+ gf_uuid_copy (loc->gfid, inode->gfid);
}
if (parent) {
@@ -215,7 +215,7 @@ __quota_dentry_new (quota_inode_ctx_t *ctx, char *name, uuid_t par)
goto err;
}
- uuid_copy (dentry->par, par);
+ gf_uuid_copy (dentry->par, par);
if (ctx != NULL)
list_add_tail (&dentry->next, &ctx->parents);
@@ -321,7 +321,7 @@ int32_t quota_find_common_ancestor (inode_t *inode1, inode_t *inode2,
}
if (cur_inode1 && cur_inode2) {
- uuid_copy (*common_ancestor, cur_inode1->gfid);
+ gf_uuid_copy (*common_ancestor, cur_inode1->gfid);
ret = 0;
}
out:
@@ -436,7 +436,7 @@ check_ancestory_2 (xlator_t *this, quota_local_t *local, inode_t *inode)
name = (char *) local->loc.name;
if (local->loc.parent) {
- uuid_copy (pgfid, local->loc.parent->gfid);
+ gf_uuid_copy (pgfid, local->loc.parent->gfid);
parent = local->loc.parent;
}
@@ -458,7 +458,7 @@ check_ancestory_2 (xlator_t *this, quota_local_t *local, inode_t *inode)
if (name != NULL) {
name = NULL;
- uuid_clear (pgfid);
+ gf_uuid_clear (pgfid);
}
inode_unref (cur_inode);
@@ -623,7 +623,7 @@ quota_add_parent (quota_dentry_t *dentry, struct list_head *list)
}
list_for_each_entry (entry, list, next) {
- if (uuid_compare (dentry->par, entry->par) == 0) {
+ if (gf_uuid_compare (dentry->par, entry->par) == 0) {
found = _gf_true;
goto out;
}
@@ -680,7 +680,7 @@ quota_build_ancestry_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
tmp_parent = NULL;
}
- uuid_copy (loc.gfid, entry->d_stat.ia_gfid);
+ gf_uuid_copy (loc.gfid, entry->d_stat.ia_gfid);
loc.inode = inode_ref (entry->inode);
loc.parent = inode_ref (tmp_parent);
@@ -1162,14 +1162,14 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
UNLOCK (&local->lock);
if ( par != NULL ) {
- uuid_copy (trav_uuid, par);
+ gf_uuid_copy (trav_uuid, par);
}
do {
/* In a rename operation, enforce should be stopped at common
ancestor */
- if (!uuid_is_null (local->common_ancestor) &&
- !uuid_compare (_inode->gfid, local->common_ancestor)) {
+ if (!gf_uuid_is_null (local->common_ancestor) &&
+ !gf_uuid_compare (_inode->gfid, local->common_ancestor)) {
quota_link_count_decrement (local);
break;
}
@@ -1207,7 +1207,7 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
if (name != NULL) {
name = NULL;
- uuid_clear (trav_uuid);
+ gf_uuid_clear (trav_uuid);
}
if (parent == NULL) {
@@ -1358,7 +1358,7 @@ quota_fill_inodectx (xlator_t *this, inode_t *inode, dict_t *dict,
list_for_each_entry (dentry, &ctx->parents, next) {
if ((strcmp (dentry->name, loc->name) == 0) &&
- (uuid_compare (loc->parent->gfid,
+ (gf_uuid_compare (loc->parent->gfid,
dentry->par) == 0)) {
found = 1;
break;
@@ -1414,7 +1414,7 @@ quota_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
QUOTA_STACK_UNWIND (lookup, frame, op_ret, op_errno, inode, buf,
dict, postparent);
- if (op_ret < 0 || this_inode == NULL || uuid_is_null(this_inode->gfid))
+ if (op_ret < 0 || this_inode == NULL || gf_uuid_is_null(this_inode->gfid))
goto out;
check_ancestory_2 (this, local, this_inode);
@@ -1980,7 +1980,7 @@ quota_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
list_for_each_entry (dentry, &ctx->parents, next) {
if ((strcmp (dentry->name, local->loc.name) == 0) &&
- (uuid_compare (local->loc.parent->gfid,
+ (gf_uuid_compare (local->loc.parent->gfid,
dentry->par) == 0)) {
old_dentry = dentry;
break;
@@ -2074,7 +2074,7 @@ quota_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
list_for_each_entry (dentry, &ctx->parents, next) {
if ((strcmp (dentry->name, local->loc.name) == 0) &&
- (uuid_compare (local->loc.parent->gfid,
+ (gf_uuid_compare (local->loc.parent->gfid,
dentry->par) == 0)) {
found = 1;
gf_log (this->name, GF_LOG_WARNING,
@@ -2174,7 +2174,7 @@ quota_link_continue (call_frame_t *frame)
ret = quota_find_common_ancestor (local->oldloc.inode,
local->newloc.parent,
&common_ancestor);
- if (ret < 0 || uuid_is_null(common_ancestor)) {
+ if (ret < 0 || gf_uuid_is_null(common_ancestor)) {
gf_log (this->name, GF_LOG_ERROR, "failed to get "
"common_ancestor for %s and %s",
local->oldloc.path, local->newloc.path);
@@ -2194,7 +2194,7 @@ quota_link_continue (call_frame_t *frame)
/* No need to check quota limit if src and dst parents are same
*/
if (src_parent == dst_parent ||
- uuid_compare (src_parent->gfid, dst_parent->gfid) == 0) {
+ gf_uuid_compare (src_parent->gfid, dst_parent->gfid) == 0) {
inode_unref (src_parent);
inode_unref (dst_parent);
goto off;
@@ -2217,7 +2217,7 @@ quota_link_continue (call_frame_t *frame)
{
local->link_count = 1;
local->delta = (ctx != NULL) ? ctx->buf.ia_blocks * 512 : 0;
- uuid_copy (local->common_ancestor, common_ancestor);
+ gf_uuid_copy (local->common_ancestor, common_ancestor);
}
UNLOCK (&local->lock);
@@ -2256,7 +2256,7 @@ quota_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc,
/* No need to check quota limit if src and dst parents are same */
if (oldloc->parent && newloc->parent &&
- !uuid_compare(oldloc->parent->gfid, newloc->parent->gfid)) {
+ !gf_uuid_compare(oldloc->parent->gfid, newloc->parent->gfid)) {
gf_log (this->name, GF_LOG_DEBUG, "link %s -> %s are "
"in the same directory, so skip check limit",
oldloc->path, newloc->path);
@@ -2372,12 +2372,12 @@ quota_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
list_for_each_entry (dentry, &ctx->parents, next) {
if ((strcmp (dentry->name, local->oldloc.name) == 0) &&
- (uuid_compare (local->oldloc.parent->gfid,
+ (gf_uuid_compare (local->oldloc.parent->gfid,
dentry->par) == 0)) {
old_dentry = dentry;
} else if ((strcmp (dentry->name,
local->newloc.name) == 0) &&
- (uuid_compare (local->newloc.parent->gfid,
+ (gf_uuid_compare (local->newloc.parent->gfid,
dentry->par) == 0)) {
new_dentry_found = 1;
gf_log (this->name, GF_LOG_WARNING,
@@ -2524,7 +2524,7 @@ quota_rename_continue (call_frame_t *frame)
ret = quota_find_common_ancestor (local->oldloc.parent,
local->newloc.parent,
&common_ancestor);
- if (ret < 0 || uuid_is_null(common_ancestor)) {
+ if (ret < 0 || gf_uuid_is_null(common_ancestor)) {
gf_log (this->name, GF_LOG_ERROR, "failed to get "
"common_ancestor for %s and %s",
local->oldloc.path, local->newloc.path);
@@ -2535,7 +2535,7 @@ quota_rename_continue (call_frame_t *frame)
LOCK (&local->lock);
{
local->link_count = 1;
- uuid_copy (local->common_ancestor, common_ancestor);
+ gf_uuid_copy (local->common_ancestor, common_ancestor);
}
UNLOCK (&local->lock);
@@ -2601,7 +2601,7 @@ quota_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
/* No need to check quota limit if src and dst parents are same */
if (oldloc->parent && newloc->parent &&
- !uuid_compare(oldloc->parent->gfid, newloc->parent->gfid)) {
+ !gf_uuid_compare(oldloc->parent->gfid, newloc->parent->gfid)) {
gf_log (this->name, GF_LOG_DEBUG, "rename %s -> %s are "
"in the same directory, so skip check limit",
oldloc->path, newloc->path);
@@ -4444,10 +4444,10 @@ quota_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|| (strcmp (entry->d_name, "..") == 0))
continue;
- uuid_copy (loc.gfid, entry->d_stat.ia_gfid);
+ gf_uuid_copy (loc.gfid, entry->d_stat.ia_gfid);
loc.inode = inode_ref (entry->inode);
loc.parent = inode_ref (local->loc.inode);
- uuid_copy (loc.pargfid, loc.parent->gfid);
+ gf_uuid_copy (loc.pargfid, loc.parent->gfid);
loc.name = entry->d_name;
quota_fill_inodectx (this, entry->inode, entry->dict,
diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h
index c61c974e352..183f8c1c42e 100644
--- a/xlators/features/quota/src/quota.h
+++ b/xlators/features/quota/src/quota.h
@@ -126,7 +126,7 @@
do { \
char _gfid_unparsed[40]; \
if (_gfid != NULL) { \
- uuid_unparse (_gfid, _gfid_unparsed); \
+ gf_uuid_unparse (_gfid, _gfid_unparsed);\
_ret = gf_asprintf (var, QUOTA_XATTR_PREFIX \
"%s.%s." CONTRIBUTION, \
_vol_name, _gfid_unparsed); \
diff --git a/xlators/features/quota/src/quotad-aggregator.c b/xlators/features/quota/src/quotad-aggregator.c
index 0abe4e6fc80..681fea4cb74 100644
--- a/xlators/features/quota/src/quotad-aggregator.c
+++ b/xlators/features/quota/src/quotad-aggregator.c
@@ -219,7 +219,7 @@ quotad_aggregator_getlimit (rpcsvc_request_t *req)
goto err;
}
- uuid_parse ((const char*)gfid_str, gfid);
+ gf_uuid_parse ((const char*)gfid_str, gfid);
frame = quotad_aggregator_get_frame_from_req (req);
if (frame == NULL) {
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index af90404d9a8..99c1496386f 100644
--- a/xlators/features/shard/src/shard.c
+++ b/xlators/features/shard/src/shard.c
@@ -20,7 +20,7 @@ __is_shard_dir (uuid_t gfid)
{
shard_priv_t *priv = THIS->private;
- if (uuid_compare (gfid, priv->dot_shard_gfid) == 0)
+ if (gf_uuid_compare (gfid, priv->dot_shard_gfid) == 0)
return _gf_true;
return _gf_false;
@@ -31,7 +31,7 @@ shard_make_block_bname (int block_num, uuid_t gfid, char *buf, size_t len)
{
char gfid_str[GF_UUID_BUF_SIZE] = {0,};
- uuid_unparse (gfid, gfid_str);
+ gf_uuid_unparse (gfid, gfid_str);
snprintf (buf, len, "%s.%d", gfid_str, block_num);
}
@@ -41,7 +41,7 @@ shard_make_block_abspath (int block_num, uuid_t gfid, char *filepath,
{
char gfid_str[GF_UUID_BUF_SIZE] = {0,};
- uuid_unparse (gfid, gfid_str);
+ gf_uuid_unparse (gfid, gfid_str);
snprintf (filepath, len, "/%s/%s.%d", GF_SHARD_DIR, gfid_str,
block_num);
}
@@ -891,7 +891,7 @@ shard_create_gfid_dict (dict_t *dict)
goto out;
}
- uuid_generate (*gfid);
+ gf_uuid_generate (*gfid);
ret = dict_set_dynptr (new, "gfid-req", gfid, sizeof (uuid_t));
@@ -1715,7 +1715,7 @@ init (xlator_t *this)
"from mempool");
goto out;
}
- uuid_parse (SHARD_ROOT_GFID, priv->dot_shard_gfid);
+ gf_uuid_parse (SHARD_ROOT_GFID, priv->dot_shard_gfid);
this->private = priv;
ret = 0;
diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c
index 0fa7b531c47..0b706919924 100644
--- a/xlators/features/snapview-client/src/snapview-client.c
+++ b/xlators/features/snapview-client/src/snapview-client.c
@@ -316,7 +316,7 @@ svc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
if ((op_errno == ENOENT || op_errno == ESTALE) &&
- !uuid_is_null (local->loc.gfid)) {
+ !gf_uuid_is_null (local->loc.gfid)) {
ret = svc_inode_ctx_get (this, inode, &inode_type);
if (ret < 0 && subvolume == FIRST_CHILD (this)) {
gf_log (this->name, GF_LOG_DEBUG,
@@ -339,7 +339,7 @@ svc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
parent = inode_ref (local->loc.parent);
else {
parent = inode_parent (inode, NULL, NULL);
- if (!parent && !uuid_is_null (local->loc.pargfid)) {
+ if (!parent && !gf_uuid_is_null (local->loc.pargfid)) {
parent = inode_find (inode->table,
local->loc.pargfid);
}
@@ -443,7 +443,7 @@ svc_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
*/
if (!loc->name) {
- if (uuid_is_null (loc->inode->gfid)) {
+ if (gf_uuid_is_null (loc->inode->gfid)) {
subvolume = FIRST_CHILD (this);
local->subvolume = subvolume;
wind = _gf_true;
@@ -1682,9 +1682,9 @@ svc_readdir_on_special_dir (call_frame_t *frame, void *cookie, xlator_t *this,
}
}
- uuid_copy (local->loc.pargfid, fd->inode->gfid);
- uuid_copy (local->loc.gfid, inode->gfid);
- if (uuid_is_null (inode->gfid))
+ gf_uuid_copy (local->loc.pargfid, fd->inode->gfid);
+ gf_uuid_copy (local->loc.gfid, inode->gfid);
+ if (gf_uuid_is_null (inode->gfid))
ret = inode_path (fd->inode, private->path, &path);
else
ret = inode_path (inode, NULL, &path);
diff --git a/xlators/features/snapview-server/src/snapview-server-helpers.c b/xlators/features/snapview-server/src/snapview-server-helpers.c
index 7f03dc47f02..c621484c19b 100644
--- a/xlators/features/snapview-server/src/snapview-server-helpers.c
+++ b/xlators/features/snapview-server/src/snapview-server-helpers.c
@@ -348,7 +348,7 @@ svs_fill_ino_from_gfid (struct iatt *buf)
GF_VALIDATE_OR_GOTO (this->name, buf, out);
/* consider least significant 8 bytes of value out of gfid */
- if (uuid_is_null (buf->ia_gfid)) {
+ if (gf_uuid_is_null (buf->ia_gfid)) {
buf->ia_ino = -1;
goto out;
}
@@ -380,7 +380,7 @@ svs_iatt_fill (uuid_t gfid, struct iatt *buf)
buf->ia_blocks = 8;
buf->ia_size = 4096;
- uuid_copy (buf->ia_gfid, gfid);
+ gf_uuid_copy (buf->ia_gfid, gfid);
svs_fill_ino_from_gfid (buf);
buf->ia_prot = ia_prot_from_st_mode (0755);
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c
index 4df7864b1bf..4820181cb56 100644
--- a/xlators/features/snapview-server/src/snapview-server.c
+++ b/xlators/features/snapview-server/src/snapview-server.c
@@ -39,8 +39,8 @@ svs_lookup_entry_point (xlator_t *this, loc_t *loc, inode_t *parent,
GF_VALIDATE_OR_GOTO (this->name, buf, out);
GF_VALIDATE_OR_GOTO (this->name, postparent, out);
- if (uuid_is_null (loc->inode->gfid)) {
- uuid_generate (gfid);
+ if (gf_uuid_is_null (loc->inode->gfid)) {
+ gf_uuid_generate (gfid);
svs_iatt_fill (gfid, buf);
/* Here the inode context of the entry point directory
@@ -63,7 +63,7 @@ svs_lookup_entry_point (xlator_t *this, loc_t *loc, inode_t *parent,
*op_errno = ENOMEM;
goto out;
}
- uuid_copy (inode_ctx->pargfid, loc->pargfid);
+ gf_uuid_copy (inode_ctx->pargfid, loc->pargfid);
memcpy (&inode_ctx->buf, buf, sizeof (*buf));
inode_ctx->type = SNAP_VIEW_ENTRY_POINT_INODE;
} else {
@@ -124,12 +124,12 @@ svs_lookup_gfid (xlator_t *this, loc_t *loc, struct iatt *buf,
GF_VALIDATE_OR_GOTO (this->name, buf, out);
GF_VALIDATE_OR_GOTO (this->name, postparent, out);
- if (uuid_is_null (loc->gfid) && uuid_is_null (loc->inode->gfid)) {
+ if (gf_uuid_is_null (loc->gfid) && gf_uuid_is_null (loc->inode->gfid)) {
gf_log (this->name, GF_LOG_ERROR, "gfid is NULL");
goto out;
}
- if (!uuid_is_null (loc->inode->gfid))
+ if (!gf_uuid_is_null (loc->inode->gfid))
memcpy (handle_obj, loc->inode->gfid,
GFAPI_HANDLE_LENGTH);
else
@@ -167,10 +167,10 @@ svs_lookup_gfid (xlator_t *this, loc_t *loc, struct iatt *buf,
}
iatt_from_stat (buf, &statbuf);
- if (!uuid_is_null (loc->gfid))
- uuid_copy (buf->ia_gfid, loc->gfid);
+ if (!gf_uuid_is_null (loc->gfid))
+ gf_uuid_copy (buf->ia_gfid, loc->gfid);
else
- uuid_copy (buf->ia_gfid, loc->inode->gfid);
+ gf_uuid_copy (buf->ia_gfid, loc->inode->gfid);
inode_ctx->type = SNAP_VIEW_VIRTUAL_INODE;
inode_ctx->fs = fs;
@@ -243,17 +243,17 @@ svs_lookup_snapshot (xlator_t *this, loc_t *loc, struct iatt *buf,
goto out;
}
- if (uuid_is_null (loc->gfid) &&
- uuid_is_null (loc->inode->gfid))
- uuid_generate (gfid);
+ if (gf_uuid_is_null (loc->gfid) &&
+ gf_uuid_is_null (loc->inode->gfid))
+ gf_uuid_generate (gfid);
else {
- if (!uuid_is_null (loc->inode->gfid))
- uuid_copy (gfid, loc->inode->gfid);
+ if (!gf_uuid_is_null (loc->inode->gfid))
+ gf_uuid_copy (gfid, loc->inode->gfid);
else
- uuid_copy (gfid, loc->gfid);
+ gf_uuid_copy (gfid, loc->gfid);
}
iatt_from_stat (buf, &statbuf);
- uuid_copy (buf->ia_gfid, gfid);
+ gf_uuid_copy (buf->ia_gfid, gfid);
svs_fill_ino_from_gfid (buf);
inode_ctx->type = SNAP_VIEW_SNAPSHOT_INODE;
inode_ctx->fs = fs;
@@ -312,18 +312,18 @@ svs_lookup_entry (xlator_t *this, loc_t *loc, struct iatt *buf,
goto out;
}
- if (uuid_is_null (loc->gfid) &&
- uuid_is_null (loc->inode->gfid))
- uuid_generate (gfid);
+ if (gf_uuid_is_null (loc->gfid) &&
+ gf_uuid_is_null (loc->inode->gfid))
+ gf_uuid_generate (gfid);
else {
- if (!uuid_is_null (loc->inode->gfid))
- uuid_copy (gfid, loc->inode->gfid);
+ if (!gf_uuid_is_null (loc->inode->gfid))
+ gf_uuid_copy (gfid, loc->inode->gfid);
else
- uuid_copy (gfid, loc->gfid);
+ gf_uuid_copy (gfid, loc->gfid);
}
iatt_from_stat (buf, &statbuf);
- uuid_copy (buf->ia_gfid, gfid);
+ gf_uuid_copy (buf->ia_gfid, gfid);
svs_fill_ino_from_gfid (buf);
inode_ctx->type = SNAP_VIEW_VIRTUAL_INODE;
inode_ctx->fs = fs;
@@ -577,8 +577,8 @@ svs_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
the server does not have the inode in the inode table.
*/
if (!inode_ctx && !parent_ctx) {
- if (uuid_is_null (loc->gfid) &&
- uuid_is_null (loc->inode->gfid)) {
+ if (gf_uuid_is_null (loc->gfid) &&
+ gf_uuid_is_null (loc->inode->gfid)) {
gf_log (this->name, GF_LOG_ERROR, "gfid is NULL");
op_ret = -1;
op_errno = ESTALE;
@@ -599,10 +599,10 @@ svs_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
* this would have already looked up by snap-view client
* so return success
*/
- if (!uuid_is_null (loc->gfid))
- uuid_copy (buf.ia_gfid, loc->gfid);
+ if (!gf_uuid_is_null (loc->gfid))
+ gf_uuid_copy (buf.ia_gfid, loc->gfid);
else
- uuid_copy (buf.ia_gfid, loc->inode->gfid);
+ gf_uuid_copy (buf.ia_gfid, loc->inode->gfid);
svs_iatt_fill (buf.ia_gfid, &buf);
svs_iatt_fill (buf.ia_gfid, &postparent);
@@ -1343,7 +1343,7 @@ svs_readdirp_fill (xlator_t *this, inode_t *parent, svs_inode_t *parent_ctx,
entry->inode = inode;
inode_ctx = svs_inode_ctx_get (this, inode);
if (!inode_ctx) {
- uuid_copy (buf.ia_gfid, inode->gfid);
+ gf_uuid_copy (buf.ia_gfid, inode->gfid);
svs_iatt_fill (inode->gfid, &buf);
buf.ia_type = inode->ia_type;
} else {
@@ -1356,13 +1356,13 @@ svs_readdirp_fill (xlator_t *this, inode_t *parent, svs_inode_t *parent_ctx,
entry->d_stat = buf;
else {
entry->d_stat.ia_ino = buf.ia_ino;
- uuid_copy (entry->d_stat.ia_gfid, buf.ia_gfid);
+ gf_uuid_copy (entry->d_stat.ia_gfid, buf.ia_gfid);
}
} else {
inode = inode_new (parent->table);
entry->inode = inode;
- uuid_generate (random_gfid);
- uuid_copy (buf.ia_gfid, random_gfid);
+ gf_uuid_generate (random_gfid);
+ gf_uuid_copy (buf.ia_gfid, random_gfid);
svs_fill_ino_from_gfid (&buf);
entry->d_ino = buf.ia_ino;
@@ -1387,7 +1387,7 @@ svs_readdirp_fill (xlator_t *this, inode_t *parent, svs_inode_t *parent_ctx,
entry->d_stat = buf;
inode_ctx->type = SNAP_VIEW_SNAPSHOT_INODE;
} else {
- uuid_copy (entry->d_stat.ia_gfid, buf.ia_gfid);
+ gf_uuid_copy (entry->d_stat.ia_gfid, buf.ia_gfid);
entry->d_stat.ia_ino = buf.ia_ino;
inode_ctx->buf = entry->d_stat;
inode_ctx->type = SNAP_VIEW_VIRTUAL_INODE;
@@ -1720,7 +1720,7 @@ svs_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
}
iatt_from_stat (&buf, &stat);
- uuid_copy (buf.ia_gfid, loc->inode->gfid);
+ gf_uuid_copy (buf.ia_gfid, loc->inode->gfid);
svs_fill_ino_from_gfid (&buf);
op_ret = ret;
}
@@ -1790,7 +1790,7 @@ svs_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
}
iatt_from_stat (&buf, &stat);
- uuid_copy (buf.ia_gfid, fd->inode->gfid);
+ gf_uuid_copy (buf.ia_gfid, fd->inode->gfid);
svs_fill_ino_from_gfid (&buf);
op_ret = ret;
}
@@ -1929,7 +1929,7 @@ svs_readv (call_frame_t *frame, xlator_t *this,
}
iatt_from_stat (&stbuf, &fstatbuf);
- uuid_copy (stbuf.ia_gfid, fd->inode->gfid);
+ gf_uuid_copy (stbuf.ia_gfid, fd->inode->gfid);
svs_fill_ino_from_gfid (&stbuf);
/* Hack to notify higher layers of EOF. */
@@ -1994,7 +1994,7 @@ svs_readlink (call_frame_t *frame, xlator_t *this,
}
iatt_from_stat (&stbuf, &stat);
- uuid_copy (stbuf.ia_gfid, loc->inode->gfid);
+ gf_uuid_copy (stbuf.ia_gfid, loc->inode->gfid);
svs_fill_ino_from_gfid (&stbuf);
buf = alloca (size + 1);
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c
index 3a28815571e..521532ec1f6 100644
--- a/xlators/features/trash/src/trash.c
+++ b/xlators/features/trash/src/trash.c
@@ -347,7 +347,7 @@ trash_notify_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_log (this->name, GF_LOG_DEBUG, "inode found with gfid %s",
uuid_utoa(buf->ia_gfid));
- uuid_copy (loc.gfid, trash_gfid);
+ gf_uuid_copy (loc.gfid, trash_gfid);
/* Find trash inode using available information */
priv->trash_inode = inode_link (inode, NULL, NULL, buf);
@@ -422,10 +422,10 @@ trash_notify_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = ENOMEM;
goto out;
}
- uuid_copy (*gfid_ptr, internal_op_gfid);
+ gf_uuid_copy (*gfid_ptr, internal_op_gfid);
- uuid_copy (loc.gfid, internal_op_gfid);
- uuid_copy (loc.pargfid, trash_gfid);
+ gf_uuid_copy (loc.gfid, internal_op_gfid);
+ gf_uuid_copy (loc.pargfid, trash_gfid);
loc.name = gf_strdup ("internal_op");
if (!loc.name) {
@@ -967,10 +967,10 @@ trash_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflags,
goto out;
}
/* loc need some gfid which will be present in inode */
- uuid_copy (loc->gfid, loc->inode->gfid);
+ gf_uuid_copy (loc->gfid, loc->inode->gfid);
/* Checking for valid location */
- if (uuid_is_null (loc->gfid) && uuid_is_null (loc->inode->gfid)) {
+ if (gf_uuid_is_null (loc->gfid) && gf_uuid_is_null (loc->inode->gfid)) {
gf_log (this->name, GF_LOG_DEBUG, "Bad address");
STACK_WIND (frame, trash_common_unwind_cbk,
FIRST_CHILD(this),
@@ -1546,10 +1546,10 @@ trash_truncate_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* Creating vaild parent and pargfids for both files */
local->loc.parent = inode_ref (dir_entry->parent);
- uuid_copy (local->loc.pargfid, dir_entry->parent->gfid);
+ gf_uuid_copy (local->loc.pargfid, dir_entry->parent->gfid);
local->newloc.parent = inode_ref (dir_entry->parent);
- uuid_copy (local->newloc.pargfid, dir_entry->parent->gfid);
+ gf_uuid_copy (local->newloc.pargfid, dir_entry->parent->gfid);
flags = O_CREAT|O_EXCL|O_WRONLY;
@@ -1738,7 +1738,7 @@ trash_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
local->loc.path = pathbuf;
local->loc.inode = inode_ref (fd->inode);
- uuid_copy (local->loc.gfid, local->loc.inode->gfid);
+ gf_uuid_copy (local->loc.gfid, local->loc.inode->gfid);
local->fop_offset = offset;
@@ -1904,8 +1904,8 @@ reconfigure (xlator_t *this, dict_t *options)
frame = create_frame (this, this->ctx->pool);
/* assign new location values to new_loc members */
- uuid_copy (new_loc.gfid, trash_gfid);
- uuid_copy (new_loc.pargfid, root_gfid);
+ gf_uuid_copy (new_loc.gfid, trash_gfid);
+ gf_uuid_copy (new_loc.pargfid, root_gfid);
ret = extract_trash_directory (priv->newtrash_dir,
&new_loc.name);
if (ret) {
@@ -1922,8 +1922,8 @@ reconfigure (xlator_t *this, dict_t *options)
}
/* assign old location values to old_loc members */
- uuid_copy (old_loc.gfid, trash_gfid);
- uuid_copy (old_loc.pargfid, root_gfid);
+ gf_uuid_copy (old_loc.gfid, trash_gfid);
+ gf_uuid_copy (old_loc.pargfid, root_gfid);
ret = extract_trash_directory (priv->oldtrash_dir,
&old_loc.name);
if (ret) {
@@ -1940,7 +1940,7 @@ reconfigure (xlator_t *this, dict_t *options)
}
old_loc.inode = inode_ref (priv->trash_inode);
- uuid_copy(old_loc.inode->gfid, old_loc.gfid);
+ gf_uuid_copy(old_loc.inode->gfid, old_loc.gfid);
STACK_WIND (frame, trash_reconf_rename_cbk,
FIRST_CHILD(this),
@@ -2040,7 +2040,7 @@ notify (xlator_t *this, int event, void *data, ...)
*/
if (!priv->oldtrash_dir) {
loc.inode = inode_new (priv->trash_itable);
- uuid_copy (loc.gfid, trash_gfid);
+ gf_uuid_copy (loc.gfid, trash_gfid);
gf_log (this->name, GF_LOG_DEBUG, "nameless lookup for"
"old trash directory");
@@ -2064,10 +2064,10 @@ notify (xlator_t *this, int event, void *data, ...)
ret = ENOMEM;
goto out;
}
- uuid_copy (*tgfid_ptr, trash_gfid);
+ gf_uuid_copy (*tgfid_ptr, trash_gfid);
- uuid_copy (loc.gfid, trash_gfid);
- uuid_copy (loc.pargfid, root_gfid);
+ gf_uuid_copy (loc.gfid, trash_gfid);
+ gf_uuid_copy (loc.pargfid, root_gfid);
ret = extract_trash_directory (priv->newtrash_dir,
&loc.name);
if (ret) {
@@ -2108,8 +2108,8 @@ notify (xlator_t *this, int event, void *data, ...)
gf_log (this->name, GF_LOG_DEBUG, "Renaming %s -> %s"
" from notify", priv->oldtrash_dir,
priv->newtrash_dir);
- uuid_copy (loc.gfid, trash_gfid);
- uuid_copy (loc.pargfid, root_gfid);
+ gf_uuid_copy (loc.gfid, trash_gfid);
+ gf_uuid_copy (loc.pargfid, root_gfid);
ret = extract_trash_directory (priv->newtrash_dir,
&loc.name);
if (ret) {
@@ -2125,8 +2125,8 @@ notify (xlator_t *this, int event, void *data, ...)
goto out;
}
/* assign old location values to old_loc members */
- uuid_copy (old_loc.gfid, trash_gfid);
- uuid_copy (old_loc.pargfid, root_gfid);
+ gf_uuid_copy (old_loc.gfid, trash_gfid);
+ gf_uuid_copy (old_loc.pargfid, root_gfid);
ret = extract_trash_directory (priv->oldtrash_dir,
&old_loc.name);
if (ret) {
@@ -2143,7 +2143,7 @@ notify (xlator_t *this, int event, void *data, ...)
}
old_loc.inode = inode_ref (priv->trash_inode);
- uuid_copy(old_loc.inode->gfid, old_loc.gfid);
+ gf_uuid_copy(old_loc.inode->gfid, old_loc.gfid);
STACK_WIND (frame, trash_notify_rename_cbk,
FIRST_CHILD(this),
diff --git a/xlators/features/upcall/src/upcall-internal.c b/xlators/features/upcall/src/upcall-internal.c
index ef7743c9083..29c387601f9 100644
--- a/xlators/features/upcall/src/upcall-internal.c
+++ b/xlators/features/upcall/src/upcall-internal.c
@@ -421,7 +421,7 @@ upcall_client_cache_invalidate (xlator_t *this, uuid_t gfid,
if (t_expired < timeout) {
/* Send notify call */
- uuid_copy(n_event_data.gfid, gfid);
+ gf_uuid_copy(n_event_data.gfid, gfid);
n_event_data.client_entry = up_client_entry;
n_event_data.event_type = CACHE_INVALIDATION;
n_event_data.invalidate_flags = flags;
diff --git a/xlators/features/upcall/src/upcall.c b/xlators/features/upcall/src/upcall.c
index 45114b5f29f..93861e7955f 100644
--- a/xlators/features/upcall/src/upcall.c
+++ b/xlators/features/upcall/src/upcall.c
@@ -405,7 +405,7 @@ up_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
CACHE_INVALIDATE_DIR (frame, this, client, local->inode, flags);
/* XXX: notify oldparent as well */
-/* if (uuid_compare (preoldparent->ia_gfid, prenewparent->ia_gfid))
+/* if (gf_uuid_compare (preoldparent->ia_gfid, prenewparent->ia_gfid))
CACHE_INVALIDATE (frame, this, client, prenewparent->ia_gfid, flags);*/
out:
diff --git a/xlators/lib/src/libxlator.c b/xlators/lib/src/libxlator.c
index 0f703904fab..11d0ef1caf8 100644
--- a/xlators/lib/src/libxlator.c
+++ b/xlators/lib/src/libxlator.c
@@ -300,7 +300,7 @@ cluster_markeruuid_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
} else {
local->volmark = memdup (volmark, sizeof (*volmark));
VALIDATE_OR_GOTO (local->volmark, unlock);
- uuid_unparse (volmark->uuid, vol_uuid);
+ gf_uuid_unparse (volmark->uuid, vol_uuid);
if (volmark->retval)
local->retval = volmark->retval;
local->count[MCNT_FOUND]++;
diff --git a/xlators/meta/src/meta-helpers.c b/xlators/meta/src/meta-helpers.c
index a67671050b8..cd47f0fb54a 100644
--- a/xlators/meta/src/meta-helpers.c
+++ b/xlators/meta/src/meta-helpers.c
@@ -208,9 +208,9 @@ gfid_to_ino (uuid_t gfid)
static void
meta_uuid_copy (uuid_t dst, uuid_t src)
{
- uuid_copy (dst, src);
- if (uuid_is_null (dst))
- uuid_generate (dst);
+ gf_uuid_copy (dst, src);
+ if (gf_uuid_is_null (dst))
+ gf_uuid_generate (dst);
}
diff --git a/xlators/meta/src/meta.c b/xlators/meta/src/meta.c
index 036ed112acf..20c643f2f75 100644
--- a/xlators/meta/src/meta.c
+++ b/xlators/meta/src/meta.c
@@ -34,7 +34,7 @@ meta_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
meta_root_dir_hook (frame, this, loc, xdata);
meta_iatt_fill (&iatt, loc->inode, IA_IFDIR);
- uuid_parse (META_ROOT_GFID, iatt.ia_gfid);
+ gf_uuid_parse (META_ROOT_GFID, iatt.ia_gfid);
META_STACK_UNWIND (lookup, frame, 0, 0, loc->inode, &iatt,
xdata, &parent);
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];
}
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index b517475ef06..ece089976f3 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -409,7 +409,7 @@ fuse_entry_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == 0) {
if (__is_root_gfid (state->loc.inode->gfid))
buf->ia_ino = 1;
- if (uuid_is_null (buf->ia_gfid)) {
+ if (gf_uuid_is_null (buf->ia_gfid)) {
/* With a NULL gfid inode linking is
not possible. Let's not pretend this
call was a "success".
@@ -535,8 +535,8 @@ fuse_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
inode_unref (state->loc.inode);
state->loc.inode = inode_new (itable);
state->is_revalidate = 2;
- if (uuid_is_null (state->gfid))
- uuid_generate (state->gfid);
+ if (gf_uuid_is_null (state->gfid))
+ gf_uuid_generate (state->gfid);
fuse_gfid_set (state);
STACK_WIND (frame, fuse_lookup_cbk,
@@ -599,8 +599,8 @@ fuse_lookup_resume (fuse_state_t *state)
"%"PRIu64": LOOKUP %s", state->finh->unique,
state->loc.path);
state->loc.inode = inode_new (state->loc.parent->table);
- if (uuid_is_null (state->gfid))
- uuid_generate (state->gfid);
+ if (gf_uuid_is_null (state->gfid))
+ gf_uuid_generate (state->gfid);
fuse_gfid_set (state);
}
@@ -1496,7 +1496,7 @@ fuse_mknod (xlator_t *this, fuse_in_header_t *finh, void *msg)
GET_STATE (this, finh, state);
- uuid_generate (state->gfid);
+ gf_uuid_generate (state->gfid);
fuse_resolve_entry_init (state, &state->resolve, finh->nodeid, name);
@@ -1562,7 +1562,7 @@ fuse_mkdir (xlator_t *this, fuse_in_header_t *finh, void *msg)
GET_STATE (this, finh, state);
- uuid_generate (state->gfid);
+ gf_uuid_generate (state->gfid);
fuse_resolve_entry_init (state, &state->resolve, finh->nodeid, name);
@@ -1696,7 +1696,7 @@ fuse_symlink (xlator_t *this, fuse_in_header_t *finh, void *msg)
GET_STATE (this, finh, state);
- uuid_generate (state->gfid);
+ gf_uuid_generate (state->gfid);
fuse_resolve_entry_init (state, &state->resolve, finh->nodeid, name);
@@ -2067,7 +2067,7 @@ fuse_create (xlator_t *this, fuse_in_header_t *finh, void *msg)
GET_STATE (this, finh, state);
- uuid_generate (state->gfid);
+ gf_uuid_generate (state->gfid);
fuse_resolve_entry_init (state, &state->resolve, finh->nodeid, name);
@@ -4086,7 +4086,7 @@ fuse_first_lookup (xlator_t *this)
loc.path = "/";
loc.name = "";
loc.inode = fuse_ino_to_inode (1, this);
- uuid_copy (loc.gfid, loc.inode->gfid);
+ gf_uuid_copy (loc.gfid, loc.inode->gfid);
loc.parent = NULL;
dict = dict_new ();
@@ -4155,7 +4155,7 @@ fuse_nameless_lookup (xlator_t *xl, uuid_t gfid, loc_t *loc)
}
}
- uuid_copy (loc->gfid, gfid);
+ gf_uuid_copy (loc->gfid, gfid);
xattr_req = dict_new ();
if (xattr_req == NULL) {
@@ -4202,7 +4202,7 @@ fuse_migrate_fd_open (xlator_t *this, fd_t *basefd, fd_t *oldfd,
goto out;
}
- uuid_copy (loc.gfid, basefd->inode->gfid);
+ gf_uuid_copy (loc.gfid, basefd->inode->gfid);
loc.inode = inode_find (new_subvol->itable, basefd->inode->gfid);
@@ -4394,7 +4394,7 @@ fuse_migrate_fd (xlator_t *this, fd_t *basefd, xlator_t *old_subvol,
LOCK (&oldfd->inode->lock);
{
- if (uuid_is_null (oldfd->inode->gfid)) {
+ if (gf_uuid_is_null (oldfd->inode->gfid)) {
create_in_progress = 1;
} else {
create_in_progress = 0;
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c
index a28169a0021..a8d387fdd4b 100644
--- a/xlators/mount/fuse/src/fuse-helpers.c
+++ b/xlators/mount/fuse/src/fuse-helpers.c
@@ -386,7 +386,7 @@ fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino,
parent = fuse_ino_to_inode (par, state->this);
loc->parent = parent;
if (parent)
- uuid_copy (loc->pargfid, parent->gfid);
+ gf_uuid_copy (loc->pargfid, parent->gfid);
}
inode = loc->inode;
@@ -409,7 +409,7 @@ fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino,
inode = fuse_ino_to_inode (ino, state->this);
loc->inode = inode;
if (inode)
- uuid_copy (loc->gfid, inode->gfid);
+ gf_uuid_copy (loc->gfid, inode->gfid);
}
parent = loc->parent;
@@ -417,7 +417,7 @@ fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino,
parent = inode_parent (inode, null_gfid, NULL);
loc->parent = parent;
if (parent)
- uuid_copy (loc->pargfid, parent->gfid);
+ gf_uuid_copy (loc->pargfid, parent->gfid);
}
diff --git a/xlators/mount/fuse/src/fuse-resolve.c b/xlators/mount/fuse/src/fuse-resolve.c
index 5aaa32ea660..2ddb31cd076 100644
--- a/xlators/mount/fuse/src/fuse-resolve.c
+++ b/xlators/mount/fuse/src/fuse-resolve.c
@@ -93,7 +93,7 @@ fuse_resolve_entry (fuse_state_t *state)
resolve_loc = &resolve->resolve_loc;
resolve_loc->parent = inode_ref (state->loc_now->parent);
- uuid_copy (resolve_loc->pargfid, state->loc_now->pargfid);
+ gf_uuid_copy (resolve_loc->pargfid, state->loc_now->pargfid);
resolve_loc->name = resolve->bname;
resolve_loc->inode = inode_new (state->itable);
@@ -137,7 +137,7 @@ fuse_resolve_gfid_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
* -2: entry (inode corresponding to path) could not be resolved
*/
- if (uuid_is_null (resolve->gfid)) {
+ if (gf_uuid_is_null (resolve->gfid)) {
resolve->op_ret = -1;
} else {
resolve->op_ret = -2;
@@ -154,13 +154,13 @@ fuse_resolve_gfid_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (!link_inode)
goto out;
- if (!uuid_is_null (resolve->gfid)) {
+ if (!gf_uuid_is_null (resolve->gfid)) {
loc_now->inode = link_inode;
goto out;
}
loc_now->parent = link_inode;
- uuid_copy (loc_now->pargfid, link_inode->gfid);
+ gf_uuid_copy (loc_now->pargfid, link_inode->gfid);
fuse_resolve_entry (state);
@@ -181,10 +181,10 @@ fuse_resolve_gfid (fuse_state_t *state)
resolve = state->resolve_now;
resolve_loc = &resolve->resolve_loc;
- if (!uuid_is_null (resolve->pargfid)) {
- uuid_copy (resolve_loc->gfid, resolve->pargfid);
- } else if (!uuid_is_null (resolve->gfid)) {
- uuid_copy (resolve_loc->gfid, resolve->gfid);
+ if (!gf_uuid_is_null (resolve->pargfid)) {
+ gf_uuid_copy (resolve_loc->gfid, resolve->pargfid);
+ } else if (!gf_uuid_is_null (resolve->gfid)) {
+ gf_uuid_copy (resolve_loc->gfid, resolve->gfid);
}
/* inode may already exist in case we are looking up an inode which was
@@ -234,7 +234,7 @@ fuse_resolve_parent_simple (fuse_state_t *state)
/* no graph switches since */
loc->parent = inode_ref (parent);
- uuid_copy (loc->pargfid, parent->gfid);
+ gf_uuid_copy (loc->pargfid, parent->gfid);
loc->inode = inode_grep (state->itable, parent, loc->name);
/* nodeid for root is 1 and we blindly take the latest graph's
@@ -264,7 +264,7 @@ fuse_resolve_parent_simple (fuse_state_t *state)
}
loc->parent = parent;
- uuid_copy (loc->pargfid, resolve->pargfid);
+ gf_uuid_copy (loc->pargfid, resolve->pargfid);
inode = inode_grep (state->itable, parent, loc->name);
if (inode) {
@@ -555,7 +555,7 @@ fuse_gfid_set (fuse_state_t *state)
{
int ret = 0;
- if (uuid_is_null (state->gfid))
+ if (gf_uuid_is_null (state->gfid))
goto out;
if (!state->xdata)
@@ -580,7 +580,7 @@ fuse_resolve_entry_init (fuse_state_t *state, fuse_resolve_t *resolve,
inode_t *parent = NULL;
parent = fuse_ino_to_inode (par, state->this);
- uuid_copy (resolve->pargfid, parent->gfid);
+ gf_uuid_copy (resolve->pargfid, parent->gfid);
resolve->parhint = parent;
resolve->bname = gf_strdup (name);
@@ -595,7 +595,7 @@ fuse_resolve_inode_init (fuse_state_t *state, fuse_resolve_t *resolve,
inode_t *inode = NULL;
inode = fuse_ino_to_inode (ino, state->this);
- uuid_copy (resolve->gfid, inode->gfid);
+ gf_uuid_copy (resolve->gfid, inode->gfid);
resolve->hint = inode;
return 0;
@@ -623,11 +623,11 @@ fuse_resolve (fuse_state_t *state)
fuse_resolve_fd (state);
- } else if (!uuid_is_null (resolve->pargfid)) {
+ } else if (!gf_uuid_is_null (resolve->pargfid)) {
fuse_resolve_parent (state);
- } else if (!uuid_is_null (resolve->gfid)) {
+ } else if (!gf_uuid_is_null (resolve->gfid)) {
fuse_resolve_inode (state);
diff --git a/xlators/nfs/server/src/acl3.c b/xlators/nfs/server/src/acl3.c
index fa10c873eb8..230fb229579 100644
--- a/xlators/nfs/server/src/acl3.c
+++ b/xlators/nfs/server/src/acl3.c
@@ -83,8 +83,8 @@ nfs3_fh_to_xlator (struct nfs3_state *nfs3, struct nfs3_fh *fh);
rpc_transport_t *trans = NULL; \
volume = nfs3_fh_to_xlator ((nfs3state), handle); \
if (!volume) { \
- uuid_unparse (handle->exportid, exportid); \
- uuid_unparse (handle->gfid, gfid); \
+ gf_uuid_unparse (handle->exportid, exportid); \
+ gf_uuid_unparse (handle->gfid, gfid); \
trans = rpcsvc_request_transport (req); \
gf_log (GF_ACL, GF_LOG_ERROR, "Failed to map " \
"FH to vol: client=%s, exportid=%s, gfid=%s",\
@@ -122,7 +122,7 @@ nfs3_fh_to_xlator (struct nfs3_state *nfs3, struct nfs3_fh *fh);
trans = rpcsvc_request_transport (cst->req); \
xlatorp = nfs3_fh_to_xlator (cst->nfs3state, \
&cst->resolvefh); \
- uuid_unparse (cst->resolvefh.gfid, gfid); \
+ gf_uuid_unparse (cst->resolvefh.gfid, gfid); \
snprintf (buf, sizeof (buf), "(%s) %s : %s", \
trans->peerinfo.identifier, \
xlatorp ? xlatorp->name : "ERR", \
diff --git a/xlators/nfs/server/src/auth-cache.c b/xlators/nfs/server/src/auth-cache.c
index 85d9056cd61..01ebaed04d2 100644
--- a/xlators/nfs/server/src/auth-cache.c
+++ b/xlators/nfs/server/src/auth-cache.c
@@ -37,9 +37,9 @@ make_hashkey(char *hashkey, struct nfs3_fh *fh, const char *host)
char mountid[256] = {0, };
size_t nbytes = 0;
- uuid_unparse (fh->exportid, exportid);
- uuid_unparse (fh->gfid, gfid);
- uuid_unparse (fh->mountid, mountid);
+ gf_uuid_unparse (fh->exportid, exportid);
+ gf_uuid_unparse (fh->gfid, gfid);
+ gf_uuid_unparse (fh->mountid, mountid);
nbytes = strlen (exportid) + strlen (gfid) + strlen (host)
+ strlen (mountid) + 5;
hashkey = alloca (nbytes);
diff --git a/xlators/nfs/server/src/exports.c b/xlators/nfs/server/src/exports.c
index af0cc7c24f2..30810361785 100644
--- a/xlators/nfs/server/src/exports.c
+++ b/xlators/nfs/server/src/exports.c
@@ -397,7 +397,7 @@ exp_file_dir_from_uuid (const struct exports_file *file,
data_t *dirdata = NULL;
struct export_dir *dir = NULL;
- uuid_unparse (export_uuid, export_uuid_str);
+ gf_uuid_unparse (export_uuid, export_uuid_str);
dirdata = dict_get (file->exports_map, export_uuid_str);
if (dirdata)
@@ -441,7 +441,7 @@ _exp_file_insert (struct exports_file *file, struct export_dir *dir)
hashedval = SuperFastHash (dirdup, strlen (dirdup));
memset (export_uuid, 0, sizeof (export_uuid));
memcpy (export_uuid, &hashedval, sizeof (hashedval));
- uuid_unparse (export_uuid, export_uuid_str);
+ gf_uuid_unparse (export_uuid, export_uuid_str);
dict_set (file->exports_map, export_uuid_str, dirdata);
out:
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index affd338abc5..63bb44fdcde 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -656,7 +656,7 @@ __mnt3_get_volume_id (struct mount3_state *ms, xlator_t *mntxl,
LOCK (&ms->mountlock);
list_for_each_entry (exp, &ms->exportlist, explist) {
if (exp->vol == mntxl) {
- uuid_copy (volumeid, exp->volumeid);
+ gf_uuid_copy (volumeid, exp->volumeid);
ret = 0;
goto out;
}
@@ -1028,7 +1028,7 @@ __mnt3_resolve_export_subdir_comp (mnt3_resolve_t *mres)
goto err;
/* Wipe the contents of the previous component */
- uuid_copy (gfid, mres->resolveloc.inode->gfid);
+ gf_uuid_copy (gfid, mres->resolveloc.inode->gfid);
nfs_loc_wipe (&mres->resolveloc);
ret = nfs_entry_loc_fill (mres->exp->vol->itable, gfid, nextcomp,
&mres->resolveloc, NFS_RESOLVE_CREATE);
@@ -3150,7 +3150,7 @@ mnt3_init_export_ent (struct mount3_state *ms, xlator_t *xl, char *exportpath,
* actually use it when a mount request comes in and a file handle
* needs to be built.
*/
- uuid_copy (exp->volumeid, volumeid);
+ gf_uuid_copy (exp->volumeid, volumeid);
exp->vol = xl;
/* On success we should return from here*/
@@ -3213,7 +3213,7 @@ __mnt3_init_volume (struct mount3_state *ms, dict_t *opts, xlator_t *xlator)
if ((!ms) || (!xlator) || (!opts))
return -1;
- uuid_clear (volumeid);
+ gf_uuid_clear (volumeid);
if (gf_nfs_dvm_off (nfs_state (ms->nfsx)))
goto no_dvm;
@@ -3240,7 +3240,7 @@ __mnt3_init_volume (struct mount3_state *ms, dict_t *opts, xlator_t *xlator)
}
if (optstr) {
- ret = uuid_parse (optstr, volumeid);
+ ret = gf_uuid_parse (optstr, volumeid);
if (ret < 0) {
gf_log (GF_MNT, GF_LOG_ERROR, "Failed to parse volume "
"UUID");
diff --git a/xlators/nfs/server/src/nfs-common.c b/xlators/nfs/server/src/nfs-common.c
index f942d37d6e1..547e5b3a833 100644
--- a/xlators/nfs/server/src/nfs-common.c
+++ b/xlators/nfs/server/src/nfs-common.c
@@ -157,8 +157,8 @@ nfs_loc_fill (loc_t *loc, inode_t *inode, inode_t *parent, char *path)
if (inode) {
loc->inode = inode_ref (inode);
- if (!uuid_is_null (inode->gfid))
- uuid_copy (loc->gfid, inode->gfid);
+ if (!gf_uuid_is_null (inode->gfid))
+ gf_uuid_copy (loc->gfid, inode->gfid);
}
if (parent)
@@ -198,7 +198,7 @@ nfs_inode_loc_fill (inode_t *inode, loc_t *loc, int how)
* the inode table, and not a newly created one. For newly
* created inode, inode_path returns null gfid as the path.
*/
- if (!uuid_is_null (inode->gfid)) {
+ if (!gf_uuid_is_null (inode->gfid)) {
ret = inode_path (inode, NULL, &resolvedpath);
if (ret < 0) {
gf_log (GF_NFS, GF_LOG_ERROR, "path resolution failed "
@@ -264,7 +264,7 @@ nfs_gfid_loc_fill (inode_table_t *itable, uuid_t gfid, loc_t *loc, int how)
gf_log (GF_NFS, GF_LOG_TRACE, "Inode was found in the itable.");
}
- uuid_copy (loc->gfid, gfid);
+ gf_uuid_copy (loc->gfid, gfid);
ret = nfs_inode_loc_fill (inode, loc, how);
if (ret < 0) {
@@ -340,7 +340,7 @@ nfs_entry_loc_fill (inode_table_t *itable, uuid_t pargfid, char *entry,
if (!parent)
goto err;
- uuid_copy (loc->pargfid, pargfid);
+ gf_uuid_copy (loc->pargfid, pargfid);
ret = -2;
entryinode = inode_grep (itable, parent, entry);
diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c
index 56d4cba47c6..c3f1b5e2fa6 100644
--- a/xlators/nfs/server/src/nfs-fops.c
+++ b/xlators/nfs/server/src/nfs-fops.c
@@ -350,9 +350,9 @@ nfs_gfid_dict (inode_t *inode)
if (dyngfid == NULL)
return (NULL);
- uuid_generate (newgfid);
+ gf_uuid_generate (newgfid);
- if (uuid_compare (inode->gfid, rootgfid) == 0)
+ if (gf_uuid_compare (inode->gfid, rootgfid) == 0)
memcpy (dyngfid, rootgfid, sizeof (uuid_t));
else
memcpy (dyngfid, newgfid, sizeof (uuid_t));
diff --git a/xlators/nfs/server/src/nfs3-fh.c b/xlators/nfs/server/src/nfs3-fh.c
index 88a8fcb1180..8d492c8c72d 100644
--- a/xlators/nfs/server/src/nfs3-fh.c
+++ b/xlators/nfs/server/src/nfs3-fh.c
@@ -58,7 +58,7 @@ nfs3_fh_init (struct nfs3_fh *fh, struct iatt *buf)
fh->ident[2] = GF_NFSFH_IDENT2;
fh->ident[3] = GF_NFSFH_IDENT3;
- uuid_copy (fh->gfid, buf->ia_gfid);
+ gf_uuid_copy (fh->gfid, buf->ia_gfid);
}
@@ -72,7 +72,7 @@ nfs3_fh_build_indexed_root_fh (xlator_list_t *cl, xlator_t *xl)
if ((!cl) || (!xl))
return fh;
- uuid_copy (buf.ia_gfid, root);
+ gf_uuid_copy (buf.ia_gfid, root);
nfs3_fh_init (&fh, &buf);
fh.exportid [15] = nfs_xlator_to_xlid (cl, xl);
@@ -87,10 +87,10 @@ nfs3_fh_build_uuid_root_fh (uuid_t volumeid, uuid_t mountid)
struct iatt buf = {0, };
uuid_t root = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
- uuid_copy (buf.ia_gfid, root);
+ gf_uuid_copy (buf.ia_gfid, root);
nfs3_fh_init (&fh, &buf);
- uuid_copy (fh.exportid, volumeid);
- uuid_copy (fh.mountid, mountid);
+ gf_uuid_copy (fh.exportid, volumeid);
+ gf_uuid_copy (fh.mountid, mountid);
return fh;
}
@@ -104,7 +104,7 @@ nfs3_fh_is_root_fh (struct nfs3_fh *fh)
if (!fh)
return 0;
- if (uuid_compare (fh->gfid, rootgfid) == 0)
+ if (gf_uuid_compare (fh->gfid, rootgfid) == 0)
return 1;
return 0;
@@ -150,7 +150,7 @@ nfs3_fh_build_parent_fh (struct nfs3_fh *child, struct iatt *newstat,
return -1;
nfs3_fh_init (newfh, newstat);
- uuid_copy (newfh->exportid, child->exportid);
+ gf_uuid_copy (newfh->exportid, child->exportid);
return 0;
}
@@ -164,9 +164,9 @@ nfs3_build_fh (inode_t *inode, uuid_t exportid, struct nfs3_fh *newfh)
newfh->ident[1] = GF_NFSFH_IDENT1;
newfh->ident[2] = GF_NFSFH_IDENT2;
newfh->ident[3] = GF_NFSFH_IDENT3;
- uuid_copy (newfh->gfid, inode->gfid);
- uuid_copy (newfh->exportid, exportid);
- /*uuid_copy (newfh->mountid, mountid);*/
+ gf_uuid_copy (newfh->gfid, inode->gfid);
+ gf_uuid_copy (newfh->exportid, exportid);
+ /*gf_uuid_copy (newfh->mountid, mountid);*/
return 0;
}
@@ -178,8 +178,8 @@ nfs3_fh_build_child_fh (struct nfs3_fh *parent, struct iatt *newstat,
return -1;
nfs3_fh_init (newfh, newstat);
- uuid_copy (newfh->exportid, parent->exportid);
- uuid_copy (newfh->mountid, parent->mountid);
+ gf_uuid_copy (newfh->exportid, parent->exportid);
+ gf_uuid_copy (newfh->mountid, parent->mountid);
return 0;
}
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c
index b122faf764d..fb630a643cf 100644
--- a/xlators/nfs/server/src/nfs3-helpers.c
+++ b/xlators/nfs/server/src/nfs3-helpers.c
@@ -3734,7 +3734,7 @@ nfs3_fh_resolve_inode (nfs3_call_state_t *cs)
return ret;
gf_log (GF_NFS3, GF_LOG_TRACE, "FH needs inode resolution");
- uuid_copy (cs->resolvedloc.gfid, cs->resolvefh.gfid);
+ gf_uuid_copy (cs->resolvedloc.gfid, cs->resolvefh.gfid);
inode = inode_find (cs->vol->itable, cs->resolvefh.gfid);
if (!inode)
ret = nfs3_fh_resolve_inode_hard (cs);
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index b8ae5cdb5f9..1a94c00ce8c 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -92,7 +92,7 @@ __nfs3_get_export_by_volumeid (struct nfs3_state *nfs3, uuid_t exportid)
struct nfs3_export *exp = NULL;
list_for_each_entry (exp, &nfs3->exports, explist) {
- if (!uuid_compare (exportid, exp->volumeid))
+ if (!gf_uuid_compare (exportid, exp->volumeid))
goto found;
}
@@ -214,8 +214,8 @@ out:
rpc_transport_t *trans = NULL; \
volume = nfs3_fh_to_xlator ((nfs3state), handle); \
if (!volume) { \
- uuid_unparse (handle->exportid, exportid); \
- uuid_unparse (handle->gfid, gfid); \
+ gf_uuid_unparse (handle->exportid, exportid); \
+ gf_uuid_unparse (handle->gfid, gfid); \
trans = rpcsvc_request_transport (req); \
GF_LOG_OCCASIONALLY (nfs3state->occ_logger, \
GF_NFS3, GF_LOG_ERROR, "Failed to map " \
@@ -258,7 +258,7 @@ out:
trans = rpcsvc_request_transport (cst->req); \
xlatorp = nfs3_fh_to_xlator (cst->nfs3state, \
&cst->resolvefh); \
- uuid_unparse (cst->resolvefh.gfid, gfid); \
+ gf_uuid_unparse (cst->resolvefh.gfid, gfid); \
sprintf (buf, "(%s) %s : %s", \
trans->peerinfo.identifier, \
xlatorp ? xlatorp->name : "ERR", gfid); \
@@ -278,7 +278,7 @@ out:
trans = rpcsvc_request_transport (cst->req); \
xlatorp = nfs3_fh_to_xlator (cst->nfs3state, \
&cst->resolvefh); \
- uuid_unparse (cst->resolvefh.gfid, gfid); \
+ gf_uuid_unparse (cst->resolvefh.gfid, gfid); \
snprintf (buf, sizeof (buf), "(%s) %s : %s", \
trans->peerinfo.identifier, \
xlatorp ? xlatorp->name : "ERR", \
@@ -300,7 +300,7 @@ out:
trans = rpcsvc_request_transport (cst->req); \
xlatorp = nfs3_fh_to_xlator (cst->nfs3state, \
&cst->resolvefh); \
- uuid_unparse (cst->resolvefh.gfid, gfid); \
+ gf_uuid_unparse (cst->resolvefh.gfid, gfid); \
snprintf (buf, sizeof (buf), "(%s) %s : %s", \
trans->peerinfo.identifier, \
xlatorp ? xlatorp->name : "ERR", \
@@ -325,7 +325,7 @@ __nfs3_get_volume_id (struct nfs3_state *nfs3, xlator_t *xl,
list_for_each_entry (exp, &nfs3->exports, explist) {
if (exp->subvol == xl) {
- uuid_copy (volumeid, exp->volumeid);
+ gf_uuid_copy (volumeid, exp->volumeid);
ret = 0;
goto out;
}
@@ -346,7 +346,7 @@ out:
goto erl; \
} \
\
- uuid_copy ((fhd)->gfid, zero); \
+ gf_uuid_copy ((fhd)->gfid, zero); \
(fhd)->gfid[15] = 1; \
(enam) = NULL; \
if ((gf_nfs_dvm_off (nfs_state (nfs3st->nfsx)))) \
@@ -2428,7 +2428,7 @@ nfs3svc_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
cs->preparent = *preparent;
cs->postparent = *postparent;
nfs_request_user_init (&nfu, cs->req);
- uuid_copy (cs->resolvedloc.gfid, inode->gfid);
+ gf_uuid_copy (cs->resolvedloc.gfid, inode->gfid);
ret = nfs_setattr (cs->nfsx, cs->vol, &nfu, &cs->resolvedloc,&cs->stbuf,
cs->setattr_valid, nfs3svc_create_setattr_cbk, cs);
if (ret < 0)
@@ -5331,7 +5331,7 @@ nfs3_init_subvolume_options (xlator_t *nfsx,
if (!options)
return (-1);
- uuid_clear (volumeid);
+ gf_uuid_clear (volumeid);
if (gf_nfs_dvm_off (nfs_state (nfsx)))
goto no_dvm;
@@ -5358,14 +5358,14 @@ nfs3_init_subvolume_options (xlator_t *nfsx,
}
if (optstr) {
- ret = uuid_parse (optstr, volumeid);
+ ret = gf_uuid_parse (optstr, volumeid);
if (ret < 0) {
gf_log (GF_MNT, GF_LOG_ERROR, "Failed to parse volume "
"UUID");
ret = -1;
goto err;
}
- uuid_copy (exp->volumeid, volumeid);
+ gf_uuid_copy (exp->volumeid, volumeid);
}
no_dvm:
diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c
index d1953815992..37fc9c37699 100644
--- a/xlators/nfs/server/src/nlm4.c
+++ b/xlators/nfs/server/src/nlm4.c
@@ -105,8 +105,8 @@ nfs3_fh_to_xlator (struct nfs3_state *nfs3, struct nfs3_fh *fh);
rpc_transport_t *trans = NULL; \
volume = nfs3_fh_to_xlator ((nfs3state), &handle); \
if (!volume) { \
- uuid_unparse (handle.exportid, exportid); \
- uuid_unparse (handle.gfid, gfid); \
+ gf_uuid_unparse (handle.exportid, exportid); \
+ gf_uuid_unparse (handle.gfid, gfid); \
trans = rpcsvc_request_transport (req); \
gf_log (GF_NLM, GF_LOG_ERROR, "Failed to map " \
"FH to vol: client=%s, exportid=%s, gfid=%s",\
@@ -144,7 +144,7 @@ nfs3_fh_to_xlator (struct nfs3_state *nfs3, struct nfs3_fh *fh);
trans = rpcsvc_request_transport (cst->req); \
xlatorp = nfs3_fh_to_xlator (cst->nfs3state, \
&cst->resolvefh); \
- uuid_unparse (cst->resolvefh.gfid, gfid); \
+ gf_uuid_unparse (cst->resolvefh.gfid, gfid); \
snprintf (buf, sizeof (buf), "(%s) %s : %s", \
trans->peerinfo.identifier, \
xlatorp ? xlatorp->name : "ERR", \
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 21acad02657..bfda85d4926 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -1972,7 +1972,7 @@ ioc_inode_dump (xlator_t *this, inode_t *inode)
goto out;
{
- if (uuid_is_null (ioc_inode->inode->gfid))
+ if (gf_uuid_is_null (ioc_inode->inode->gfid))
goto unlock;
gf_proc_dump_add_section (key_prefix);
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index 7770cfd72d1..d7090475a43 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -464,7 +464,7 @@ mdc_inode_iatt_get (xlator_t *this, inode_t *inode, struct iatt *iatt)
}
UNLOCK (&mdc->lock);
- uuid_copy (iatt->ia_gfid, inode->gfid);
+ gf_uuid_copy (iatt->ia_gfid, inode->gfid);
iatt->ia_ino = gfid_to_ino (inode->gfid);
iatt->ia_dev = 42;
iatt->ia_type = inode->ia_type;
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index e5b85b41e3d..b4c4604eb9f 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -845,7 +845,7 @@ protocol_client_reopendir (clnt_fd_ctx_t *fdctx, xlator_t *this)
}
local->fdctx = fdctx;
- uuid_copy (local->loc.gfid, fdctx->gfid);
+ gf_uuid_copy (local->loc.gfid, fdctx->gfid);
ret = loc_path (&local->loc, NULL);
if (ret < 0)
goto out;
@@ -909,7 +909,7 @@ protocol_client_reopenfile (clnt_fd_ctx_t *fdctx, xlator_t *this)
}
local->fdctx = fdctx;
- uuid_copy (local->loc.gfid, fdctx->gfid);
+ gf_uuid_copy (local->loc.gfid, fdctx->gfid);
ret = loc_path (&local->loc, NULL);
if (ret < 0)
goto out;
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index 58742a2a747..55fd327da8e 100644
--- a/xlators/protocol/client/src/client-rpc-fops.c
+++ b/xlators/protocol/client/src/client-rpc-fops.c
@@ -323,8 +323,8 @@ _copy_gfid_from_inode_holders (uuid_t gfid, loc_t *loc, fd_t *fd)
{
int ret = 0;
- if (fd && fd->inode && !uuid_is_null (fd->inode->gfid)) {
- uuid_copy (gfid, fd->inode->gfid);
+ if (fd && fd->inode && !gf_uuid_is_null (fd->inode->gfid)) {
+ gf_uuid_copy (gfid, fd->inode->gfid);
goto out;
}
@@ -334,10 +334,10 @@ _copy_gfid_from_inode_holders (uuid_t gfid, loc_t *loc, fd_t *fd)
goto out;
}
- if (loc->inode && !uuid_is_null (loc->inode->gfid)) {
- uuid_copy (gfid, loc->inode->gfid);
- } else if (!uuid_is_null (loc->gfid)) {
- uuid_copy (gfid, loc->gfid);
+ if (loc->inode && !gf_uuid_is_null (loc->inode->gfid)) {
+ gf_uuid_copy (gfid, loc->inode->gfid);
+ } else if (!gf_uuid_is_null (loc->gfid)) {
+ gf_uuid_copy (gfid, loc->gfid);
} else {
GF_ASSERT (0);
ret = -1;
@@ -369,7 +369,7 @@ client_add_fd_to_saved_fds (xlator_t *this, fd_t *fd, loc_t *loc, int32_t flags,
goto out;
}
- uuid_copy (fdctx->gfid, gfid);
+ gf_uuid_copy (fdctx->gfid, gfid);
fdctx->is_dir = is_dir;
fdctx->remote_fd = remote_fd;
fdctx->flags = flags;
@@ -2250,7 +2250,7 @@ client3_3_create_cbk (struct rpc_req *req, struct iovec *iov, int count,
gf_stat_to_iatt (&rsp.preparent, &preparent);
gf_stat_to_iatt (&rsp.postparent, &postparent);
- uuid_copy (local->loc.gfid, stbuf.ia_gfid);
+ gf_uuid_copy (local->loc.gfid, stbuf.ia_gfid);
ret = client_add_fd_to_saved_fds (frame->this, fd, &local->loc,
local->flags, rsp.fd, 0);
if (ret) {
@@ -2797,8 +2797,8 @@ client3_3_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count,
(rsp.xdata.xdata_len), rsp.op_ret,
op_errno, out);
- if ((!uuid_is_null (inode->gfid))
- && (uuid_compare (stbuf.ia_gfid, inode->gfid) != 0)) {
+ if ((!gf_uuid_is_null (inode->gfid))
+ && (gf_uuid_compare (stbuf.ia_gfid, inode->gfid) != 0)) {
gf_log (frame->this->name, GF_LOG_DEBUG,
"gfid changed for %s", local->loc.path);
@@ -3127,12 +3127,12 @@ client3_3_lookup (call_frame_t *frame, xlator_t *this,
loc_path (&local->loc, NULL);
if (args->loc->parent) {
- if (!uuid_is_null (args->loc->parent->gfid))
+ if (!gf_uuid_is_null (args->loc->parent->gfid))
memcpy (req.pargfid, args->loc->parent->gfid, 16);
else
memcpy (req.pargfid, args->loc->pargfid, 16);
} else {
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
@@ -3222,13 +3222,13 @@ client3_3_stat (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->inode))
goto unwind;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
conf = this->private;
@@ -3273,13 +3273,13 @@ client3_3_truncate (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->inode))
goto unwind;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
req.offset = args->offset;
@@ -3375,13 +3375,13 @@ client3_3_access (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->inode))
goto unwind;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
req.mask = args->mask;
@@ -3433,13 +3433,13 @@ client3_3_readlink (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->inode))
goto unwind;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
req.size = args->size;
conf = this->private;
@@ -3520,13 +3520,13 @@ client3_3_unlink (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->parent))
goto unwind;
- if (!uuid_is_null (args->loc->parent->gfid))
+ if (!gf_uuid_is_null (args->loc->parent->gfid))
memcpy (req.pargfid, args->loc->parent->gfid, 16);
else
memcpy (req.pargfid, args->loc->pargfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.pargfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.pargfid)),
unwind, op_errno, EINVAL);
req.bname = (char *)args->loc->name;
req.xflags = args->flags;
@@ -3574,13 +3574,13 @@ client3_3_rmdir (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->parent))
goto unwind;
- if (!uuid_is_null (args->loc->parent->gfid))
+ if (!gf_uuid_is_null (args->loc->parent->gfid))
memcpy (req.pargfid, args->loc->parent->gfid, 16);
else
memcpy (req.pargfid, args->loc->pargfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.pargfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.pargfid)),
unwind, op_errno, EINVAL);
req.bname = (char *)args->loc->name;
req.xflags = args->flags;
@@ -3637,13 +3637,13 @@ client3_3_symlink (call_frame_t *frame, xlator_t *this,
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- if (!uuid_is_null (args->loc->parent->gfid))
+ if (!gf_uuid_is_null (args->loc->parent->gfid))
memcpy (req.pargfid, args->loc->parent->gfid, 16);
else
memcpy (req.pargfid, args->loc->pargfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.pargfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.pargfid)),
unwind, op_errno, EINVAL);
req.linkname = (char *)args->linkname;
req.bname = (char *)args->loc->name;
@@ -3697,21 +3697,21 @@ client3_3_rename (call_frame_t *frame, xlator_t *this,
args->newloc->parent))
goto unwind;
- if (!uuid_is_null (args->oldloc->parent->gfid))
+ if (!gf_uuid_is_null (args->oldloc->parent->gfid))
memcpy (req.oldgfid, args->oldloc->parent->gfid, 16);
else
memcpy (req.oldgfid, args->oldloc->pargfid, 16);
- if (!uuid_is_null (args->newloc->parent->gfid))
+ if (!gf_uuid_is_null (args->newloc->parent->gfid))
memcpy (req.newgfid, args->newloc->parent->gfid, 16);
else
memcpy (req.newgfid, args->newloc->pargfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.oldgfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.oldgfid)),
unwind, op_errno, EINVAL);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.newgfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.newgfid)),
unwind, op_errno, EINVAL);
req.oldbname = (char *)args->oldloc->name;
req.newbname = (char *)args->newloc->name;
@@ -3762,21 +3762,21 @@ client3_3_link (call_frame_t *frame, xlator_t *this,
args->newloc->parent))
goto unwind;
- if (!uuid_is_null (args->oldloc->inode->gfid))
+ if (!gf_uuid_is_null (args->oldloc->inode->gfid))
memcpy (req.oldgfid, args->oldloc->inode->gfid, 16);
else
memcpy (req.oldgfid, args->oldloc->gfid, 16);
- if (!uuid_is_null (args->newloc->parent->gfid))
+ if (!gf_uuid_is_null (args->newloc->parent->gfid))
memcpy (req.newgfid, args->newloc->parent->gfid, 16);
else
memcpy (req.newgfid, args->newloc->pargfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.oldgfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.oldgfid)),
unwind, op_errno, EINVAL);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.newgfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.newgfid)),
unwind, op_errno, EINVAL);
local = mem_get0 (this->local_pool);
if (!local) {
@@ -3845,13 +3845,13 @@ client3_3_mknod (call_frame_t *frame, xlator_t *this,
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- if (!uuid_is_null (args->loc->parent->gfid))
+ if (!gf_uuid_is_null (args->loc->parent->gfid))
memcpy (req.pargfid, args->loc->parent->gfid, 16);
else
memcpy (req.pargfid, args->loc->pargfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.pargfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.pargfid)),
unwind, op_errno, EINVAL);
req.bname = (char *)args->loc->name;
req.mode = args->mode;
@@ -3913,13 +3913,13 @@ client3_3_mkdir (call_frame_t *frame, xlator_t *this,
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- if (!uuid_is_null (args->loc->parent->gfid))
+ if (!gf_uuid_is_null (args->loc->parent->gfid))
memcpy (req.pargfid, args->loc->parent->gfid, 16);
else
memcpy (req.pargfid, args->loc->pargfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.pargfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.pargfid)),
unwind, op_errno, EINVAL);
req.bname = (char *)args->loc->name;
@@ -3983,13 +3983,13 @@ client3_3_create (call_frame_t *frame, xlator_t *this,
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- if (!uuid_is_null (args->loc->parent->gfid))
+ if (!gf_uuid_is_null (args->loc->parent->gfid))
memcpy (req.pargfid, args->loc->parent->gfid, 16);
else
memcpy (req.pargfid, args->loc->pargfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.pargfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.pargfid)),
unwind, op_errno, EINVAL);
req.bname = (char *)args->loc->name;
req.mode = args->mode;
@@ -4054,13 +4054,13 @@ client3_3_open (call_frame_t *frame, xlator_t *this,
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
req.flags = gf_flags_from_flags (args->flags);
@@ -4444,13 +4444,13 @@ client3_3_opendir (call_frame_t *frame, xlator_t *this,
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
conf = this->private;
@@ -4549,7 +4549,7 @@ client3_3_statfs (call_frame_t *frame, xlator_t *this,
goto unwind;
if (args->loc->inode) {
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
@@ -4557,7 +4557,7 @@ client3_3_statfs (call_frame_t *frame, xlator_t *this,
req.gfid[15] = 1;
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
conf = this->private;
@@ -4604,13 +4604,13 @@ client3_3_setxattr (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->inode))
goto unwind;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
if (args->xattr) {
GF_PROTOCOL_DICT_SERIALIZE (this, args->xattr,
@@ -4872,13 +4872,13 @@ client3_3_getxattr (call_frame_t *frame, xlator_t *this,
rsp_iobuf = NULL;
rsp_iobref = NULL;
- if (args->loc->inode && !uuid_is_null (args->loc->inode->gfid))
+ if (args->loc->inode && !gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
req.namelen = 1; /* Use it as a flag */
@@ -4996,7 +4996,7 @@ client3_3_xattrop (call_frame_t *frame, xlator_t *this,
rsp_iobuf = NULL;
rsp_iobref = NULL;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
@@ -5004,7 +5004,7 @@ client3_3_xattrop (call_frame_t *frame, xlator_t *this,
loc_copy (&local->loc, args->loc);
loc_path (&local->loc, NULL);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
if (args->xattr) {
GF_PROTOCOL_DICT_SERIALIZE (this, args->xattr,
@@ -5173,13 +5173,13 @@ client3_3_removexattr (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->inode))
goto unwind;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
req.name = (char *)args->name;
@@ -5358,13 +5358,13 @@ client3_3_inodelk (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->inode))
goto unwind;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
if (args->cmd == F_GETLK || args->cmd == F_GETLK64)
gf_cmd = GF_LK_GETLK;
@@ -5519,13 +5519,13 @@ client3_3_entrylk (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->inode))
goto unwind;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
req.cmd = args->cmd_entrylk;
req.type = args->type;
@@ -5891,13 +5891,13 @@ client3_3_setattr (call_frame_t *frame, xlator_t *this,
if (!(args->loc && args->loc->inode))
goto unwind;
- if (!uuid_is_null (args->loc->inode->gfid))
+ if (!gf_uuid_is_null (args->loc->inode->gfid))
memcpy (req.gfid, args->loc->inode->gfid, 16);
else
memcpy (req.gfid, args->loc->gfid, 16);
GF_ASSERT_AND_GOTO_WITH_ERROR (this->name,
- !uuid_is_null (*((uuid_t*)req.gfid)),
+ !gf_uuid_is_null (*((uuid_t*)req.gfid)),
unwind, op_errno, EINVAL);
req.valid = args->valid;
gf_stat_from_iatt (&req.stbuf, args->stbuf);
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c
index 9528259970a..3c3dcfeb3e5 100644
--- a/xlators/protocol/server/src/server-resolve.c
+++ b/xlators/protocol/server/src/server-resolve.c
@@ -135,13 +135,13 @@ resolve_gfid_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
*/
loc_wipe (resolve_loc);
- if (uuid_is_null (resolve->pargfid)) {
+ if (gf_uuid_is_null (resolve->pargfid)) {
inode_unref (link_inode);
goto out;
}
resolve_loc->parent = link_inode;
- uuid_copy (resolve_loc->pargfid, resolve_loc->parent->gfid);
+ gf_uuid_copy (resolve_loc->pargfid, resolve_loc->parent->gfid);
resolve_loc->name = resolve->bname;
@@ -175,10 +175,10 @@ resolve_gfid (call_frame_t *frame)
resolve = state->resolve_now;
resolve_loc = &resolve->resolve_loc;
- if (!uuid_is_null (resolve->pargfid))
- uuid_copy (resolve_loc->gfid, resolve->pargfid);
- else if (!uuid_is_null (resolve->gfid))
- uuid_copy (resolve_loc->gfid, resolve->gfid);
+ if (!gf_uuid_is_null (resolve->pargfid))
+ gf_uuid_copy (resolve_loc->gfid, resolve->pargfid);
+ else if (!gf_uuid_is_null (resolve->gfid))
+ gf_uuid_copy (resolve_loc->gfid, resolve->gfid);
resolve_loc->inode = inode_new (state->itable);
ret = loc_path (resolve_loc, NULL);
@@ -208,9 +208,9 @@ resolve_continue (call_frame_t *frame)
if (resolve->fd_no != -1) {
ret = resolve_anonfd_simple (frame);
goto out;
- } else if (!uuid_is_null (resolve->pargfid))
+ } else if (!gf_uuid_is_null (resolve->pargfid))
ret = resolve_entry_simple (frame);
- else if (!uuid_is_null (resolve->gfid))
+ else if (!gf_uuid_is_null (resolve->gfid))
ret = resolve_inode_simple (frame);
if (ret)
gf_log (this->name, GF_LOG_DEBUG,
@@ -256,7 +256,7 @@ resolve_entry_simple (call_frame_t *frame)
}
/* expected @parent was found from the inode cache */
- uuid_copy (state->loc_now->pargfid, resolve->pargfid);
+ gf_uuid_copy (state->loc_now->pargfid, resolve->pargfid);
state->loc_now->parent = inode_ref (parent);
state->loc_now->name = resolve->bname;
@@ -355,7 +355,7 @@ resolve_inode_simple (call_frame_t *frame)
ret = 0;
state->loc_now->inode = inode_ref (inode);
- uuid_copy (state->loc_now->gfid, resolve->gfid);
+ gf_uuid_copy (state->loc_now->gfid, resolve->gfid);
out:
if (inode)
@@ -509,11 +509,11 @@ server_resolve (call_frame_t *frame)
server_resolve_fd (frame);
- } else if (!uuid_is_null (resolve->pargfid)) {
+ } else if (!gf_uuid_is_null (resolve->pargfid)) {
server_resolve_entry (frame);
- } else if (!uuid_is_null (resolve->gfid)) {
+ } else if (!gf_uuid_is_null (resolve->gfid)) {
server_resolve_inode (frame);
diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c
index 024cfc0b8d6..c69b17fd255 100644
--- a/xlators/protocol/server/src/server-rpc-fops.c
+++ b/xlators/protocol/server/src/server-rpc-fops.c
@@ -116,7 +116,7 @@ server_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* we just looked up root ("/") */
stbuf->ia_ino = 1;
rootgfid[15] = 1;
- uuid_copy (stbuf->ia_gfid, rootgfid);
+ gf_uuid_copy (stbuf->ia_gfid, rootgfid);
if (inode->ia_type == 0)
inode->ia_type = stbuf->ia_type;
}
diff --git a/xlators/storage/bd/src/bd-helper.c b/xlators/storage/bd/src/bd-helper.c
index 5ca1ef79400..8aaffa6b27a 100644
--- a/xlators/storage/bd/src/bd-helper.c
+++ b/xlators/storage/bd/src/bd-helper.c
@@ -138,7 +138,7 @@ check:
goto out;
}
- op_ret = uuid_parse (tmp_data->data, dict_uuid);
+ op_ret = gf_uuid_parse (tmp_data->data, dict_uuid);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
"wrong volume-id (%s) set in volume file",
@@ -171,7 +171,7 @@ check:
goto out;
}
- op_ret = uuid_parse (strl->str + strlen (GF_XATTR_VOL_ID_KEY) + 1,
+ op_ret = gf_uuid_parse (strl->str + strlen (GF_XATTR_VOL_ID_KEY) + 1,
vg_uuid);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
@@ -179,7 +179,7 @@ check:
op_ret = -1;
goto out;
}
- if (uuid_compare (dict_uuid, vg_uuid)) {
+ if (gf_uuid_compare (dict_uuid, vg_uuid)) {
gf_log (this->name, GF_LOG_ERROR,
"mismatching volume-id (%s) received. "
"already is a part of volume %s ",
diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c
index 85372f072ed..4ef94810f99 100644
--- a/xlators/storage/bd/src/bd.c
+++ b/xlators/storage/bd/src/bd.c
@@ -796,7 +796,7 @@ bd_fsync (call_frame_t *frame, xlator_t *this,
local->bdatt->type = gf_strdup (bdatt->type);
memcpy (&local->bdatt->iatt, &bdatt->iatt, sizeof (struct iatt));
bd_update_amtime (&local->bdatt->iatt, valid);
- uuid_copy (local->loc.gfid, fd->inode->gfid);
+ gf_uuid_copy (local->loc.gfid, fd->inode->gfid);
STACK_WIND (frame, bd_fsync_setattr_cbk, FIRST_CHILD (this),
FIRST_CHILD (this)->fops->setattr, &local->loc,
&local->bdatt->iatt,
@@ -853,7 +853,7 @@ bd_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
BD_VALIDATE_MEM_ALLOC (local, op_errno, out);
local->fd = fd_ref (fd);
- uuid_copy (loc.gfid, bdatt->iatt.ia_gfid);
+ gf_uuid_copy (loc.gfid, bdatt->iatt.ia_gfid);
/* Update the a|mtime during flush */
STACK_WIND (frame, bd_flush_setattr_cbk, FIRST_CHILD (this),
@@ -1269,7 +1269,7 @@ bd_do_merge(call_frame_t *frame, xlator_t *this)
op_errno = EINVAL;
goto out;
}
- uuid_copy (local->loc.pargfid, parent->gfid);
+ gf_uuid_copy (local->loc.pargfid, parent->gfid);
p = strrchr (local->loc.path, '/');
if (p)
@@ -1327,7 +1327,7 @@ bd_offload (call_frame_t *frame, xlator_t *this, loc_t *loc,
goto out;
}
- uuid_parse (gfid, local->dloc->gfid);
+ gf_uuid_parse (gfid, local->dloc->gfid);
local->offload = offload;
STACK_WIND (frame, bd_offload_dest_lookup_cbk, FIRST_CHILD (this),
diff --git a/xlators/storage/posix/src/posix-handle.c b/xlators/storage/posix/src/posix-handle.c
index 2bf8813f44c..5aedfe3eb95 100644
--- a/xlators/storage/posix/src/posix-handle.c
+++ b/xlators/storage/posix/src/posix-handle.c
@@ -87,7 +87,7 @@ posix_make_ancestral_node (const char *priv_base_path, char *path, int pathsize,
strcat (real_path, "/");
strcat (real_path, path);
loc.inode = inode_ref (inode);
- uuid_copy (loc.gfid, inode->gfid);
+ gf_uuid_copy (loc.gfid, inode->gfid);
entry->dict = posix_lookup_xattr_fill (THIS, real_path, &loc,
xdata, iabuf);
@@ -119,7 +119,7 @@ posix_make_ancestryfromgfid (xlator_t *this, char *path, int pathsize,
int ret = -1;
uuid_t tmp_gfid = {0, };
- if (!path || !parent || !priv_base_path || uuid_is_null (gfid)) {
+ if (!path || !parent || !priv_base_path || gf_uuid_is_null (gfid)) {
goto out;
}
@@ -135,7 +135,7 @@ posix_make_ancestryfromgfid (xlator_t *this, char *path, int pathsize,
inode = itable->root;
memset (&iabuf, 0, sizeof (iabuf));
- uuid_copy (iabuf.ia_gfid, inode->gfid);
+ gf_uuid_copy (iabuf.ia_gfid, inode->gfid);
iabuf.ia_type = inode->ia_type;
ret = posix_make_ancestral_node (priv_base_path, path, pathsize,
@@ -163,7 +163,7 @@ posix_make_ancestryfromgfid (xlator_t *this, char *path, int pathsize,
pgfidstr = strtok_r (linkname + SLEN("../../00/00/"), "/", &saveptr);
dir_name = strtok_r (NULL, "/", &saveptr);
- uuid_parse (pgfidstr, tmp_gfid);
+ gf_uuid_parse (pgfidstr, tmp_gfid);
ret = posix_make_ancestryfromgfid (this, path, pathsize, head, type,
tmp_gfid, handle_size,
@@ -609,7 +609,7 @@ posix_mv_old_trash_into_new_trash (xlator_t *this, char *old, char *new)
if (!posix_does_old_trash_exists (old))
goto out;
- uuid_generate (dest_name);
+ gf_uuid_generate (dest_name);
snprintf (dest_old, sizeof (dest_old), "%s/%s", new,
uuid_utoa (dest_name));
ret = rename (old, dest_old);
diff --git a/xlators/storage/posix/src/posix-handle.h b/xlators/storage/posix/src/posix-handle.h
index 3af1a70b31a..e0b5b67e20f 100644
--- a/xlators/storage/posix/src/posix-handle.h
+++ b/xlators/storage/posix/src/posix-handle.h
@@ -181,7 +181,7 @@
#define MAKE_INODE_HANDLE(rpath, this, loc, iatt_p) do { \
- if (uuid_is_null (loc->gfid)) { \
+ if (gf_uuid_is_null (loc->gfid)) { \
gf_log (this->name, GF_LOG_ERROR, \
"null gfid for path %s", (loc)->path); \
break; \
@@ -210,7 +210,7 @@
#define MAKE_ENTRY_HANDLE(entp, parp, this, loc, ent_p) do { \
char *__parp; \
\
- if (uuid_is_null (loc->pargfid) || !loc->name) { \
+ if (gf_uuid_is_null (loc->pargfid) || !loc->name) { \
gf_log (this->name, GF_LOG_ERROR, \
"null pargfid/name for path %s", loc->path); \
break; \
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 4a062970f7d..0638f845e9d 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -420,7 +420,7 @@ posix_fill_ino_from_gfid (xlator_t *this, struct iatt *buf)
int i = 0;
/* consider least significant 8 bytes of value out of gfid */
- if (uuid_is_null (buf->ia_gfid)) {
+ if (gf_uuid_is_null (buf->ia_gfid)) {
buf->ia_ino = -1;
goto out;
}
@@ -519,7 +519,7 @@ posix_istat (xlator_t *this, uuid_t gfid, const char *basename,
if (basename)
posix_fill_gfid_path (this, real_path, &stbuf);
else
- uuid_copy (stbuf.ia_gfid, gfid);
+ gf_uuid_copy (stbuf.ia_gfid, gfid);
posix_fill_ino_from_gfid (this, &stbuf);
@@ -574,8 +574,8 @@ posix_pstat (xlator_t *this, uuid_t gfid, const char *path,
iatt_from_stat (&stbuf, &lstatbuf);
- if (gfid && !uuid_is_null (gfid))
- uuid_copy (stbuf.ia_gfid, gfid);
+ if (gfid && !gf_uuid_is_null (gfid))
+ gf_uuid_copy (stbuf.ia_gfid, gfid);
else
posix_fill_gfid_path (this, path, &stbuf);
@@ -724,7 +724,7 @@ posix_gfid_set (xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req)
strerror (errno));
goto out;
}
- uuid_copy (uuid_curr, uuid_req);
+ gf_uuid_copy (uuid_curr, uuid_req);
verify_handle:
if (!S_ISDIR (stat.st_mode))
@@ -1125,7 +1125,7 @@ del_stale_dir_handle (xlator_t *this, uuid_t gfid)
gf_log (this->name, GF_LOG_DEBUG, "%s: %s", newpath,
strerror (ENOENT));
stale = _gf_true;
- } else if (size == 16 && uuid_compare (gfid, gfid_curr)) {
+ } else if (size == 16 && gf_uuid_compare (gfid, gfid_curr)) {
gf_log (this->name, GF_LOG_DEBUG, "%s: mismatching gfid: %s, "
"at %s", hpath, uuid_utoa (gfid_curr), newpath);
stale = _gf_true;
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 3cc942d50a6..9f20aeb6abc 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -128,13 +128,13 @@ posix_lookup (call_frame_t *frame, xlator_t *this,
op_ret = dict_get_int32 (xdata, GF_GFIDLESS_LOOKUP, &gfidless);
op_ret = -1;
- if (uuid_is_null (loc->pargfid) || (loc->name == NULL)) {
+ if (gf_uuid_is_null (loc->pargfid) || (loc->name == NULL)) {
/* nameless lookup */
MAKE_INODE_HANDLE (real_path, this, loc, &buf);
} else {
MAKE_ENTRY_HANDLE (real_path, par_path, this, loc, &buf);
- if (uuid_is_null (loc->inode->gfid)) {
+ if (gf_uuid_is_null (loc->inode->gfid)) {
posix_gfid_heal (this, real_path, loc, xdata);
MAKE_ENTRY_HANDLE (real_path, par_path, this,
loc, &buf);
@@ -161,7 +161,7 @@ posix_lookup (call_frame_t *frame, xlator_t *this,
}
if (priv->update_pgfid_nlinks) {
- if (!uuid_is_null (loc->pargfid) && !IA_ISDIR (buf.ia_type)) {
+ if (!gf_uuid_is_null (loc->pargfid) && !IA_ISDIR (buf.ia_type)) {
MAKE_PGFID_XATTR_KEY (pgfid_xattr_key,
PGFID_XATTR_KEY_PREFIX,
loc->pargfid);
@@ -199,7 +199,7 @@ parent:
op_ret = entry_ret;
out:
- if (!op_ret && !gfidless && uuid_is_null (buf.ia_gfid)) {
+ if (!op_ret && !gfidless && gf_uuid_is_null (buf.ia_gfid)) {
gf_log (this->name, GF_LOG_ERROR, "buf->ia_gfid is null for "
"%s", (real_path) ? real_path: "");
op_ret = -1;
@@ -1314,7 +1314,7 @@ posix_mkdir (call_frame_t *frame, xlator_t *this,
SET_FS_ID (frame->root->uid, gid);
op_ret = dict_get_ptr (xdata, "gfid-req", &uuid_req);
- if (uuid_req && !uuid_is_null (uuid_req)) {
+ if (uuid_req && !gf_uuid_is_null (uuid_req)) {
op_ret = posix_istat (this, uuid_req, NULL, &stbuf);
if ((op_ret == 0) && IA_ISDIR (stbuf.ia_type)) {
size = posix_handle_path (this, uuid_req, NULL, NULL,
@@ -2004,7 +2004,7 @@ posix_rename (call_frame_t *frame, xlator_t *this,
if ((op_ret == -1) && (errno == ENOENT)){
was_present = 0;
} else {
- uuid_copy (victim, stbuf.ia_gfid);
+ gf_uuid_copy (victim, stbuf.ia_gfid);
if (IA_ISDIR (stbuf.ia_type))
was_dir = 1;
nlink = stbuf.ia_nlink;
@@ -2020,7 +2020,7 @@ posix_rename (call_frame_t *frame, xlator_t *this,
}
if (was_present && IA_ISDIR(stbuf.ia_type) &&
- uuid_compare (newloc->inode->gfid, stbuf.ia_gfid)) {
+ gf_uuid_compare (newloc->inode->gfid, stbuf.ia_gfid)) {
gf_log (this->name, GF_LOG_WARNING,
"found directory %s at %s while renaming %s",
uuid_utoa_r (newloc->inode->gfid, olddirid),
@@ -2789,7 +2789,7 @@ _fill_writev_xdata (fd_t *fd, dict_t *xdata, xlator_t *this, int is_append)
if (fd)
inode = fd->inode;
- if (!fd || !fd->inode || uuid_is_null (fd->inode->gfid)) {
+ if (!fd || !fd->inode || gf_uuid_is_null (fd->inode->gfid)) {
gf_log_callingfn (this->name, GF_LOG_ERROR, "Invalid Args: "
"fd: %p inode: %p gfid:%s", fd, inode?inode:0,
inode?uuid_utoa(inode->gfid):"N/A");
@@ -3418,7 +3418,7 @@ posix_links_in_same_directory (char *dirpath, int count, inode_t *leaf_inode,
loc_t loc = {0, };
loc.inode = inode_ref (leaf_inode);
- uuid_copy (loc.gfid, leaf_inode->gfid);
+ gf_uuid_copy (loc.gfid, leaf_inode->gfid);
strcpy (temppath, dirpath);
strcat (temppath, "/");
@@ -3510,7 +3510,7 @@ posix_get_ancestry_non_directory (xlator_t *this, inode_t *leaf_inode,
goto out;
}
- uuid_copy (loc->gfid, leaf_inode->gfid);
+ gf_uuid_copy (loc->gfid, leaf_inode->gfid);
MAKE_INODE_HANDLE (leaf_path, this, loc, NULL);
if (!leaf_path) {
@@ -3592,7 +3592,7 @@ posix_get_ancestry_non_directory (xlator_t *this, inode_t *leaf_inode,
nlink_samepgfid = ntoh32 (nlink_samepgfid);
strcpy (pgfidstr, key + strlen(PGFID_XATTR_KEY_PREFIX));
- uuid_parse (pgfidstr, pgfid);
+ gf_uuid_parse (pgfidstr, pgfid);
handle_size = POSIX_GFID_HANDLE_SIZE(priv->base_path_length);
@@ -3792,7 +3792,7 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,
(void) snprintf (host_buf, 1024,
"<POSIX(%s):%s:%s>", priv->base_path,
((priv->node_uuid_pathinfo
- && !uuid_is_null(priv->glusterd_uuid))
+ && !gf_uuid_is_null(priv->glusterd_uuid))
? uuid_utoa (priv->glusterd_uuid)
: priv->hostname),
rpath);
@@ -3816,7 +3816,7 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,
if (loc->inode && name &&
(strcmp (name, GF_XATTR_NODE_UUID_KEY) == 0)
- && !uuid_is_null (priv->glusterd_uuid)) {
+ && !gf_uuid_is_null (priv->glusterd_uuid)) {
(void) snprintf (host_buf, 1024, "%s",
uuid_utoa (priv->glusterd_uuid));
@@ -4785,7 +4785,7 @@ do_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
_fd = pfd->fd;
}
- if (loc && !uuid_is_null (loc->gfid))
+ if (loc && !gf_uuid_is_null (loc->gfid))
MAKE_INODE_HANDLE (real_path, this, loc, NULL);
if (real_path) {
@@ -5163,12 +5163,12 @@ posix_fill_readdir (fd_t *fd, DIR *dir, off_t off, size_t size,
* when the cluster/dht xlator decides to distribute
* exended attribute backing file across storage servers.
*/
- if ((uuid_compare (fd->inode->gfid, rootgfid) == 0)
+ if ((gf_uuid_compare (fd->inode->gfid, rootgfid) == 0)
&& (!strcmp(entry->d_name, ".attribute")))
continue;
#endif /* __NetBSD__ */
- if ((uuid_compare (fd->inode->gfid, rootgfid) == 0)
+ if ((gf_uuid_compare (fd->inode->gfid, rootgfid) == 0)
&& (!strcmp (GF_HIDDEN_PATH, entry->d_name))) {
continue;
}
@@ -5296,7 +5296,7 @@ posix_readdirp_fill (xlator_t *this, fd_t *fd, gf_dirent_t *entries, dict_t *dic
inode = inode_grep (fd->inode->table, fd->inode,
entry->d_name);
if (inode)
- uuid_copy (gfid, inode->gfid);
+ gf_uuid_copy (gfid, inode->gfid);
strcpy (&hpath[len+1], entry->d_name);
@@ -5725,7 +5725,7 @@ reconfigure (xlator_t *this, dict_t *options)
options, bool, out);
if (priv->node_uuid_pathinfo &&
- (uuid_is_null (priv->glusterd_uuid))) {
+ (gf_uuid_is_null (priv->glusterd_uuid))) {
gf_log (this->name, GF_LOG_INFO,
"glusterd uuid is NULL, pathinfo xattr would"
" fallback to <hostname>:<export>");
@@ -5837,7 +5837,7 @@ init (xlator_t *this)
tmp_data = dict_get (this->options, "volume-id");
if (tmp_data) {
- op_ret = uuid_parse (tmp_data->data, dict_uuid);
+ op_ret = gf_uuid_parse (tmp_data->data, dict_uuid);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
"wrong volume-id (%s) set in volume file",
@@ -5848,7 +5848,7 @@ init (xlator_t *this)
size = sys_lgetxattr (dir_data->data,
"trusted.glusterfs.volume-id", old_uuid, 16);
if (size == 16) {
- if (uuid_compare (old_uuid, dict_uuid)) {
+ if (gf_uuid_compare (old_uuid, dict_uuid)) {
gf_log (this->name, GF_LOG_ERROR,
"mismatching volume-id (%s) received. "
"already is a part of volume %s ",
@@ -6054,7 +6054,7 @@ init (xlator_t *this)
ret = dict_get_str (this->options, "glusterd-uuid", &guuid);
if (!ret) {
- if (uuid_parse (guuid, _private->glusterd_uuid))
+ if (gf_uuid_parse (guuid, _private->glusterd_uuid))
gf_log (this->name, GF_LOG_WARNING, "Cannot parse "
"glusterd (node) UUID, node-uuid xattr "
"request would return - \"No such attribute\"");
@@ -6155,7 +6155,7 @@ init (xlator_t *this)
GF_OPTION_INIT ("node-uuid-pathinfo",
_private->node_uuid_pathinfo, bool, out);
if (_private->node_uuid_pathinfo &&
- (uuid_is_null (_private->glusterd_uuid))) {
+ (gf_uuid_is_null (_private->glusterd_uuid))) {
gf_log (this->name, GF_LOG_INFO,
"glusterd uuid is NULL, pathinfo xattr would"
" fallback to <hostname>:<export>");