summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2014-09-19 19:08:05 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-24 00:48:59 -0700
commitbd592f8b8379087604f35c3b377f6e94b9e1697d (patch)
treebefdce5849d1e88368b53ef87ef4ad42a3e67c2c
parent3b871bee4a0ad3bc8b393ba23bfcf3ad6886cf42 (diff)
protocol: Log ENODATA & ENOATTR logs at DEBUG loglevel in removexattr_cbk.
Prevents messages of the following type from being seen by default in the log files: [2014-09-19 07:57:39.877806] W [client-rpc-fops.c:1232:client3_3_removexattr_cbk] 0-<volume_name>-client-0: remote operation failed: No data available [2014-09-19 07:57:39.877963] W [client-rpc-fops.c:1232:client3_3_removexattr_cbk] 0-<volume_name>-client-1: remote operation failed: No data available Change-Id: I3b1a121b0fc272eb772547275bb8085ed19db5a1 BUG: 1144527 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/8781 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
-rw-r--r--xlators/protocol/client/src/client-rpc-fops.c12
-rw-r--r--xlators/protocol/server/src/server-rpc-fops.c8
2 files changed, 16 insertions, 4 deletions
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index 3bfa03fa2ed..47e49502595 100644
--- a/xlators/protocol/client/src/client-rpc-fops.c
+++ b/xlators/protocol/client/src/client-rpc-fops.c
@@ -1180,8 +1180,9 @@ client3_3_removexattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
call_frame_t *frame = NULL;
gf_common_rsp rsp = {0,};
int ret = 0;
- xlator_t *this = NULL;
- dict_t *xdata = NULL;
+ xlator_t *this = NULL;
+ dict_t *xdata = NULL;
+ gf_loglevel_t loglevel = GF_LOG_NONE;
this = THIS;
@@ -1207,7 +1208,12 @@ client3_3_removexattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
+ if ((ENODATA == rsp.op_errno) || (ENOATTR == rsp.op_errno))
+ loglevel = GF_LOG_DEBUG;
+ else
+ loglevel = GF_LOG_WARNING;
+
+ gf_log (this->name, loglevel, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c
index f36bc16fc43..0438fb971c3 100644
--- a/xlators/protocol/server/src/server-rpc-fops.c
+++ b/xlators/protocol/server/src/server-rpc-fops.c
@@ -715,13 +715,19 @@ server_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_common_rsp rsp = {0,};
rpcsvc_request_t *req = NULL;
server_state_t *state = NULL;
+ gf_loglevel_t loglevel = GF_LOG_NONE;
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, &rsp.xdata.xdata_val,
rsp.xdata.xdata_len, op_errno, out);
if (op_ret == -1) {
state = CALL_STATE (frame);
- gf_log (this->name, GF_LOG_INFO,
+ if (ENODATA == op_errno || ENOATTR == op_errno)
+ loglevel = GF_LOG_DEBUG;
+ else
+ loglevel = GF_LOG_INFO;
+
+ gf_log (this->name, loglevel,
"%"PRId64": REMOVEXATTR %s (%s) of key %s ==> (%s)",
frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),