summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorGaurav <gaurav@gluster.com>2011-01-31 04:25:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-04 00:39:26 -0800
commit5f8e2cab86eab7f5ee5b4bb9b649376e476c740c (patch)
tree2a40f4806584dbafe1e0c2d44dbb509de28cbeb4 /libglusterfs
parentf3648c88ebc6d58a10854d564d3fc2c82290ce13 (diff)
Logging : Use of uuid_utoa and uuid_utoa_r.
Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2308 (Threadsafe uuid to string conversion function) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2308
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/inode.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index 388485283ff..919f82143ae 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -202,7 +202,6 @@ __is_dentry_cyclic (dentry_t *dentry)
{
int ret = 0;
inode_t *inode = NULL;
- char uuidbuf[64];
char *name = "<nul>";
ret = __foreach_ancestor_dentry (dentry, __check_cycle,
@@ -212,12 +211,11 @@ __is_dentry_cyclic (dentry_t *dentry)
if (dentry->name)
name = dentry->name;
- uuid_unparse (inode->gfid, uuidbuf);
gf_log (dentry->inode->table->name, GF_LOG_CRITICAL,
"detected cyclic loop formation during inode linkage."
" inode (%"PRId64"/%s) linking under itself as %s",
- inode->ino, uuidbuf, name);
+ inode->ino, uuid_utoa (inode->gfid), name);
}
return ret;
@@ -1438,7 +1436,6 @@ inode_dump (inode_t *inode, char *prefix)
int ret = -1;
xlator_t *xl = NULL;
int i = 0;
- char uuidbuf[256];
fd_t *fd = NULL;
struct _inode_ctx *inode_ctx = NULL;
struct fd_wrapper {
@@ -1461,9 +1458,8 @@ inode_dump (inode_t *inode, char *prefix)
}
{
- uuid_unparse (inode->gfid, uuidbuf);
gf_proc_dump_build_key(key, prefix, "gfid");
- gf_proc_dump_write(key, "%s", uuidbuf);
+ gf_proc_dump_write(key, "%s", uuid_utoa (inode->gfid));
gf_proc_dump_build_key(key, prefix, "nlookup");
gf_proc_dump_write(key, "%ld", inode->nlookup);
gf_proc_dump_build_key(key, prefix, "ref");