e7a346
From 6699edde4b8d82346dc06a2468434aa99ee53b53 Mon Sep 17 00:00:00 2001
e7a346
From: Amar Tumballi <amarts@redhat.com>
e7a346
Date: Wed, 9 May 2018 00:56:11 +0530
e7a346
Subject: [PATCH 274/274] client/protocol: fix the log level for
e7a346
 removexattr_cbk
e7a346
e7a346
noticed that server protocol actually logs all the errors for
e7a346
removexattr as INFO, instead of WARNING like client, and hence,
e7a346
doesn't create a confusion in user.
e7a346
e7a346
Upstream:
e7a346
> Patch URL: https://review.gluster.org/19990/
e7a346
> Change-Id: Ia6681e9ee433fda3c77a4509906c78333396e339
e7a346
> Signed-off-by: Amar Tumballi <amarts@redhat.com>
e7a346
e7a346
BUG: 1575555
e7a346
Change-Id: I1540a6b77abc48eebf06072d781afadf371e982d
e7a346
Signed-off-by: Amar Tumballi <amarts@redhat.com>
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/139053
e7a346
Tested-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e7a346
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e7a346
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e7a346
---
e7a346
 xlators/protocol/client/src/client-rpc-fops.c | 7 ++++++-
e7a346
 1 file changed, 6 insertions(+), 1 deletion(-)
e7a346
e7a346
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
e7a346
index 973a795..e6a9b90 100644
e7a346
--- a/xlators/protocol/client/src/client-rpc-fops.c
e7a346
+++ b/xlators/protocol/client/src/client-rpc-fops.c
e7a346
@@ -1196,7 +1196,12 @@ client3_3_removexattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
e7a346
         ret = client_post_removexattr (this, &rsp, &xdata);
e7a346
 out:
e7a346
         if (rsp.op_ret == -1) {
e7a346
-                if ((ENODATA == rsp.op_errno) || (ENOATTR == rsp.op_errno))
e7a346
+                /* EPERM/EACCESS is returned some times in case of selinux
e7a346
+                   attributes, or other system attributes which may not be
e7a346
+                   possible to remove from an user process is encountered.
e7a346
+                   we can't treat it as an error */
e7a346
+                if ((ENODATA == rsp.op_errno) || (ENOATTR == rsp.op_errno) ||
e7a346
+                    (EPERM == rsp.op_errno) || (EACCES == rsp.op_errno))
e7a346
                         loglevel = GF_LOG_DEBUG;
e7a346
                 else
e7a346
                         loglevel = GF_LOG_WARNING;
e7a346
-- 
e7a346
1.8.3.1
e7a346