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>
This commit is contained in:
Kotresh HR 2014-11-05 12:36:32 +05:30 committed by Venky Shankar
parent 7e497871d1
commit a3252b9d8c

View File

@ -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;