diff options
author | N Balachandran <nbalacha@redhat.com> | 2019-06-04 14:51:44 +0530 |
---|---|---|
committer | N Balachandran <nbalacha@redhat.com> | 2019-07-29 06:41:59 +0000 |
commit | 481c3c71c428c31ac84e2e1acf21b0ae07e4e32d (patch) | |
tree | 7b0dd374bf4df188cd3cf94ce6d1b4d08c1140c4 /xlators/cluster | |
parent | c3aab13faa451d368ef5044fea945cb2d5597434 (diff) |
cluster/dht: Fix directory perms during selfheal
Fixed a bug in the revalidate code path that wiped out
directory permissions if no mds subvol was found.
Backport of:
> Change-Id: I8b4239ffee7001493c59d4032a2d3062586ea115
> fixes: bz#1716830
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
Change-Id: I8b4239ffee7001493c59d4032a2d3062586ea115
fixes: bz#1716848
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index a052d826408..ad06d89cc30 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -1738,9 +1738,11 @@ unlock: if (dht_needs_selfheal(frame, this)) { if (!__is_root_gfid(local->loc.inode->gfid)) { - local->stbuf.ia_gid = local->mds_stbuf.ia_gid; - local->stbuf.ia_uid = local->mds_stbuf.ia_uid; - local->stbuf.ia_prot = local->mds_stbuf.ia_prot; + if (local->mds_subvol) { + local->stbuf.ia_gid = local->mds_stbuf.ia_gid; + local->stbuf.ia_uid = local->mds_stbuf.ia_uid; + local->stbuf.ia_prot = local->mds_stbuf.ia_prot; + } } else { local->stbuf.ia_gid = local->prebuf.ia_gid; local->stbuf.ia_uid = local->prebuf.ia_uid; |