From 5f8e2cab86eab7f5ee5b4bb9b649376e476c740c Mon Sep 17 00:00:00 2001 From: Gaurav Date: Mon, 31 Jan 2011 04:25:38 +0000 Subject: Logging : Use of uuid_utoa and uuid_utoa_r. Signed-off-by: Gaurav Signed-off-by: Anand V. Avati BUG: 2308 (Threadsafe uuid to string conversion function) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2308 --- xlators/nfs/server/src/nfs3-fh.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'xlators/nfs/server/src/nfs3-fh.c') diff --git a/xlators/nfs/server/src/nfs3-fh.c b/xlators/nfs/server/src/nfs3-fh.c index be5a3017c3b..971bea8a30a 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) -- cgit