summaryrefslogtreecommitdiffstats
path: root/xlators/features/gfid-access/src
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2014-11-05 12:36:32 +0530
committerVenky Shankar <vshankar@redhat.com>2014-11-07 01:02:13 -0800
commita3252b9d8c4cc024b5528ca88076c7e33aecad38 (patch)
treeab7d556fa0c65e7574295e69842e9d8a8b30835d /xlators/features/gfid-access/src
parent7e497871d11a3a527e2ce192e4274322631f27d0 (diff)
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 <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/9051 Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/features/gfid-access/src')
-rw-r--r--xlators/features/gfid-access/src/gfid-access.c3
1 files changed, 0 insertions, 3 deletions
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;