summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-helpers.c
diff options
context:
space:
mode:
authorManikandan Selvaganesh <mselvaga@redhat.com>2015-04-06 16:21:43 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-06-17 05:11:43 -0700
commit2dcc68df252f9f8313eb8f8b2e1e97f539426643 (patch)
tree6207411f159898757bc81fd27595b0a182ca35c4 /xlators/protocol/client/src/client-helpers.c
parentdb3a86b6d1a3a0c50450e2e30a6f7648f0fa94db (diff)
protocol/client : porting log messages to new framework
Backport of http://review.gluster.org/#/c/10042/ Cherry picked from 379dbbfd683d2b0e1704c098b1f020567328122c > Change-Id: I9bf2ca08fef969e566a64475d0f7a16d37e66eeb > BUG: 1194640 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/10042 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Tested-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I9bf2ca08fef969e566a64475d0f7a16d37e66eeb BUG: 1217722 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/11240 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client-helpers.c')
-rw-r--r--xlators/protocol/client/src/client-helpers.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/xlators/protocol/client/src/client-helpers.c b/xlators/protocol/client/src/client-helpers.c
index be5e7b57739..62fbc6c9af9 100644
--- a/xlators/protocol/client/src/client-helpers.c
+++ b/xlators/protocol/client/src/client-helpers.c
@@ -15,6 +15,7 @@
#include "client.h"
#include "fd.h"
+#include "client-messages.h"
int
client_fd_lk_list_empty (fd_lk_ctx_t *lk_ctx, gf_boolean_t try_lock)
@@ -94,22 +95,26 @@ this_fd_set_ctx (fd_t *file, xlator_t *this, loc_t *loc, clnt_fd_ctx_t *ctx)
ret = fd_ctx_get (file, this, &oldaddr);
if (ret >= 0) {
if (loc)
- gf_log (this->name, GF_LOG_INFO,
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ PC_MSG_FD_DUPLICATE_TRY,
"%s (%s): trying duplicate remote fd set. ",
loc->path, uuid_utoa (loc->inode->gfid));
else
- gf_log (this->name, GF_LOG_INFO,
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ PC_MSG_FD_DUPLICATE_TRY,
"%p: trying duplicate remote fd set. ", file);
}
ret = fd_ctx_set (file, this, (uint64_t)(unsigned long)ctx);
if (ret < 0) {
if (loc)
- gf_log (this->name, GF_LOG_WARNING,
+ gf_msg (this->name, GF_LOG_WARNING, 0,
+ PC_MSG_FD_SET_FAIL,
"%s (%s): failed to set remote fd",
loc->path, uuid_utoa (loc->inode->gfid));
else
- gf_log (this->name, GF_LOG_WARNING,
+ gf_msg (this->name, GF_LOG_WARNING, 0,
+ PC_MSG_FD_SET_FAIL,
"%p: failed to set remote fd", file);
}
out:
@@ -225,9 +230,9 @@ unserialize_rsp_direntp (xlator_t *this, fd_t *fd,
ret = dict_unserialize (buf, trav->dict.dict_len,
&entry->dict);
if (ret < 0) {
- gf_log (THIS->name, GF_LOG_WARNING,
+ gf_msg (THIS->name, GF_LOG_WARNING, EINVAL,
+ PC_MSG_DICT_UNSERIALIZE_FAIL,
"failed to unserialize xattr dict");
- errno = EINVAL;
goto out;
}
entry->dict->extra_free = buf;