summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2015-03-25 10:18:22 -0400
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-03-25 10:13:02 -0700
commit076143f52e47a2a733a02cfb05a7d780553b147d (patch)
treea5b2ae20929926307bffad6449ba0c67ca47ed06 /xlators
parent982f0fac5300302cb85c97a791ad6ab021a32150 (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 Backport of http://review.gluster.org/#/c/8781/, see BZ 1144527 Change-Id: I814e12c56f5b95fcc24a6f0d46c7240d7abd16e4 BUG: 1205715 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/9996 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/protocol/client/src/client-rpc-fops.c10
-rw-r--r--xlators/protocol/server/src/server-rpc-fops.c6
2 files changed, 12 insertions, 4 deletions
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index f524c1a373a..053886c428c 100644
--- a/xlators/protocol/client/src/client-rpc-fops.c
+++ b/xlators/protocol/client/src/client-rpc-fops.c
@@ -1201,8 +1201,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_WARNING;
this = THIS;
@@ -1228,7 +1229,10 @@ 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;
+
+ 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 88e481bf333..6340be4c5e9 100644
--- a/xlators/protocol/server/src/server-rpc-fops.c
+++ b/xlators/protocol/server/src/server-rpc-fops.c
@@ -730,6 +730,7 @@ 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_INFO;
req = frame->local;
state = CALL_STATE(frame);
@@ -738,7 +739,10 @@ server_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
rsp.xdata.xdata_len, op_errno, out);
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO,
+ if (ENODATA == op_errno || ENOATTR == op_errno)
+ loglevel = GF_LOG_DEBUG;
+
+ gf_log (this->name, loglevel,
"%"PRId64": REMOVEXATTR %s (%s) of key %s ==> (%s)",
frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),