Whamcloud - gitweb
LU-15969 pcc: use new ->fileattr_set for PCC project
authorQian Yingjin <qian@ddn.com>
Tue, 28 Jun 2022 09:39:21 +0000 (05:39 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 7 Jul 2022 18:13:08 +0000 (18:13 +0000)
commit8c02a547b07bd8d5d705b5bd73bb30bd1e198d09
treeb5e2f7f70488f02fdce15d99bc162798474f7c6b
parent95d256846f9b97244297cf71d7f200cba79301ff
LU-15969 pcc: use new ->fileattr_set for PCC project

The new Ubuntu 2204 (since kernel 5.12) introduces a new inode VFS
interface ->fileattr_set() and ->fileattr_get() to set/get project
ID on a file.

In PCC, we set the project ID for PCC copies on PCC backend file
system via IOCTL FS_IOC_FSSETXATTR.
However, the new kernel removed this IOCTL code, this results in
that using this ioctl to set project ID for the PCC copy returns
-ENOTTY and sanity-pcc test_39 failed.

In this patch, we add compatibility check for this new VFS
interface about project ID, and use the new VFS interface to set
the project ID on the new kernel properly.

Test-Parameters: clientdistro=ubuntu2204 env=SANITY_PCC_EXCEPT="101a" testlist=sanity-pcc
Change-Id: I756f3d6fa97c60c416deca9e482270483ab06524
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/47811
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/autoconf/lustre-core.m4
lustre/llite/pcc.c
lustre/tests/sanity-pcc.sh