Whamcloud - gitweb
LU-10499 pcc: tunable GID to pin/unpin files 63/54463/5
authorQian Yingjin <qian@ddn.com>
Thu, 21 Apr 2022 02:13:13 +0000 (22:13 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 22 Jan 2025 18:41:22 +0000 (18:41 +0000)
commit84100d7f7d38cd7d7c612c190359d27a0554e011
tree8d2c4f457a6001be0f7e011370b8a13030225a54
parentabc39d438bff3d16618b22b5c4da312c2fc29892
LU-10499 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_204b to verify it.

EX-bug-id: EX-5047
Change-Id: I1be92f365cfe8dea278559b2c34fcee8e42d1c4d
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54463
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Feng Lei <flei@ddn.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