summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-linkfile.c4
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c
index ae5bd49d988..dbc9d0b3c7b 100644
--- a/xlators/cluster/dht/src/dht-linkfile.c
+++ b/xlators/cluster/dht/src/dht-linkfile.c
@@ -297,9 +297,7 @@ dht_linkfile_attr_heal (call_frame_t *frame, xlator_t *this)
GF_VALIDATE_OR_GOTO ("dht", local, out);
GF_VALIDATE_OR_GOTO ("dht", local->link_subvol, out);
- if ((local->stbuf.ia_type == IA_INVAL) ||
- (is_equal (frame->root->uid, local->stbuf.ia_uid) &&
- is_equal (frame->root->gid, local->stbuf.ia_gid)))
+ if (local->stbuf.ia_type == IA_INVAL)
return 0;
uuid_copy (local->loc.gfid, local->stbuf.ia_gfid);
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index dab6de60936..5300ff2fe7a 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -620,6 +620,15 @@ migrate_special_files (xlator_t *this, xlator_t *from, xlator_t *to, loc_t *loc,
}
done:
+ ret = syncop_setattr (to, loc, buf,
+ (GF_SET_ATTR_UID | GF_SET_ATTR_GID |
+ GF_SET_ATTR_MODE), NULL, NULL);
+ if (ret) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "%s: failed to perform setattr on %s (%s)",
+ loc->path, to->name, strerror (errno));
+ }
+
ret = syncop_unlink (from, loc);
if (ret)
gf_log (this->name, GF_LOG_WARNING, "%s: unlink failed (%s)",