Whamcloud - gitweb
LU-5423 llite: pack suppgid to MDS correctly 76/12476/17
authorFan Yong <fan.yong@intel.com>
Sat, 27 Sep 2014 15:38:20 +0000 (23:38 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 18 Jan 2015 19:36:10 +0000 (19:36 +0000)
commit2bc5bcb7efa247fcd8cc65d013ffc9f6c33dd788
tree71583cd168eb0974d4d514fb84b72b739ee9d45f
parent527ffb003f20db73c463951416b408bff6e8e4cf
LU-5423 llite: pack suppgid to MDS correctly

The ll_lookup_it() may trigger IT_OPEN RPC to open a file by name.
But at that time, the client does not know the target file's GID,
so it cannot pack the necessary supplementary group ID in the RPC.
Because of missing the supplementary group ID, the RPC maybe fail
for open permission check on the MDS. Under such case, MDS should
return the target file's GID, if the current thread on the client
in the right group (according to the file's GID), the client will
try the IT_OPEN RPC again with the right supplementary group ID.

This patch is also helpful if some other(s) changed the file's GID
after current RPC sent to the MDS with the suppgid as the original
GID by race.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Icaf1ae72b64a27c64c42830d231bae4bca4acb66
Reviewed-on: http://review.whamcloud.com/12476
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre/lustre_idl.h
lustre/llite/namei.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_open.c
lustre/tests/sanity-sec.sh