diff options
author | Manikandan Selvaganesh <mselvaga@redhat.com> | 2015-04-07 12:49:37 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-04-28 22:38:57 -0700 |
commit | de7c629d02b723e6b4c3d50a14ea5f072e27ccc1 (patch) | |
tree | a168be38201f61f2e3f26eb4c9effe96882c4b69 /xlators/nfs/server/src/auth-cache.c | |
parent | bacb5491e394b5e1bc16114bbbd6edaa68bf1f4f (diff) |
nfs/auth,exports,netgroup : port log messages to new framework
Five gf_log messages are not changed to gf_msg because gf_msg
not sending the output to STDOUT.
Bug id : BZ1215017
Change-Id: Ie8de286355becc3fd73fa80057734b834cf40b04
BUG: 1194640
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/10173
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: NetBSD Build System
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Diffstat (limited to 'xlators/nfs/server/src/auth-cache.c')
-rw-r--r-- | xlators/nfs/server/src/auth-cache.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/xlators/nfs/server/src/auth-cache.c b/xlators/nfs/server/src/auth-cache.c index 01ebaed04d2..b33dc96db6f 100644 --- a/xlators/nfs/server/src/auth-cache.c +++ b/xlators/nfs/server/src/auth-cache.c @@ -14,6 +14,7 @@ #include "auth-cache.h" #include "nfs3.h" #include "exports.h" +#include "nfs-messages.h" enum auth_cache_lookup_results { ENTRY_FOUND = 0, @@ -80,7 +81,8 @@ auth_cache_entry_init () entry = GF_CALLOC (1, sizeof (*entry), gf_nfs_mt_auth_cache_entry); if (!entry) - gf_log (GF_NFS, GF_LOG_WARNING, "failed to allocate entry"); + gf_msg (GF_NFS, GF_LOG_WARNING, ENOMEM, NFS_MSG_NO_MEMORY, + "failed to allocate entry"); return entry; } @@ -122,16 +124,16 @@ auth_cache_lookup (struct auth_cache *cache, struct nfs3_fh *fh, entry_data = dict_get (cache->cache_dict, hashkey); if (!entry_data) { - gf_log (GF_NFS, GF_LOG_DEBUG, "could not find entry for %s", - host_addr); + gf_msg_debug (GF_NFS, 0, "could not find entry for %s", + host_addr); goto out; } lookup_res = (struct auth_cache_entry *)(entry_data->data); if ((time (NULL) - lookup_res->timestamp) > cache->ttl_sec) { - gf_log (GF_NFS, GF_LOG_DEBUG, "entry for host %s has expired", - host_addr); + gf_msg_debug (GF_NFS, 0, "entry for host %s has expired", + host_addr); GF_FREE (lookup_res); entry_data->data = NULL; /* Remove from the cache */ @@ -274,8 +276,8 @@ cache_nfs_fh (struct auth_cache *cache, struct nfs3_fh *fh, /* If we could already find it in the cache, just return */ ret = auth_cache_lookup (cache, fh, host_addr, ×tamp, &can_write); if (ret == 0) { - gf_log (GF_NFS, GF_LOG_TRACE, "found cached auth/fh for host " - "%s", host_addr); + gf_msg_trace (GF_NFS, 0, "found cached auth/fh for host " + "%s", host_addr); goto out; } @@ -304,7 +306,7 @@ cache_nfs_fh (struct auth_cache *cache, struct nfs3_fh *fh, GF_FREE (entry); goto out; } - gf_log (GF_NFS, GF_LOG_TRACE, "Caching file-handle (%s)", host_addr); + gf_msg_trace (GF_NFS, 0, "Caching file-handle (%s)", host_addr); ret = 0; out: return ret; |