Whamcloud - gitweb
EX-5047 pcc: tunable GID to pin/unpin files
authorQian Yingjin <qian@ddn.com>
Thu, 21 Apr 2022 02:13:13 +0000 (22:13 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 25 Apr 2022 23:42:02 +0000 (23:42 +0000)
commit957eb359973f03e8c8a59660b4e04f093ed53867
tree27ec3e2bdfba77910132e65f33aa284a086fbca4
parent53b6437250b4959c0229f9d6325c1a7cf78c4576
EX-5047 pcc: tunable GID to pin/unpin files

In this patch, we adds a tunable "mdt.*.enable_pin_gid" that
controls the GID to pin/unpin files.
Default should be gid=0, so it is limited to root, gid=-1 so any
user can pin/unpin, or gid=<gid> to allow a specific GID (e.g.
wheel).
We add a virtual "lustre.pin" xattr to set/get the xattr for
non-root users, if mdt.*.enable_pin_gid is set correctly.
Add test case sanity-pcc test_104b to verify it.

Change-Id: I1be92f365cfe8dea278559b2c34fcee8e42d1c4d
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/47103
Reviewed-by: Feng, Lei <flei@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/xattr.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lproc.c
lustre/mdt/mdt_xattr.c
lustre/tests/sanity-pcc.sh
lustre/utils/liblustreapi_pcc.c