e7a346
From cba83bafc87af2b635c24d1be2d7224a01901c73 Mon Sep 17 00:00:00 2001
e7a346
From: N Balachandran <nbalacha@redhat.com>
e7a346
Date: Tue, 20 Feb 2018 20:08:11 +0530
e7a346
Subject: [PATCH 165/180] cluster/dht: Ignore ENODATA from getxattr for posix
e7a346
 acls
e7a346
e7a346
dht_migrate_file no longer prints an error if getxattr for
e7a346
posix acls fails with ENODATA/ENOATTR.
e7a346
e7a346
upstream: https://review.gluster.org/#/c/19603/
e7a346
e7a346
> Change-Id: Id9ecf6852cb5294c1c154b28d609889ea3420e1c
e7a346
> BUG: 1546954
e7a346
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
e7a346
e7a346
Change-Id: Id9ecf6852cb5294c1c154b28d609889ea3420e1c
e7a346
BUG: 1546945
e7a346
Signed-off-by: N Balachandran <nbalacha@redhat.com>
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/130975
e7a346
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e7a346
Reviewed-by: Amar Tumballi <amarts@redhat.com>
e7a346
---
e7a346
 xlators/cluster/dht/src/dht-rebalance.c | 15 ++++++++-------
e7a346
 1 file changed, 8 insertions(+), 7 deletions(-)
e7a346
e7a346
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
e7a346
index e620005..9770359 100644
e7a346
--- a/xlators/cluster/dht/src/dht-rebalance.c
e7a346
+++ b/xlators/cluster/dht/src/dht-rebalance.c
e7a346
@@ -2029,13 +2029,14 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to,
e7a346
         ret = syncop_getxattr (from, loc, &xattr, POSIX_ACL_ACCESS_XATTR,
e7a346
                                NULL, NULL);
e7a346
         if (ret < 0) {
e7a346
-                gf_msg (this->name, GF_LOG_WARNING, -ret,
e7a346
-                        DHT_MSG_MIGRATE_FILE_FAILED,
e7a346
-                        "Migrate file failed:"
e7a346
-                        "%s: failed to get xattr from %s",
e7a346
-                        loc->path, from->name);
e7a346
-                *fop_errno = -ret;
e7a346
-                ret = -1;
e7a346
+                if ((-ret != ENODATA) && (-ret != ENOATTR)) {
e7a346
+                        gf_msg (this->name, GF_LOG_WARNING, -ret,
e7a346
+                                DHT_MSG_MIGRATE_FILE_FAILED,
e7a346
+                                "Migrate file failed:"
e7a346
+                                "%s: failed to get xattr from %s",
e7a346
+                                loc->path, from->name);
e7a346
+                        *fop_errno = -ret;
e7a346
+                }
e7a346
         } else {
e7a346
                 ret = syncop_setxattr (to, loc, xattr, 0, NULL, NULL);
e7a346
                 if (ret < 0) {
e7a346
-- 
e7a346
1.8.3.1
e7a346