summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-helpers.c
diff options
context:
space:
mode:
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;