LU-16594 build: get_random_u32_below, get_acl with dentry
Linux commit v6.1-13825-g3c202d14a9d7
prandom: remove prandom_u32_max()
Use get_random_u32_below() and provide a replacement
when get_random_u32_below is not available.
Linux commit v6.1-rc1-2-g138060ba92b3
fs: pass dentry to set acl method
Linux commit v6.1-rc1-4-g7420332a6ff4
fs: add new get acl method
get_acl() and set_acl() have new signatures
Lustre-change: https://review.whamcloud.com/50193
Lustre-commit:
3ef773db80fc346455c9939ad108f3f56990ee9c
Was-Change-Id: I1de02f86fd2719fc75de4f014f51d73736d83c33
LU-18127 autoconf: fix configure tests -Warray-bounds errors
Kernel commit v5.17-rc3-1-ge6148767825c (Makefile:
Enable -Warray-bounds) enabled -Warray-bounds option,
which caused Lustre configure tests hit false failures
as follows:
build/conftest.c: In function 'main':
build/conftest.c:228:39: error: array subscript 0 is
outside array bounds of 'struct inode_operations[0]'
[-Werror=array-bounds]
228 | ((struct inode_operations *)1)->get_acl((struct inode *)NULL, 0, false);
| ^~
cc1: all warnings being treated as errors
This patch fixes the "struct inode_operations" related
configure tests to avoid the above failures.
The -Warray-bounds option was disabled by the following
kernel commits:
- v5.19-rc1-28-gf0be87c42cbd (gcc-12: disable '-Warray-bounds' universally for now)
- v6.2-rc3-9-g5a41237ad1d4 (gcc: disable -Warray-bounds for gcc-11 too)
- v6.3-rc7-202-g0da6e5fd6c37 (gcc: disable '-Warray-bounds' for gcc-13 too)
Lustre-change: https://review.whamcloud.com/55989
Lustre-commit:
a78894ee642d423a244fc0dcbc518c57a458a2db
Was-Change-Id: Iee73962ffc117a2f98e8f339462820aff2278815
Signed-off-by: Jian Yu <yujian@whamcloud.com>
LU-18388 llite: handle -EOPNOTSUPP in get_inode_acl
When ll_xattr_list returns -EOPNOTSUPP [-95] NULL should be
returned to avoid sanity failing to run as non-root users with:
operation mds_getxattr to node 192.168.122.50@tcp failed: rc = -95
Fixes:
13fd5ebef3 ("LU-18101 sec: fix ACL handling on recent kernels again")
Lustre-change: https://review.whamcloud.com/56756
Lustre-commit:
7e457159a097d69e76097c55c75546163a44befa
Was-Change-Id: I208e7e6095c19728643a6d208becd448ed2e2539
LU-18070 sec: clear ACL caches if ACL empty
When the lli_posix_acl field of struct ll_inode_info is updated,
check if new ACL is empty, and clear ACL caches for this inode
in this case.
Also fix sanity test_103a when it is run with multiple MDTs. The
test has several requirements regarding uids and gids, but in case
they are not met, missing ids are only configured on mds1. So make
sure the directory used for the test ($DIR/$tdir) is created on mds1.
Fixes:
13fd5ebef3 ("LU-18101 sec: fix ACL handling on recent kernels again")
Fixes:
aa636f8ae6 ("LU-18095 sec: fix ACL handling on recent kernels")
Lustre-change: https://review.whamcloud.com/56600
Lustre-commit:
659bb1d704317346ebfde1899c8ee8b38c9c3f80
Was-Change-Id: I91109bf98bc65dfb1fcefb2551be84d9c73f8ee2
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
LU-18101 sec: fix ACL handling on recent kernels again
On recent distributions like Ubuntu 24.04, the kernel offers the
.get_inode_acl op on struct inode_operations. This must be defined
and fetch ACLs, otherwise they can end up being incorrect on inodes.
Lustre-change: https://review.whamcloud.com/56552
Lustre-commit:
13fd5ebef3a7a1ae3574458674e16ca782b181e7
Was-Change-Id: Idcc642a11f6f6198217e5eadb2a2c32e8117b8b7
Fixes:
aa636f8ae6 ("LU-18095 sec: fix ACL handling on recent kernels")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
LU-18095 sec: fix ACL handling on recent kernels
On recent distributions like Ubuntu 24.04, the kernel imposes that
ACLs are fetched via the dedicated .get_acl operation (or
.get_inode_acl) instead of doing this via the xattr handlers.
So in ll_get_acl() explicitly fetch the xattr containing ACLs,
XATTR_NAME_ACL_ACCESS or XATTR_NAME_ACL_DEFAULT. This is going to
populate to xattr cache, hence avoiding multiple requests to the MDS.
Also fix sanity-sec test_23b to make sure variable comparisons are
correct. And fix test cleanup to avoid leftovers.
Lustre-change: https://review.whamcloud.com/56254
Lustre-commit:
aa636f8ae6883cef018b859bba70140df9a826c4
Was-Change-Id: I467d5a558eaa524e823527a8798478934f65abf9
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
LU-18329 tests: check version for parallel-scale-nfs/test_1
Check the lustre client version of nfs server (MDS1 by default) in
parallel-scale-nfs/test_1 for interop test.
Lustre-change: https://review.whamcloud.com/56674
Lustre-commit:
ebfdfd587bc5804acf48d444b182fa9b7ef4d3c9
Was-Change-Id: I76ecb3bc28f37ba7d0c24d18eead621d6b066800
Test-Parameters: testlist=parallel-scale-nfsv3 env=ONLY=1
Test-Parameters: serverversion=2.15.5 testlist=parallel-scale-nfsv3 env=ONLY=1
Fixes:
69dcd1b940 ("LU-18030 tests: Add a test to ensure permissions copy on nfs")
Signed-off-by: Feng Lei <flei@whamcloud.com>
LU-18030 tests: Add a test to ensure permissions copy on nfs
Also ensure no empty POSIX ACL is created.
Lustre-change: https://review.whamcloud.com/56176
Lustre-commit:
69dcd1b940ce43af17489b0268d16c5186cf0325
Was-Change-Id: I85d37f8eebd17d6acdb67c552fec2caa79dbd39c
Test-Parameters: testlist=parallel-scale-nfsv3
LU-18030 llite: make ll_set_acl send xattr to server unmodified
Otherwise posix_acl_update_mode might convert acl into inode mode
change and as the result it's lost and the existing ACL xattr
is removed (if any
Lustre-change: https://review.whamcloud.com/55715
Lustre-commit:
75f55f99a328923ec9fb5bb4ca3418aa11bbe336
Was-Change-Id: I3956beac04889a657f76f9b36dbe97518ae9f2ac
LU-14707 tests: Bashify more scripts for Ubuntu et. al.
Some scripts that are not POSIX sh are being
invoked using sh. The scripts should be called
using the shell listed in the shebang.
Lustre-change: https://review.whamcloud.com/49296
Lustre-commit:
2faee9972cdcde6652db1a857b548b3f7396944b
Was-Change-Id: I7233ce56df95a5b8698b39872e6118a4fa1a029a
Signed-off-by: Timothy Day <timday@amazon.com>
HPE-bug-id: LUS-11556
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I1de02f86fd2719fc75de4f014f51d73736d83c33
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59109
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>