diff options
Diffstat (limited to 'xlators/protocol/client/src/client-rpc-fops.c')
-rw-r--r-- | xlators/protocol/client/src/client-rpc-fops.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c index 64d30f2a99f..5f88769e352 100644 --- a/xlators/protocol/client/src/client-rpc-fops.c +++ b/xlators/protocol/client/src/client-rpc-fops.c @@ -442,7 +442,8 @@ client3_3_open_cbk (struct rpc_req *req, struct iovec *iov, int count, out: if (rsp.op_ret == -1) { - gf_log (this->name, GF_LOG_WARNING, + gf_log (this->name, fop_log_level (GF_FOP_OPEN, + gf_error_to_errno (rsp.op_errno)), "remote operation failed: %s. Path: %s (%s)", strerror (gf_error_to_errno (rsp.op_errno)), local->loc.path, loc_gfid_utoa (&local->loc)); @@ -907,7 +908,8 @@ client3_3_flush_cbk (struct rpc_req *req, struct iovec *iov, int count, out: if (rsp.op_ret == -1) { - gf_log (this->name, GF_LOG_WARNING, + gf_log (this->name, fop_log_level (GF_FOP_FLUSH, + gf_error_to_errno (rsp.op_errno)), "remote operation failed: %s", strerror (gf_error_to_errno (rsp.op_errno))); } @@ -1508,9 +1510,10 @@ client3_3_inodelk_cbk (struct rpc_req *req, struct iovec *iov, int count, rsp.op_errno, out); out: - if ((rsp.op_ret == -1) && - (EAGAIN != gf_error_to_errno (rsp.op_errno))) { - gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s", + if (rsp.op_ret == -1) { + gf_log (this->name, fop_log_level (GF_FOP_INODELK, + gf_error_to_errno (rsp.op_errno)), + "remote operation failed: %s", strerror (gf_error_to_errno (rsp.op_errno))); } CLIENT_STACK_UNWIND (inodelk, frame, rsp.op_ret, @@ -1558,9 +1561,10 @@ client3_3_finodelk_cbk (struct rpc_req *req, struct iovec *iov, int count, rsp.op_errno, out); out: - if ((rsp.op_ret == -1) && - (EAGAIN != gf_error_to_errno (rsp.op_errno))) { - gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s", + if (rsp.op_ret == -1) { + gf_log (this->name, fop_log_level (GF_FOP_FINODELK, + gf_error_to_errno (rsp.op_errno)), + "remote operation failed: %s", strerror (gf_error_to_errno (rsp.op_errno))); } else if (rsp.op_ret == 0) { if (local->attempt_reopen) @@ -1610,9 +1614,10 @@ client3_3_entrylk_cbk (struct rpc_req *req, struct iovec *iov, int count, rsp.op_errno, out); out: - if ((rsp.op_ret == -1) && - (EAGAIN != gf_error_to_errno (rsp.op_errno))) { - gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s", + if (rsp.op_ret == -1) { + gf_log (this->name, fop_log_level (GF_FOP_ENTRYLK, + gf_error_to_errno (rsp.op_errno)), + "remote operation failed: %s", strerror (gf_error_to_errno (rsp.op_errno))); } @@ -2668,7 +2673,8 @@ client3_3_opendir_cbk (struct rpc_req *req, struct iovec *iov, int count, out: if (rsp.op_ret == -1) { - gf_log (this->name, GF_LOG_WARNING, + gf_log (this->name, fop_log_level (GF_FOP_OPENDIR, + gf_error_to_errno (rsp.op_errno)), "remote operation failed: %s. Path: %s (%s)", strerror (gf_error_to_errno (rsp.op_errno)), local->loc.path, loc_gfid_utoa (&local->loc)); |