summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2018-02-20 20:08:11 +0530
committerjiffin tony Thottan <jthottan@redhat.com>2018-03-05 04:38:15 +0000
commit5624f69bcd28ceabee3f8c545b8febc5929caee0 (patch)
tree9421e889744a300cccd5ffea9286f09a0dd07d0d
parent928ea2fcbc98281c29cfcb8c47a1ad925216b018 (diff)
cluster/dht: Ignore ENODATA from getxattr for posix acls
dht_migrate_file no longer prints an error if getxattr for posix acls fails with ENODATA/ENOATTR. > Change-Id: Id9ecf6852cb5294c1c154b28d609889ea3420e1c > BUG: 1546954 > Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: Id9ecf6852cb5294c1c154b28d609889ea3420e1c BUG: 1548078 Signed-off-by: N Balachandran <nbalacha@redhat.com>
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 3ec191b77be..9da36ff9a29 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -2086,13 +2086,14 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to,
ret = syncop_getxattr (from, loc, &xattr, POSIX_ACL_ACCESS_XATTR,
NULL, NULL);
if (ret < 0) {
- gf_msg (this->name, GF_LOG_WARNING, -ret,
- DHT_MSG_MIGRATE_FILE_FAILED,
- "Migrate file failed:"
- "%s: failed to get xattr from %s",
- loc->path, from->name);
- *fop_errno = -ret;
- ret = -1;
+ if ((-ret != ENODATA) && (-ret != ENOATTR)) {
+ gf_msg (this->name, GF_LOG_WARNING, -ret,
+ DHT_MSG_MIGRATE_FILE_FAILED,
+ "Migrate file failed:"
+ "%s: failed to get xattr from %s",
+ loc->path, from->name);
+ *fop_errno = -ret;
+ }
} else {
ret = syncop_setxattr (to, loc, xattr, 0, NULL, NULL);
if (ret < 0) {