summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server3_1-fops.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-05-02 11:38:33 +0530
committerVijay Bellur <vijay@gluster.com>2012-05-02 22:59:11 -0700
commit170a3a411c88f6ce1662c55440a372f512e901d1 (patch)
tree43fc3af043a30f0ddb75e2ade29a68d9e0826e64 /xlators/protocol/server/src/server3_1-fops.c
parent7ee1c22353e3af4153d1716a5f3629615de4510e (diff)
log cleanup: in setxattr() path
* in posix we log occassionally if errno is ENOTSUP, added a suggestion to mount with 'user_xattr' option. * changed server's *etxattr_cbk to log ENOTSUP in debug level. * changed client's *etxattr_cbk to log ENOTSUP in debug level. Change-Id: Icd604050aaa68546011f2c950ecd7883ac6ee820 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 811957 Reviewed-on: http://review.gluster.com/3140 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/protocol/server/src/server3_1-fops.c')
-rw-r--r--xlators/protocol/server/src/server3_1-fops.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c
index 7c64b5f9f5c..914d5160dbe 100644
--- a/xlators/protocol/server/src/server3_1-fops.c
+++ b/xlators/protocol/server/src/server3_1-fops.c
@@ -812,7 +812,8 @@ out:
rsp.op_errno = gf_errno_to_error (op_errno);
if (op_ret == -1)
- gf_log (this->name, GF_LOG_INFO,
+ gf_log (this->name, ((op_errno == ENOTSUP) ?
+ GF_LOG_DEBUG : GF_LOG_INFO),
"%"PRId64": GETXATTR %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
state->name, op_ret, strerror (op_errno));
@@ -858,7 +859,8 @@ out:
rsp.op_errno = gf_errno_to_error (op_errno);
if (op_ret == -1)
- gf_log (this->name, GF_LOG_INFO,
+ gf_log (this->name, ((op_errno == ENOTSUP) ?
+ GF_LOG_DEBUG : GF_LOG_INFO),
"%"PRId64": FGETXATTR %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
state->name, op_ret, strerror (op_errno));
@@ -889,12 +891,15 @@ server_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
rsp.op_ret = op_ret;
rsp.op_errno = gf_errno_to_error (op_errno);
- if (op_ret == -1)
- gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": SETXATTR %s (%s) ==> %"PRId32" (%s)",
+ if (op_ret == -1) {
+ gf_log (this->name, ((op_errno == ENOTSUP) ?
+ GF_LOG_DEBUG : GF_LOG_INFO),
+ "%"PRId64": SETXATTR %s (%s) ==> %s (%s)",
frame->root->unique, state->loc.path,
state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
- "--", op_ret, strerror (op_errno));
+ "--", state->dict->members_list->key,
+ strerror (op_errno));
+ }
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
@@ -926,11 +931,12 @@ server_fsetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
state = CALL_STATE(frame);
if (op_ret == -1)
- gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FSETXATTR %"PRId64" (%s) ==> %"PRId32" (%s)",
+ gf_log (this->name, ((op_errno == ENOTSUP) ?
+ GF_LOG_DEBUG : GF_LOG_INFO),
+ "%"PRId64": FSETXATTR %"PRId64" (%s) ==> %s (%s)",
frame->root->unique, state->resolve.fd_no,
state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
- op_ret, strerror (op_errno));
+ state->dict->members_list->key, strerror (op_errno));
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);