diff options
author | shishir gowda <sgowda@redhat.com> | 2013-07-30 17:22:58 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-07-31 03:42:42 -0700 |
commit | ac2cd684c2d8fa4a66800a6cc98f6c5c562b4b7f (patch) | |
tree | 90cc0b805b7d90a8ca84ce78213895c16f0a55e3 /xlators/cluster/dht/src/dht-rebalance.c | |
parent | fd9a9ad14ba0abba907cbf52c51ee17738014232 (diff) |
cluster/dht: Fix non-regular file ownership during rebalance
Currently non-regular files were created as root:root, and
their ownership never healed during rebalance process.
Also, in dht_linkfile_attr_heal, we have to heal the linkfiles
as default, as currently linkfiles are created as root:root.
That check existed, as earlier linkfiles were created as
frame->root->uid/gid
Change-Id: I6cd88361b81bdd500e15bc47b623f5db8eec88e9
BUG: 990154
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/5434
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-rebalance.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 9 |
1 files changed, 9 insertions, 0 deletions
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)", |