From a3252b9d8c4cc024b5528ca88076c7e33aecad38 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Wed, 5 Nov 2014 12:36:32 +0530 Subject: feature/gfid-access: Always send setattr down in overloaded setxattr. Problem: File ownership is not being preserved for root in geo-rep mountbroker setup. Analysis and Cause: Entry creations for geo-rep is overloaded in ga_setxattr. It happens in two phase, entry creation followed by setattr to preserve ownership as in master. If uid and gid of file being synced is root, setattr was not being sent down. Since, the file creation happens with non-root user in mountborker geo-rep setup, if setattr is not done explicitly, file ownership is not preserved for root. Solution: Always pass setattr down in overloaded ga_setxattr. Change-Id: I062215c1b2379d515f28ec7f271077ad37182c7e BUG: 1104954 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/9051 Reviewed-by: Aravinda VK Tested-by: Gluster Build System Reviewed-by: Venky Shankar Tested-by: Venky Shankar --- xlators/features/gfid-access/src/gfid-access.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'xlators/features/gfid-access/src/gfid-access.c') diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c index 399780d616d..982de6358e7 100644 --- a/xlators/features/gfid-access/src/gfid-access.c +++ b/xlators/features/gfid-access/src/gfid-access.c @@ -441,9 +441,6 @@ ga_newentry_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret == -1) goto done; - if (!local->uid && !local->gid) - goto done; - temp_stat.ia_uid = local->uid; temp_stat.ia_gid = local->gid; -- cgit