summaryrefslogtreecommitdiffstats
path: root/xlators/features
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/features
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/features')
-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
31 files changed, 262 insertions, 262 deletions
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: