summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs3-fh.c
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 /xlators/nfs/server/src/nfs3-fh.c
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 'xlators/nfs/server/src/nfs3-fh.c')
-rw-r--r--xlators/nfs/server/src/nfs3-fh.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/xlators/nfs/server/src/nfs3-fh.c b/xlators/nfs/server/src/nfs3-fh.c
index be5a3017c..971bea8a3 100644
--- a/xlators/nfs/server/src/nfs3-fh.c
+++ b/xlators/nfs/server/src/nfs3-fh.c
@@ -31,6 +31,7 @@
#include "nfs3-fh.h"
#include "nfs-common.h"
#include "iatt.h"
+#include "common-utils.h"
int
@@ -171,7 +172,6 @@ nfs3_fh_hash_entry (uuid_t gfid)
}
-
void
nfs3_fh_to_str (struct nfs3_fh *fh, char *str)
{
@@ -181,13 +181,11 @@ nfs3_fh_to_str (struct nfs3_fh *fh, char *str)
if ((!fh) || (!str))
return;
- uuid_unparse (fh->gfid, gfid);
- uuid_unparse (fh->exportid, exportid);
sprintf (str, "FH: hashcount %d, exportid %s, gfid %s",
- fh->hashcount, exportid, gfid);
+ fh->hashcount, uuid_utoa_r (fh->exportid, exportid),
+ uuid_utoa_r (fh->gfid, gfid));
}
-
void
nfs3_log_fh (struct nfs3_fh *fh)
{
@@ -198,10 +196,10 @@ nfs3_log_fh (struct nfs3_fh *fh)
if (!fh)
return;
- uuid_unparse (fh->gfid, gfidstr);
- uuid_unparse (fh->exportid, exportidstr);
gf_log ("nfs3-fh", GF_LOG_TRACE, "filehandle: hashcount %d, exportid "
- "0x%s, gfid 0x%s", fh->hashcount, exportidstr, gfidstr);
+ "0x%s, gfid 0x%s", fh->hashcount,
+ uuid_utoa_r (fh->exportid, exportidstr),
+ uuid_utoa_r (fh->gfid, gfidstr));
/*
for (; x < fh->hashcount; ++x)
gf_log ("FILEHANDLE", GF_LOG_TRACE, "Hash %d: %d", x,
@@ -209,7 +207,6 @@ nfs3_log_fh (struct nfs3_fh *fh)
*/
}
-
int
nfs3_fh_build_parent_fh (struct nfs3_fh *child, struct iatt *newstat,
struct nfs3_fh *newfh)