diff options
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client3_1-fops.c | 13 | ||||
-rw-r--r-- | xlators/protocol/server/src/server3_1-fops.c | 12 |
2 files changed, 11 insertions, 14 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 492c469d84d..f1f6bd0a4d6 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -887,7 +887,7 @@ client3_1_getxattr_cbk (struct rpc_req *req, struct iovec *iov, int count, out: if (rsp.op_ret == -1) { gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s", - strerror (gf_error_to_errno (rsp.op_errno))); + strerror (op_errno)); } STACK_UNWIND_STRICT (getxattr, frame, op_ret, op_errno, dict); @@ -970,7 +970,7 @@ client3_1_fgetxattr_cbk (struct rpc_req *req, struct iovec *iov, int count, out: if (rsp.op_ret == -1) { gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s", - strerror (gf_error_to_errno (rsp.op_errno))); + strerror (op_errno)); } STACK_UNWIND_STRICT (fgetxattr, frame, op_ret, op_errno, dict); if (rsp.dict.dict_val) { @@ -2212,7 +2212,7 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count, gf_log (frame->this->name, GF_LOG_DEBUG, "gfid changed for %s", local->loc.path); rsp.op_ret = -1; - rsp.op_errno = ESTALE; + op_errno = ESTALE; goto out; } @@ -2222,11 +2222,10 @@ out: rsp.op_errno = op_errno; frame->local = NULL; if (rsp.op_ret == -1) { - /* any error other than ENOENT or for revalidate for ENOENT too */ - if ((gf_error_to_errno (rsp.op_errno) != ENOENT) || - !uuid_is_null (local->loc.inode->gfid)) + /* any error other than ENOENT */ + if (rsp.op_errno != ENOENT) gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s", - strerror (gf_error_to_errno (rsp.op_errno))); + strerror (rsp.op_errno)); else gf_log (this->name, GF_LOG_TRACE, "not found on remote node"); diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index eb51640d9a4..569a4674245 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -161,7 +161,7 @@ out: if (op_ret) { gf_log (this->name, - (op_errno == ENOENT ? GF_LOG_TRACE : GF_LOG_INFO), + ((op_errno == ENOENT) ? GF_LOG_TRACE : GF_LOG_INFO), "%"PRId64": LOOKUP %s (%"PRId64") ==> %"PRId32" (%s)", frame->root->unique, state->loc.path, state->loc.inode ? state->loc.inode->ino : 0, @@ -736,10 +736,9 @@ out: rsp.dict.dict_len = len; if (op_ret == -1) gf_log (this->name, GF_LOG_INFO, - "%"PRId64": GETXATTR %s (%"PRId64") ==> %"PRId32" (%s)", + "%"PRId64": GETXATTR %s (%s) ==> %"PRId32" (%s)", frame->root->unique, state->loc.path, - state->loc.inode ? state->loc.inode->ino : 0, - op_ret, strerror (op_errno)); + state->name, op_ret, strerror (op_errno)); server_submit_reply (frame, req, &rsp, NULL, 0, NULL, xdr_serialize_getxattr_rsp); @@ -801,10 +800,9 @@ out: rsp.dict.dict_len = len; if (op_ret == -1) gf_log (this->name, GF_LOG_INFO, - "%"PRId64": FGETXATTR %"PRId64" (%"PRId64") ==> %"PRId32" (%s)", + "%"PRId64": FGETXATTR %"PRId64" (%s) ==> %"PRId32" (%s)", frame->root->unique, state->resolve.fd_no, - state->fd ? state->fd->inode->ino : 0, op_ret, - strerror (op_errno)); + state->name, op_ret, strerror (op_errno)); server_submit_reply (frame, req, &rsp, NULL, 0, NULL, xdr_serialize_fgetxattr_rsp); |