summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-05-09 00:56:11 +0530
committerAmar Tumballi <amarts@redhat.com>2018-05-17 04:05:49 +0000
commit7ac79fb033824605dd5145975a16aeb155172185 (patch)
tree7272c79e43e44c33dfaf0ab2c54a51499a212fd5 /xlators/protocol
parent9ead9a66900b15387b4b7588ff5c1300810d5eba (diff)
client/protocol: fix the log level for removexattr_cbk
noticed that server protocol actually logs all the errors for removexattr as INFO, instead of WARNING like client, and hence, doesn't create a confusion in user. updates: bz#1576418 Change-Id: Ia6681e9ee433fda3c77a4509906c78333396e339 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client-rpc-fops.c7
-rw-r--r--xlators/protocol/client/src/client-rpc-fops_v2.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index 94fe4ea5ad2..18a50785c54 100644
--- a/xlators/protocol/client/src/client-rpc-fops.c
+++ b/xlators/protocol/client/src/client-rpc-fops.c
@@ -1194,7 +1194,12 @@ client3_3_removexattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = client_post_removexattr (this, &rsp, &xdata);
out:
if (rsp.op_ret == -1) {
- if ((ENODATA == rsp.op_errno) || (ENOATTR == rsp.op_errno))
+ /* EPERM/EACCESS is returned some times in case of selinux
+ attributes, or other system attributes which may not be
+ possible to remove from an user process is encountered.
+ we can't treat it as an error */
+ if ((ENODATA == rsp.op_errno) || (ENOATTR == rsp.op_errno) ||
+ (EPERM == rsp.op_errno) || (EACCES == rsp.op_errno))
loglevel = GF_LOG_DEBUG;
else
loglevel = GF_LOG_WARNING;
diff --git a/xlators/protocol/client/src/client-rpc-fops_v2.c b/xlators/protocol/client/src/client-rpc-fops_v2.c
index 15f1c956101..7748a216a23 100644
--- a/xlators/protocol/client/src/client-rpc-fops_v2.c
+++ b/xlators/protocol/client/src/client-rpc-fops_v2.c
@@ -1012,7 +1012,12 @@ client4_0_removexattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
xdr_to_dict (&rsp.xdata, &xdata);
out:
if (rsp.op_ret == -1) {
- if ((ENODATA == rsp.op_errno) || (ENOATTR == rsp.op_errno))
+ /* EPERM/EACCESS is returned some times in case of selinux
+ attributes, or other system attributes which may not be
+ possible to remove from an user process is encountered.
+ we can't treat it as an error */
+ if ((ENODATA == rsp.op_errno) || (ENOATTR == rsp.op_errno) ||
+ (EPERM == rsp.op_errno) || (EACCES == rsp.op_errno))
loglevel = GF_LOG_DEBUG;
else
loglevel = GF_LOG_WARNING;