summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-selfheal.c
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawa@redhat.com>2018-05-31 12:29:35 +0530
committerAmar Tumballi <amarts@redhat.com>2018-07-11 03:13:24 +0000
commite57cbae0bcc3d8649b869eda5ec20f3c6a6d34f0 (patch)
tree52059d8e2e38143717b88e6f2683cfacf142463a /xlators/cluster/dht/src/dht-selfheal.c
parente31c7a7c0c1ea3f6e931935226fb976a92779ba7 (diff)
dht: Inconsistent permission for directories after brick stop/start
Problem: Inconsistent access permissions on directories after bringing back the down sub-volumes, in case of directories dht_setattr first wind a call on MDS once call is finished on MDS then wind a call on NON-MDS.At the time of revalidating dht just compare the uid/gid with stbuf uid/gid and if anyone differs set a flag to heal the same. Solution: Add a condition to compare permission also in dht_revalidate_cbk to set a flag to call dht_dir_attr_heal. BUG: 1584517 Change-Id: I3e039607148005015b5d93364536158380d4c5aa fixes: bz#1584517 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-selfheal.c')
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 6425bdc506e..2aa75bcc4cd 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -2500,7 +2500,7 @@ dht_dir_attr_heal (void *data)
NULL, NULL, NULL, NULL);
} else {
ret = syncop_setattr (subvol, &local->loc, &local->mds_stbuf,
- (GF_SET_ATTR_UID | GF_SET_ATTR_GID),
+ (GF_SET_ATTR_UID | GF_SET_ATTR_GID | GF_SET_ATTR_MODE),
NULL, NULL, NULL, NULL);
}