From e981886cb1da8cbde1f93a9ab249130e8be163f5 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Tue, 4 Aug 2009 18:15:23 +0000 Subject: 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 BUG: 191 (random Permission denied errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=191 --- xlators/cluster/dht/src/dht-helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 10fc1ccd..0ef88a59 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); -- cgit