diff options
author | Anand Avati <avati@dev.gluster.com> | 2009-08-04 18:15:23 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-08-04 17:07:15 -0700 |
commit | e981886cb1da8cbde1f93a9ab249130e8be163f5 (patch) | |
tree | 5633286ec347aeb8408afe69a5e075903bd49a6b /xlators/cluster/dht | |
parent | aaf483185e6fdd1b0102ee2ae27e53826efdfc21 (diff) |
dht_stat_merge - use the highest uid when ambiguous
When directories on different subvolumes have different ownerships, use the highest uid/gid till self-heal resolves the inconsistency
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 191 (random Permission denied errors)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=191
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 10fc1ccda..0ef88a59b 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -311,13 +311,14 @@ dht_stat_merge (xlator_t *this, struct stat *to, to->st_mode = from->st_mode; to->st_nlink = from->st_nlink; - to->st_uid = from->st_uid; - to->st_gid = from->st_gid; to->st_rdev = from->st_rdev; to->st_size += from->st_size; to->st_blksize = from->st_blksize; to->st_blocks += from->st_blocks; + set_if_greater (to->st_uid, from->st_uid); + set_if_greater (to->st_gid, from->st_gid); + set_if_greater (to->st_atime, from->st_atime); set_if_greater (to->st_mtime, from->st_mtime); set_if_greater (to->st_ctime, from->st_ctime); |