summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2014-02-28 17:34:03 +0100
committerAnand Avati <avati@redhat.com>2014-03-01 19:03:31 -0800
commit7b3399cd462d0fca6509168f13a67f43e8b2c7d2 (patch)
tree3b04bcd12bc823f9d5902470f91e2e364934d7d6
parentee150bd45e4976bc31d1660102d487982b0ce83d (diff)
Reduce logging caused by non-existing extended attributes
This changes the following log messages from INFO (default value) to DEBUG. We do not really care if someone tries to read extended attributes that do not exist. [2013-12-09 12:19:05.924497] E [posix.c:3539:posix_fgetxattr] 0-dis-rep-posix: fgetxattr failed on key system.posix_acl_access (No data available) [2013-12-09 12:19:05.924545] I [server-rpc-fops.c:863:server_fgetxattr_cbk] 0-dis-rep-server: 13074: FGETXATTR 1 (b8381953-ffa5-40fa-90dd-ae122335cc4b) (system.posix_acl_access) ==> (No data available) Change-Id: Idbbeb026f81e67025a2b36d7bfeb125ad2a1f61b BUG: 1027174 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/7171 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--xlators/protocol/server/src/server-rpc-fops.c4
-rw-r--r--xlators/storage/posix/src/posix.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c
index c56da30..8bdadec 100644
--- a/xlators/protocol/server/src/server-rpc-fops.c
+++ b/xlators/protocol/server/src/server-rpc-fops.c
@@ -810,7 +810,9 @@ server_fgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1) {
state = CALL_STATE (frame);
- gf_log (this->name, ((op_errno == ENOTSUP) ?
+ gf_log (this->name, (((op_errno == ENOTSUP) ||
+ (op_errno == ENODATA) ||
+ (op_errno == ENOENT)) ?
GF_LOG_DEBUG : GF_LOG_INFO),
"%"PRId64": FGETXATTR %"PRId64" (%s) (%s) ==> (%s)",
frame->root->unique, state->resolve.fd_no,
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index ce777a4..588079d 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3733,8 +3733,10 @@ posix_fgetxattr (call_frame_t *frame, xlator_t *this,
size = sys_fgetxattr (_fd, key, NULL, 0);
if (size <= 0) {
op_errno = errno;
- gf_log (this->name, GF_LOG_ERROR, "fgetxattr failed on "
- "key %s (%s)", key, strerror (op_errno));
+ gf_log (this->name, ((errno == ENODATA) ?
+ GF_LOG_DEBUG : GF_LOG_ERROR),
+ "fgetxattr failed on key %s (%s)", key,
+ strerror (op_errno));
goto done;
}