d1681e
From 2a26ea5a3ee33ba5e6baedca8b18e29277ff385a Mon Sep 17 00:00:00 2001
d1681e
From: Sunny Kumar <sunkumar@redhat.com>
d1681e
Date: Tue, 3 Jul 2018 13:58:23 +0530
d1681e
Subject: [PATCH 324/325] dht: delete tier related internal xattr in
d1681e
 dht_getxattr_cbk
d1681e
d1681e
Problem :  Hot and Cold tier brick changelogs report rsync failure
d1681e
d1681e
Solution : georep session is failing to sync directory
d1681e
           from master volume to slave volume due to lot
d1681e
           of changelog retries, solution would be to ignore tier
d1681e
           related internal xattrs trusted.tier.fix.layout.complete and
d1681e
           trusted.tier.tier-dht.commithash in dht_getxattr_cbk.
d1681e
d1681e
Upstream Patch : https://review.gluster.org/#/c/20450/ and
d1681e
                 https://review.gluster.org/#/c/20520/
d1681e
>fixes: bz#1597563
d1681e
>Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
d1681e
d1681e
Change-Id: I3530ffe7c4157584b439486f33ecd82ed8d66aee
d1681e
BUG: 1581047
d1681e
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
d1681e
Reviewed-on: https://code.engineering.redhat.com/gerrit/144024
d1681e
Tested-by: RHGS Build Bot <nigelb@redhat.com>
d1681e
Reviewed-by: Nithya Balachandran <nbalacha@redhat.com>
d1681e
---
d1681e
 xlators/cluster/dht/src/dht-common.c | 14 ++++++++++++++
d1681e
 1 file changed, 14 insertions(+)
d1681e
d1681e
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
d1681e
index 23049b6..2207708 100644
d1681e
--- a/xlators/cluster/dht/src/dht-common.c
d1681e
+++ b/xlators/cluster/dht/src/dht-common.c
d1681e
@@ -4606,6 +4606,20 @@ dht_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
d1681e
                         dict_del (xattr, conf->mds_xattr_key);
d1681e
                 }
d1681e
 
d1681e
+                /* filter out following two xattrs that need not
d1681e
+                 * be visible on the mount point for geo-rep -
d1681e
+                 * trusted.tier.fix.layout.complete and
d1681e
+                 * trusted.tier.tier-dht.commithash
d1681e
+                 */
d1681e
+
d1681e
+                if (dict_get (xattr, conf->commithash_xattr_name)) {
d1681e
+                        dict_del (xattr, conf->commithash_xattr_name);
d1681e
+                }
d1681e
+
d1681e
+                if (frame->root->pid >= 0 && dht_is_tier_xlator (this)) {
d1681e
+                        dict_del(xattr, GF_XATTR_TIER_LAYOUT_FIXED_KEY);
d1681e
+                }
d1681e
+
d1681e
                 if (frame->root->pid >= 0) {
d1681e
                         GF_REMOVE_INTERNAL_XATTR
d1681e
                                 ("trusted.glusterfs.quota*", xattr);
d1681e
-- 
d1681e
1.8.3.1
d1681e