Whamcloud - gitweb
fs/lustre-release.git
11 months agoLU-16717 mdt: treat unknown hash type as sane type 96/50796/5
Lai Siyao [Sun, 23 Apr 2023 08:09:02 +0000 (04:09 -0400)]
LU-16717 mdt: treat unknown hash type as sane type

Directory migration failure may leave directory hash type as
LMV_HASH_TYPE_UNKNOWN|LMV_HASH_FLAG_BAD_TYPE, which should be treated
as sane hash type on existing directories, otherwise such directories
can't be unlinked.

Add sanity 230y.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ieffc0808d1db989d0bf9723f05cddb06f349e208
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50796
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16634 misc: replace obsolete ioctl numbers 90/50390/10
Andreas Dilger [Thu, 23 Mar 2023 08:01:53 +0000 (02:01 -0600)]
LU-16634 misc: replace obsolete ioctl numbers

Renumber the OBD_IOC_BARRIER and IOC_OSC_SET_ACTIVE ioctl numbers
to use IOC type 'f' instead of 'g' and 'h', respectively.  Add
compatibility code to handle their deprecation in the future.

Move already-deprecated ioctls OBD_IOC_GETNAME_OLD, OBD_GET_VERSION,
IOC_LIBCFS_GET_NI, and IOC_LIBCFS_PING to lustre_ioctl_old.h also.
Remove other already obsolete ioctl number definitions.

Add new llapi_ioctl() and llapi_ioctl_dev() helper functions to
handle fallback of ioctl commands to older versions when needed.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I519f23d34ce6197f3430a3825c5190cedb00cf14
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50390
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16756 kernel: RHEL 9.2 server support 52/50852/11
Jian Yu [Mon, 22 May 2023 17:40:21 +0000 (10:40 -0700)]
LU-16756 kernel: RHEL 9.2 server support

This patch makes changes to support RHEL 9.2 release
with kernel 5.14.0-284.11.1.el9_2 for Lustre server.

Test-Parameters: trivial env=SANITY_EXCEPT=27J fstype=ldiskfs \
clientdistro=el9.2 serverdistro=el9.2 testlist=sanity

Test-Parameters: trivial env=SANITY_EXCEPT=27J fstype=zfs \
clientdistro=el9.2 serverdistro=el9.2 testlist=sanity

Change-Id: I8fbffa2d9e48dabe62b6affadd11e7b03ae1aee7
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50852
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16755 kernel: update RHEL 8.8 [4.18.0-477.10.1.el8_8] 51/51051/4
Jian Yu [Mon, 22 May 2023 16:11:45 +0000 (09:11 -0700)]
LU-16755 kernel: update RHEL 8.8 [4.18.0-477.10.1.el8_8]

Update RHEL 8.8 kernel to 4.18.0-477.10.1.el8_8.

Test-Parameters: trivial fstype=ldiskfs \
clientdistro=el8.8 serverdistro=el8.8 testlist=sanity

Test-Parameters: trivial fstype=zfs \
clientdistro=el8.8 serverdistro=el8.8 testlist=sanity

Change-Id: I6d7703512f9c5a8b686f06e94f32f0e51c9b2001
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51051
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Peter Jones <pjones@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-12353 ldiskfs: add ext4-dquot-commit-speedup patch to more series 53/50853/5
Jian Yu [Fri, 12 May 2023 18:19:58 +0000 (11:19 -0700)]
LU-12353 ldiskfs: add ext4-dquot-commit-speedup patch to more series

Add ext4-dquot-commit-speedup.patch to RHEL 8.x and RHEL 9.x
ldiskfs patch series.

Test-Parameters: trivial clientdistro=el8.7 serverdistro=el8.7 testlist=sanity
Test-Parameters: trivial clientdistro=el8.8 serverdistro=el8.8 testlist=sanity
Test-Parameters: trivial clientdistro=el9.1 serverdistro=el9.1 testlist=sanity

Change-Id: Ib0ac325bde442b4eafedde9ba44984b02d5ea061
Fixes: dad25f258e50 ("LU-12353 ldiskfs: speedup quota journalling")
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50853
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
11 months agoRevert "LU-15969 llite: add support for ->fileattr_get/set" 93/51093/3
Oleg Drokin [Tue, 23 May 2023 05:10:23 +0000 (05:10 +0000)]
Revert "LU-15969 llite: add support for  ->fileattr_get/set"

This causes Lu-15969

This reverts commit 1addb410788f0415a85bef72afff8533ac9da012.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I074452fc6267a9f06931232f6b24372dd4211fa4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51093
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16835 target: server_ioctl() should return ENOTTY 72/51072/3
Li Dongyang [Sat, 20 May 2023 07:41:56 +0000 (17:41 +1000)]
LU-16835 target: server_ioctl() should return ENOTTY

server_ioctl() returns EOPNOTSUPP when ioctl cmd
is not supported. This will confuse e2fsprogs >= 1.47
as it's trying to get/set fs label using
FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL ioctl.

If the cmd is not supported we really should return
ENOTTY which means "Inappropriate ioctl for device".

Change-Id: Ibca0e6ad9a5c19cc7bd55ebd96cf32af05cf0fb6
Test-Parameters: trivial
Fixes: d5be104cc9 ("LU-11355 lustre: enable fstrim on lustre device")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51072
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
11 months agoLU-16790 man: fix lctl-nodemap-modify man page 18/50918/3
Sebastien Buisson [Wed, 10 May 2023 16:20:07 +0000 (18:20 +0200)]
LU-16790 man: fix lctl-nodemap-modify man page

The section about the rbac property is malformed, regarding line feeds
in particular.
The forbid_encryption property is not mentioned.
Default values for admin, trusted, deny_unknown, audit_mode and
readonly_mount properties are not expressed correctly. These
properties grok 0 or 1.

Fixes: 22bef9b6c6 ("LU-16524 sec: add fscrypt_admin rbac role")
Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I712e4d21b3038d87c50bb12206cbcc92ef4b615f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50918
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
11 months agoLU-7495 utils: add --links option for lfs find 86/50886/4
Thomas Bertschinger [Sun, 7 May 2023 17:34:42 +0000 (13:34 -0400)]
LU-7495 utils: add --links option for lfs find

This adds a "--links" option for lfs find to filter files and
directories by the number of hard links. It also adds a printf format
'%n' to print the number of links for a file.

This commit also fixes '-l' as a short option for '--lazy' which was
added in 11aa7f8704c490b011f60f234c3ac9929ce76948 but the short option
did not work.

Signed-off-by: Thomas Bertschinger <bertschinger@lanl.gov>
Change-Id: I5d15bc290df8e8a08402f8d5cfa0a7139791b0a4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50886
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Anjus George <georgea@ornl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16803 build: Map uuid_le to guid_t for in-kernel APIs 85/50885/3
Shaun Tancheff [Mon, 8 May 2023 12:37:46 +0000 (07:37 -0500)]
LU-16803 build: Map uuid_le to guid_t for in-kernel APIs

Linux commit v6.2-rc5-72-g5e6a51787fef
 uuid: Decouple guid_t and uuid_le types and respective macros

Removed uapi guid_t however sf_uuid is used in kernel which
must be a guid_t while uapi only has uuid_le.

Test-Parameters: trivial
Fixes: 20621c761b ("LU-16655 scrub: change sf_uuid to guid_t")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I38e062b0e5ce9b8c32f60e41b7c95781717e1f97
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50885
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 months agoLU-16796 libcfs: Remove unsed LASSERT_ATOMIC_* macros 70/50870/4
Arshad Hussain [Fri, 5 May 2023 16:48:53 +0000 (22:18 +0530)]
LU-16796 libcfs: Remove unsed LASSERT_ATOMIC_* macros

This is the first up series of patchs which
replaces atomic_t with refcount_t

This patch removes unused LASSERT_ATOMIC_* macros.
There are still:
LASSERT_ATOMIC_GT
LASSERT_ATOMIC_GT_LT
LASSERT_ATOMIC_ZERO
LASSERT_ATOMIC_POS
macros being used which will be subsequently removed
in following patches. This helps in breaking up patch
logically as changes are large.

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I5c41f978d10b193365ffba6ebeca9aab2cead99c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50870
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
11 months agoLU-16797 lnet: improve numeric NID to CPT hashing 62/50862/2
Chris Horn [Mon, 1 May 2023 19:25:47 +0000 (13:25 -0600)]
LU-16797 lnet: improve numeric NID to CPT hashing

Testing shows that the sum-by-multiplication of nid bytes method for
hashing a NID to a CPT does not have good distribution for gnilnd
and kfilnd NIDs. For these LNDs, use the old hash_long() method.

Also modify lustre_lnet_calc_cpt_of_nid() to ensure the specified
number of CPTs is greater than 0. This avoids a divide by zero.

Test-Parameters: trivial
HPE-bug-id: LUS-11576
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I77c6a5c3bc6b773e97f0a3c87182c31674d284e0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50862
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16795 build: Update ZFS version to 2.1.11 56/50856/2
Jian Yu [Wed, 3 May 2023 16:15:12 +0000 (09:15 -0700)]
LU-16795 build: Update ZFS version to 2.1.11

Update ZFS version to 2.1.11. The changes are listed in:
https://github.com/openzfs/zfs/releases/tag/zfs-2.1.11

Change-Id: I51de752fd82174586bcda7a9a42152b9fb2111bd
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50856
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-12610 obd: remove OBD_ -> CFS_ macros 08/50808/2
Timothy Day [Wed, 19 Apr 2023 01:46:34 +0000 (01:46 +0000)]
LU-12610 obd: remove OBD_ -> CFS_ macros

Remove OBD macros that are simply redefinitions
of CFS macros.

Signed-off-by: Timothy Day <timday@amazon.com>
Signed-off-by: Ben Evans <beevans@whamcloud.com>
Change-Id: Id9e312a6074c5e11370f018afd3201d73b53e7e0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50808
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-12610 tests: remove OBD_ -> CFS_ macros 07/50807/2
Timothy Day [Wed, 19 Apr 2023 01:38:46 +0000 (01:38 +0000)]
LU-12610 tests: remove OBD_ -> CFS_ macros

Remove OBD macros that are simply redefinitions
of CFS macros.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Signed-off-by: Ben Evans <beevans@whamcloud.com>
Change-Id: Ieab1ffb7d83446f24fbf5921459ca7b6aaa7b0e0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50807
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-12610 llite: remove OBD_ -> CFS_ macros 04/50804/2
Timothy Day [Wed, 19 Apr 2023 01:53:53 +0000 (01:53 +0000)]
LU-12610 llite: remove OBD_ -> CFS_ macros

Remove OBD macros that are simply redefinitions
of CFS macros.

Signed-off-by: Timothy Day <timday@amazon.com>
Signed-off-by: Ben Evans <beevans@whamcloud.com>
Change-Id: I7bbcc3e1fda6418c258eb4d1c52b929a7cf72ed1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50804
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16529 test: verify the grant > 0 before test 99/50799/2
Hongchao Zhang [Tue, 18 Apr 2023 18:58:26 +0000 (02:58 +0800)]
LU-16529 test: verify the grant > 0 before test

In the test 84 in sanity-quota, the grant should be larger than 0
after the dd complete, this patch adds check for it and forces the
quota to be re-integrated during the check.

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: I9cddcf0c4afc12a11f3535792262ebb35a1e480e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50799
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16782 kernel: update RHEL 9.1 [5.14.0-162.23.1.el9_1] 85/50785/3
Jian Yu [Wed, 10 May 2023 08:15:10 +0000 (01:15 -0700)]
LU-16782 kernel: update RHEL 9.1 [5.14.0-162.23.1.el9_1]

Update RHEL 9.1 kernel to 5.14.0-162.23.1.el9_1.

Test-Parameters: trivial fstype=ldiskfs \
clientdistro=el9.1 serverdistro=el9.1 testlist=sanity

Change-Id: I961bac2129b98da2950694fa03e0bf47b780d85c
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50785
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16775 tests: cleanup target after sanity-sec test_31 66/50766/3
Sebastien Buisson [Wed, 26 Apr 2023 07:57:03 +0000 (09:57 +0200)]
LU-16775 tests: cleanup target after sanity-sec test_31

sanity-sec test_31 adds an LNet network tcp999, and associated
servicenode param on MDS target. This param must be cleared when
exiting the test, otherwise it can lead to incorrect client HA
behavior, trying to reach out to the fake service nodes.

Test-Parameters: trivial
Test-Parameters: mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 \
    clientselinux testlist=sanity-sec env=SHARED_KEY=true,ONLY="31 61"
Fixes: c508c94268 ("LU-16557 client: -o network needs add_conn processing")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: If3a1926855bd23e9154c9a32b7a555e934e94565
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50766
Reviewed-by: Sarah Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
11 months agoLU-16232 scripts: clean specific MDTs update llogs 58/50558/13
Mikhail Pershin [Thu, 6 Apr 2023 08:15:50 +0000 (11:15 +0300)]
LU-16232 scripts: clean specific MDTs update llogs

Modify remove_updatelog script as following:
- avoid bash-specific process substitution for compatibility
- add '-m <index,...> option to select only specific MDTs to
  process through their update llogs only
- add test to check script actions

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Icd935d5f4964d364f38b4962355ef8a5e679dbb3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50558
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
11 months agoLU-16712 cksum: fix generating T10PI guard tags for partial brw page 40/50540/3
Li Dongyang [Wed, 5 Apr 2023 02:54:13 +0000 (12:54 +1000)]
LU-16712 cksum: fix generating T10PI guard tags for partial brw page

To get better performance, we allocate a page as the buffer for
T10PI guard tags, we fill the buffer going over every page for brw,
when the buffer is considered full, we use
cfs_crypto_hash_update_page() to update the hash and reuse the buffer.

It doesn't work when there's a page in the brw gets clipped, and the
checksum sector size is 512. For a page with PAGE_SIZE of 4096,
and offset at 1024, we will end up with 6 guard tags, and won't have
enough space in the very end of the buffer for a full brw page, which
needs 8.

Work out the number of guard tags for each page, update the
checksum hash and reuse the buffer when needed.

Change-Id: Ic591e63b24534f2a42b670669520895cb35a9546
Fixes: b1e7be00cb ("LU-10472 osc: add T10PI support for RPC checksum")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50540
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-13748 mdt: remove LASSERT in mdt_dump_lmm() 32/50532/10
Andreas Dilger [Tue, 4 Apr 2023 01:42:31 +0000 (19:42 -0600)]
LU-13748 mdt: remove LASSERT in mdt_dump_lmm()

Change LASSERT() in mdt_dump_lmm() into a CERROR(), since this
function is normally used for debugging and it doesn't help to
crash the MDS just when it complaining about some file layout.

Add sanity test_27Cg that triggered this initially.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I27f0b4489de48d6f197e0143589d76428d85e549
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50532
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16707 scripts: update license-status 15/50515/5
Timothy Day [Tue, 4 Apr 2023 02:42:05 +0000 (02:42 +0000)]
LU-16707 scripts: update license-status

Improve license-status script to parse SPDX text and
to only look at files tracked by git. This will make
it easier to track which files still need SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I4ece6c7af6133d3e6fa0771dbf49bc511c5f853c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50515
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16466 kfilnd: Allow custom traffic class per-NI 90/50490/4
Chris Horn [Thu, 3 Nov 2022 15:37:05 +0000 (09:37 -0600)]
LU-16466 kfilnd: Allow custom traffic class per-NI

Allow a traffic class to be specified per-NI. Per-NI values can be
specified via yaml configuration or the lnetctl CLI. A new kfilnd
module parameter, traffic_class, defines the default traffic class
when a per-NI value is not otherwise specified.

Here are the valid values and their associated mapping to kfabric:
 - best_effort -> KFI_TC_BEST_EFFORT
 - low_latency -> KFI_TC_LOW_LATENCY
 - dedicated_access -> KFI_TC_DEDICATED_ACCESS
 - bulk_data -> KFI_TC_BULK_DATA
 - scavenger -> KFI_TC_SCAVENGER
 - network_ctrl -> KFI_TC_NETWORK_CTRL

The default value of the traffic_class kfilnd parameter is
"best_effort".

Here's an example yaml configuration:
net:
    - net type: kfi1
      local NI(s):
        - interfaces:
              0: cxi0
          tunables:
          lnd tunables:
              traffic_class: bulk_data
    - net type: kfi2
      local NI(s):
        - interfaces:
              0: cxi1
          tunables:
          lnd tunables:
              traffic_class: low_latency

Here's an example of setting per-NI values using the lnetctl CLI:

$ lnetctl net add --net kfi1 --if cxi0 --traffic-class bulk_data
$ lnetctl net add --net kfi2 --if cxi0 --traffic-class low_latency

Both the string and numeric representation of the traffic class is
shown in the output of lnetctl net show. e.g.

$ lnetctl net show -v | egrep -e kfi -e traffic
    - net type: kfi1
        - nid: 0@kfi1
              traffic_class: bulk_data
              traffic_class_num: 515
    - net type: kfi2
        - nid: 0@kfi2
              traffic_class: low_latency
              traffic_class_num: 513
$

This is simply a debug tool to ensure the feature is working
correctly. "traffic_class_num" is ignored if it is specified as
part of a yaml configuration, and it is ommitted from lnetctl export
output when the --backup option is specified.

HPE-bug-id: LUS-10197
Test-Parameters: trivial
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I014a323e675d608ee5b506d8676fcc2cc78e8c4a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50490
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ian Ziemba <ian.ziemba@hpe.com>
Reviewed-by: Ron Gredvig <ron.gredvig@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16801 lnet: Use dynamic allocation for LND tunables 72/50872/2
Chris Horn [Fri, 5 May 2023 18:27:00 +0000 (12:27 -0600)]
LU-16801 lnet: Use dynamic allocation for LND tunables

Increasing size of lnet_ioctl_config_lnd_tunables can cause us to
trip Werror=frame-larger-than warning in lnet_net_cmd() and its
call to static function lnet_genl_parse_local_ni() (seen on
ubuntu2004 and ubuntu2204.) Dynamically allocate this memory instead.

Also modify how LND tunables are initialized in
handle_yaml_config_ni() to match what is done in
lnet_genl_parse_local_ni().

Test-Parameters: trivial
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I6d169ac44521e98958feee70fc5ed73ffb8a7fcd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50872
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-9859 libcfs: remove workitem. 62/50462/5
Mr NeilBrown [Fri, 30 Oct 2020 05:27:56 +0000 (16:27 +1100)]
LU-9859 libcfs: remove workitem.

There are no more users of the "workitem" code so it can be removed.
Lustre uses Linux workqueues instead.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I392ab73cdd38bc2927e0626d83a6f838dfd8113c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50462
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-930 doc: move lnet pages, remove old docs 87/50387/3
Timothy Day [Thu, 23 Mar 2023 05:35:10 +0000 (05:35 +0000)]
LU-930 doc: move lnet pages, remove old docs

Purge ancient lnet documentation. It doesn't seem to
have been updated in at least 20 years, based on the
git history.

In it's place, put the lnetctl and lst man pages. This
is a more sensible place for the lnet man pages to
live. This patch is preliminary to them being split
up and updated.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I33a3f38bd0f6803406a235f2177bab21dbf7546b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50387
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
11 months agoLU-15969 llite: add support for ->fileattr_get/set 49/50649/10
Mr NeilBrown [Wed, 7 Dec 2022 07:55:57 +0000 (18:55 +1100)]
LU-15969 llite: add support for  ->fileattr_get/set

From Linux 5.13, FS_IOC_SETFLAGS and GETFLAGS aren't passed down to
the filesystem, we need ->fileattr_get/set inode_operations instead.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I7c13640012f3e3b6176bcdcc78a07f30e0667cbb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50649
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-9325 obd: replace simple_strtoul() 10/49910/11
James Simmons [Sat, 29 Apr 2023 15:39:56 +0000 (11:39 -0400)]
LU-9325 obd: replace simple_strtoul()

Replace the use of simple_strtoul() in filename_is_volatile() with
sscanf(). This change also strengthens the checking of the format
of the volatile file's name.

Remove the use of simple_strtoul() from target_name2index() as well.

Change-Id: I4bf15af00d6cecdd46eba3cca5df0fbeb473d9ce
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49910
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16340 quota: notify only global lqe 39/49239/12
Sergey Cheremencev [Mon, 25 Apr 2022 18:49:55 +0000 (21:49 +0300)]
LU-16340 quota: notify only global lqe

Don't notify slaves with new limits when set new
limits to the pools. Do this only for lqes that
belong to the global pool.

The fix helps to avoid a case when slaves do not
apply new limit because slaves` data version is
greater than the one comes from the MDT. It was
possible, if set a lot of times different limits to PQ.
After that new limits from the global pool could not
be be applied:

qsd_upd_schedule()) lustre-OST0000: discarding glb
update from glimpse ver:7 local ver:203

For details about the problem see "check indexes versions"
test in sanity-quota.sh.

Add test 25 "check indexes versions" into sanity-quota.
Without the fix it reproduces above problem.

Fix checkpatch to don't print "Invalid vsprintf pointer
extension" for %px.

HPE-bug-id: LUS-10705
Change-Id: Idb091a10894e9db9f67d215baef2926723d6c65d
Signed-off-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-on: https://es-gerrit.dev.cray.com/160536
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Tested-by: Elena Gryaznova <elena.gryaznova@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49239
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16331 utils: fix 'lfs find -O <uuid>' with gaps 07/49207/8
Andreas Dilger [Tue, 22 Nov 2022 05:40:03 +0000 (22:40 -0700)]
LU-16331 utils: fix 'lfs find -O <uuid>' with gaps

Fix the UUID parsing in llapi_get_target_uuids() so that the OST
UUIDs are put into the right slots when there is a gap in numbering.
Otherwise, "lfs find -O <uuid>" will not be able to find the given
UUID if it is the first OST after the gap.

Add test case for 'lfs find' and 'lfs getstripe' with large/sparse
OST indices in conf-sanity test_81.

Test-Parameters: trivial testlist=conf-sanity env=ONLY="81-82"
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia0581f85f016c202514148114924509118a0f792
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49207
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-10026 csdc: reserve layout bits for compress component 70/49170/10
Bobi Jam [Mon, 14 Nov 2022 08:25:05 +0000 (16:25 +0800)]
LU-10026 csdc: reserve layout bits for compress component

Add layout bits for compress component layout.

* lcme_compr_type: compression type (gzip, lz4, lz4hc, lzo, etc.)
* lcme_compr_lvl: compression level (0=default, 1-15)
* lcme_compr_chunk_log_bits: chunk size = 2^(16+chunk_log_bits)

Component pattern:
* LOV_PATTERN_COMPRESS - file contains compressed data chunks and
       cannot be read by a client without decompression support.

Compress component flags:
* LCME_FL_COMPRESS - the component should be compressed with the
       compression algorithm stored in lcme_comp_type, at level
       lcme_comp_level, with chunk size 2^(16+lcme_chunk_log_bits)
* LCME_FL_PARTIAL - the component holds some uncompressed chunks due
       to poor write size/alignment, and may benefit from being
       recompressed as the full file data is available
* LCME_FL_NOCOMPR - the component should not be compressed because
       the data was found to be incompressible, or by user request

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Idca22cca87b01bba8a5b3c85ca62044abe1d30eb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49170
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
11 months agoLU-14294 tests: fixed NFS configuration issue 62/49062/46
Alex Deiter [Mon, 7 Nov 2022 17:47:21 +0000 (21:47 +0400)]
LU-14294 tests: fixed NFS configuration issue

* Used the systemctl command to manage system services
* Used the same order of parameters to setup and cleanup NFS
* Used tab for indentation

Test-Parameters: trivial clientdistro=el7.9 \
testlist=parallel-scale-nfsv3,parallel-scale-nfsv4
Test-Parameters: clientdistro=el8.7 \
testlist=parallel-scale-nfsv3,parallel-scale-nfsv4
Test-Parameters: clientdistro=el9.0 \
testlist=parallel-scale-nfsv3,parallel-scale-nfsv4
Test-Parameters: clientdistro=sles12sp5 \
testlist=parallel-scale-nfsv3,parallel-scale-nfsv4
Test-Parameters: clientdistro=sles15sp4 \
testlist=parallel-scale-nfsv3,parallel-scale-nfsv4
Test-Parameters: clientdistro=ubuntu2004 \
testlist=parallel-scale-nfsv3,parallel-scale-nfsv4
Test-Parameters: clientdistro=ubuntu2204 \
testlist=parallel-scale-nfsv3,parallel-scale-nfsv4

Change-Id: I6b087035ac7524aa99c0facad48f8c3fb7444cbc
Signed-off-by: Alex Deiter <adeiter@tintri.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49062
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-16212 kfilnd: net and lnd tunables wrong 79/48779/4
Ron Gredvig [Wed, 24 Aug 2022 20:24:34 +0000 (15:24 -0500)]
LU-16212 kfilnd: net and lnd tunables wrong

The kfilnd net and lnd tunables were not getting set properly in
many cases. Tunables not explcitly set were not set to the correct
default values.

Fixed logic in kfilnd_tunables_setup().

Improved error messages in kfilnd_startup() and
kfilnd_tunables_setup().

HPE-bug-id: LUS-11164
Test-Parameters: trivial
Signed-off-by: Ron Gredvig <ron.gredvig@hpe.com>
Change-Id: I49807b80466f5cbee65a9b3a7ee5ec2fe0c9e141
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48779
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Ian Ziemba <ian.ziemba@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-13199 lustre: remove cl_{offset,index,page_size} helpers 26/37426/4
Wang Shilong [Tue, 4 Feb 2020 10:35:20 +0000 (18:35 +0800)]
LU-13199 lustre: remove cl_{offset,index,page_size} helpers

These helpers could be replaced with PAGE_SIZE and PAGE_SHIFT calculation
directly which avoid CPU overhead.

Change-Id: I624136d4399a03e599f09f00a77b86de045f19e9
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/37426
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
11 months agoLU-9859 lnet: convert selftest to use workqueues 91/36991/26
Mr NeilBrown [Fri, 17 Jul 2020 23:11:29 +0000 (19:11 -0400)]
LU-9859 lnet: convert selftest to use workqueues

Instead of the cfs workitem library, use workqueues.

As lnet wants to provide a cpu mask of allowed cpus, it
needs to be a WQ_UNBOUND work queue so that tasks can
run on cpus other than where they were submitted.
We use alloc_ordered_workqueue for lst_sched_serial (now called
lst_serial_wq) - "ordered" means the same as "serial" did.
We use cfs_cpt_bind_queue() for the other workqueues which sets up the
CPU mask as required.

An important difference with workqueues is that there is no equivalent
to cfs_wi_exit() which can be called in the action function and which
will ensure the function is not called again - and that the item is no
longer queued.

To provide similar semantics we treat swi_state == SWI_STATE_DONE as
meaning that the wi is complete and any further calls must be no-op.
We also call cancel_work_sync() (via swi_cancel_workitem()) before
freeing or reusing memory that held a work-item.

To ensure the same exclusion that cfs_wi_exit() provided the state is
set and tested under a lock - either crpc_lock, scd_lock, or tsi_lock
depending on which structure the wi is embedded in.

Another minor difference is that with workqueues the action function
returns void, not an int.

Also change SWI_STATE_* from #define to an enum.  The only place these
values are ever stored is in one field in a struct.

Linux-commit: 6106c0f82481e686b337ee0c403821fb5c3c17ef
Linux-commit: 3fc0b7d3e0a4d37e4c60c2232df4500187a07232
Linux-commit: 7d70718de014ada7280bb011db8655e18ed935b1

Test-Parameters: trivial testlist=lnet-selftest
Change-Id: I5ccf1399ebbfdd4cab3696749bd1ec666147b757
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/36991
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-12273 obd: Reserve metadata overstriping flags 07/49707/5
Patrick Farrell [Thu, 19 Jan 2023 18:48:07 +0000 (13:48 -0500)]
LU-12273 obd: Reserve metadata overstriping flags

Reserve flag bits for metadata overstriping.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <farr0186@gmail.com>
Change-Id: I894b9420a4b08cceaccca6b3184ecb3bd22a680c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49707
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 months agoLU-137 osd-ldiskfs: pass through resize ioctl 61/20161/16
Andreas Dilger [Wed, 23 Nov 2022 23:13:12 +0000 (16:13 -0700)]
LU-137 osd-ldiskfs: pass through resize ioctl

Pass through the EXT4_IOC_RESIZE_FS ioctl to the underlying ldiskfs
code so that it is possible to online resize MDT and OST filesystems.

When running resize2fs against a filesystem, it compares st_rdev of
the block device against st_dev of the mounted filesystem, so the
mounted Lustre stub filesystem needs to return proper stat information
from the ldiskfs root directory.  Add in a server_getattr() method
to the server inode_operations.  Using generic_fillattr() is enough,
we don't need the added complexity of calling ext4_getattr() (which
does not exist on directories for all kernel versions).

Change the OSD API from returning the superblock with dt_mnt_sb_get()
to returning the vfsmount with dt_mnt_get(), since it also contains
the superblock, but is more useful for calling some inode methods.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I934ae1f495bd15c6435be81b51ed04f0986c0322
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/20161
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-6142 obd: change lmd flags to bitmap 12/49912/9
James Simmons [Sun, 30 Apr 2023 13:06:44 +0000 (09:06 -0400)]
LU-6142 obd: change lmd flags to bitmap

Change lmd flags to an enum that is accessible with the Linux
bitmap API. This lays the foundation for creating a match table
for the server options for mounting.

Change-Id: If7906a9a3ba177b67d0cfbaa276a00a6ba9b7b6d
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49912
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 months agoLU-15934 lod: renew the update llog 69/49569/3
Yang Sheng [Fri, 6 Jan 2023 13:10:35 +0000 (21:10 +0800)]
LU-15934 lod: renew the update llog

Skip and renew the update llog file while it was
corrupted.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I3491858dce42b4a8ed11db55ebbf8a12ef5f521d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49569
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
11 months agoLU-11623 mdt: return UPDATE|PERM on open 85/33585/30
Oleg Drokin [Tue, 4 Jun 2019 04:41:40 +0000 (00:41 -0400)]
LU-11623 mdt: return UPDATE|PERM on open

This patch includes the following changes:
* try lock UPDATE|PERM ibits on open to speed up subsequent stat.
* open returns PR lock to client by default, because CR mode
  UPDATE|PERM ibits don't make sense since all modifications take
  PW lock.
* don't lock UPDATE|PERM ibits for PCC attach, otherwise these ibits
  revoke will cause file detach.
* update sanity-pcc 13a to make it fail on single client test if
  anything went wrong.
* update sanity-lfsck 31d because previously CR UPDATE lock is
  fetched, thus the test pass by mistake.

This should help common workloads with open followed by a stat
or other such operation.

Benchmark results:

This patch can significantly improve open-create + stat on the same
client.

This patch in combination with two others:

https://review.whamcloud.com/32157
https://review.whamcloud.com/33584

Improves the 'stat' side of open-create + stat by >10x.

Without patches (master branch commit 26a7abe):

mpirun -np 24 --allow-run-as-root /work/tools/bin/mdtest -n 50000 -d
/cache1/out/ -F -C -T -v -w 32k

   Operation                      Max            Min           Mean
   ---------                      ---            ---           ----
   File creation     :       3838.205       3838.204       3838.204
   File stat         :      33459.289      33459.249      33459.271
   File read         :          0.000          0.000          0.000
   File removal      :          0.000          0.000          0.000
   Tree creation     :       3146.841       3146.841       3146.841
   Tree removal      :          0.000          0.000          0.000

With the three patches:

mpirun -np 24 --allow-run-as-root /work/tools/bin/mdtest -n 50000 -d
/cache1/out/ -F -C -T -v -w 32k
SUMMARY rate: (of 1 iterations)
   Operation                      Max            Min           Mean
   ---------                      ---            ---           ----
   File creation     :       3822.440       3822.439       3822.440
   File stat         :     350620.140     350615.980     350617.193
   File read         :          0.000          0.000          0.000
   File removal      :          0.000          0.000          0.000
   Tree creation     :       2076.727       2076.727       2076.727
   Tree removal      :          0.000          0.000          0.000

Note 33K stats/second vs 350K stats/second.

ls -l time of the mdtest directory is also reduced from 23.5 seconds
to 5.8 seconds.

Change-Id: Ib3410629c190de6f74246a4a92f8216537fa2b95
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Signed-off-by: Qian Yingjiin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/33585
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
12 months agoLU-15529 mdt: optimize dir migration locking 91/40891/25
Lai Siyao [Sun, 16 May 2021 06:46:21 +0000 (14:46 +0800)]
LU-15529 mdt: optimize dir migration locking

Optimize dir migration locking and fix some deadlocks:
* don't lock all stripes of parent, but source and target parent
  stripes only.
* use mdt_rename_source_lock() to lock source, because directory
  stripes are not changed in migration.
* refactor migrate links locking code.
* pass spobj and tpobj to mdo_migrate() interface to avoid parsing
  parent directory layout in MDD layer again.
* never lock the same FID twice, which may lead to deadlock:
  . if link parent is local, don't hold local LOOKUP lock, but revoke
    only, because later we need to lock other ibits of sobj.
  . if sobj is plain directory, unlock sobj before locking tobj,
    because sobj will become a stripe of tobj during migration.
* enable striped directory migration in racer test.

Also update sanityn 80b to migrate directory and access it for one
minute and verify filesystem is not broken, though both migration and
directory access may fail in this period.

Test-Parameters: env=SLOW=y mdscount=2 mdtcount=4 testlist=racer,racer,racer
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ie9859df244529c986c2f3f032a49e3f9c89a2747
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/40891
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16221 build: modify kmodtool for rhel9 65/50865/3
Minh Diep [Fri, 5 May 2023 03:32:38 +0000 (20:32 -0700)]
LU-16221 build: modify kmodtool for rhel9

Customized kmodtool to use our lbuild location

Test-Parameters: trivial \
clientdistro=el9.1 serverdistro=el9.1 testlist=sanity

Change-Id: I0573db09fa33a77d93d052fa12d5b07300d7eff6
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50865
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-13081 tests: skip sanity test_151/test_156 77/50777/3
Alex Deiter [Wed, 26 Apr 2023 22:04:01 +0000 (02:04 +0400)]
LU-13081 tests: skip sanity test_151/test_156

Skip both sanity test_151 and test_156 during interop testing,
since this is really testing server-side functionality only
(OSS caching behavior). And it makes sense to just exclude
test_151 and test_156 during interop testing, otherwise it
seems that the client version of the test can become
inconsistent with the caching behavior/tunables on the OSS
and the failures don't mean anything. There is enough
non-interop testing to catch any regressions in the OSS
cache behavior.

Test-Parameters: trivial
Signed-off-by: Alex Deiter <adeiter@tintri.com>
Change-Id: I39a8b54894d5b0c7573e6c56d1f8e1ba02b3e3fe
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50777
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16756 kernel: new kernel [RHEL 9.2 5.14.0-283.el9] 45/50745/4
Jian Yu [Tue, 25 Apr 2023 18:32:24 +0000 (11:32 -0700)]
LU-16756 kernel: new kernel [RHEL 9.2 5.14.0-283.el9]

This patch makes changes to support new RHEL 9.2 release
for Lustre client.

Test-Parameters: trivial env=SANITY_EXCEPT=27J clientdistro=el9.2 testlist=sanity

Change-Id: I4886bbf30d6d6a93c4adbfb68871e9d91f5b64de
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50745
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
12 months agoLU-10733 tests: increase conf-sanity/106 OST size 32/50732/2
Andreas Dilger [Thu, 20 Apr 2023 22:13:54 +0000 (16:13 -0600)]
LU-10733 tests: increase conf-sanity/106 OST size

conf-sanity test_106 is trying to create ~64k files, but OST0000
only has about 48k objects in this case, so the file creates are
failing during the test.  This makes the test somewhat unreliable
and hitting errors not related to what was originally intended
(llog wrap handling).

Increase the OSTSIZE for this test to handle the number of objects
needed by the test so it can run more reliably.

Test-Parameters: trivial
Test-Parameters: testlist=conf-sanity env=ONLY=106
Test-Parameters: testlist=conf-sanity env=ONLY=106
Test-Parameters: testlist=conf-sanity env=ONLY=106
Test-Parameters: testlist=conf-sanity env=ONLY=106
Test-Parameters: testlist=conf-sanity env=ONLY=106
Test-Parameters: testlist=conf-sanity env=ONLY=106
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie33825801172ea565d9d1d5fb81595d2cad65677
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50732
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16758 krb: use Kerberos machine principal in client 09/50709/2
Sebastien Buisson [Fri, 21 Apr 2023 13:55:21 +0000 (15:55 +0200)]
LU-16758 krb: use Kerberos machine principal in client

In addition to having Lustre client rely on the
lustre_root/<hostname>@REALM principal to authenticate, support the
more standard Kerberos machine principal host/<hostname>@REALM.
That avoids the need for additional keytab entries, and brings Lustre
in line with other services such as OpenSSH and NFS.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Id50cef1a3a94248b958ce9ea42b5ae356f29cbf1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50709
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Jonathan Calmels <jcalmels@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16286 ldiskfs: add ext4_find_delayed_extent patch to more series 20/50820/2
Jian Yu [Mon, 1 May 2023 16:34:58 +0000 (09:34 -0700)]
LU-16286 ldiskfs: add ext4_find_delayed_extent patch to more series

Add rhel8.4/ext4-optimize-find_delayed_extent.patch to RHEL 8.7
and RHEL 8.8 ldiskfs patch series.

Test-Parameters: trivial fstype=ldiskfs \
clientdistro=el8.7 serverdistro=el8.7 testlist=sanity

Test-Parameters: trivial fstype=ldiskfs \
clientdistro=el8.8 serverdistro=el8.8 testlist=sanity

Change-Id: I9940ed20e0addfcf2c34db955bd6d36844a268df
Fixes: 3dd73b5c5d61 ("LU-16286 ldiskfs: reimplement nodelalloc optimization")
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50820
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16755 kernel: RHEL 8.8 client and server support 08/50708/4
Jian Yu [Sun, 23 Apr 2023 00:02:47 +0000 (17:02 -0700)]
LU-16755 kernel: RHEL 8.8 client and server support

This patch makes changes to support RHEL 8.8 release
with kernel 4.18.0-477.el8 for Lustre client and server.

Test-Parameters: trivial fstype=ldiskfs \
clientdistro=el8.8 serverdistro=el8.8 testlist=sanity

Test-Parameters: trivial fstype=zfs \
clientdistro=el8.8 serverdistro=el8.8 testlist=sanity

Change-Id: Ie47f131e0340a601c8a5d748ecf9b1b73d4baa1f
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50708
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 months agoLU-16751 docs: consolidate and cleanup READMEs 03/50703/6
Timothy Day [Fri, 21 Apr 2023 04:23:15 +0000 (04:23 +0000)]
LU-16751 docs: consolidate and cleanup READMEs

A number of the in-tree READMEs are very outdated. Consolidating
these into the top-level README will make it more likely that the
infomation is read (since this file gets rendered by many git hosts)
and more likely to be keep up-to-date.

The information in the consolidated README has been updated.

Some docs which don't seem relevant anymore are simply deleted.

The llverfs.txt doc has been converted to a proper man page. The
descriptive comment in llverfs.c has been redirected towards the
man page instead, to reduce the risk of these becoming out-of-sync.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I57a6f13056913551d96363ffdbce76beed5c9486
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50703
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16739 uapi: make lustre_disk.h buildable in user land 41/50641/12
James Simmons [Wed, 26 Apr 2023 15:12:48 +0000 (11:12 -0400)]
LU-16739 uapi: make lustre_disk.h buildable in user land

The rbac work introduced a regression that makes lustre_disk.h
UAPI header no longer buildable in user land. This is causing
sanity test 400b to fail with:

lustre_disk.h:266:18: error: 'LUSTRE_NODEMAP_NAME_LENGTH' undeclared here (not in a function)
  char   ncr_name[LUSTRE_NODEMAP_NAME_LENGTH + 1];
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
lustre_disk.h:267:20: error: 'ncr_flags' is narrower than values of its type [-Werror]
  enum nm_flag_bits ncr_flags:8;
                    ^~~~~~~~~
lustre_disk.h:267:20: error: field 'ncr_flags' has incomplete type
lustre_disk.h:268:21: error: 'ncr_flags2' is narrower than values of its type [-Werror]
  enum nm_flag2_bits ncr_flags2:8;
                     ^~~~~~~~~~
lustre_disk.h:268:21: error: field 'ncr_flags2' has incomplete type
lustre_disk.h:277:2: error: unknown type name 'lnet_nid_t'
  lnet_nid_t nrr_start_nid;
  ^~~~~~~~~~
lustre/lustre_disk.h:278:2: error: unknown type name 'lnet_nid_t'
  lnet_nid_t nrr_end_nid;
  ^~~~~~~~~~

To fix this move several pieces of nodemap handling from lustre_idl.h
to lustre_disk.h.

The git commit 5e6a51787fef20b849682d8c49ec9c2beed5c373 for Linux
kernel version 6.2.0-rc5 made guid_t only available for kernel code.
The only UAPI data structure left is uuid_le. Thankfully MCE requires
this otherwise even uuid_le would be removed. We will need to keep
an eye on this.

Test-Parameters: trivial testlist=sanity envdefinitions=ONLY=400b
Fixes: 5e48ffca322 ("LU-16524 nodemap: add rbac property to nodemap")
Change-Id: I4b962572ec2bf76159a17807c564390ded00d630
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50641
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16713 llite: add __GFP_NORETRY for read-ahead page 25/50625/3
Qian Yingjin [Thu, 13 Apr 2023 12:28:26 +0000 (08:28 -0400)]
LU-16713 llite: add __GFP_NORETRY for read-ahead page

We need __GFP_NORETRY for read-ahead page, otherwise the read
process would be OOM killed when reached cgroup memory limits.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: If699429d5d5cd29bd895d8455296113aa67645fc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50625
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16649 llite: EIO is possible on a race with page reclaim 44/50344/9
Patrick Farrell [Mon, 20 Mar 2023 21:21:32 +0000 (17:21 -0400)]
LU-16649 llite: EIO is possible on a race with page reclaim

We must clear the 'uptodate' page flag when we delete a
page from Lustre, or stale reads can occur.  However,
generic_file_buffered_read requires any pages returned from
readpage() be uptodate.

So, we must retry reading if page truncation happens in
parallel with the read.

This implements the same fix as:
https://review.whamcloud.com/49647
b4da788a819f82d35b685d6ee7f02809c05ca005

did for the mmap path.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Iae0d1eb343f25a0176135347e54c309056c2613a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50344
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoRevert "LU-14541 llite: Check vmpage in releasepage" 54/49654/8
Patrick Farrell [Mon, 20 Mar 2023 21:49:06 +0000 (17:49 -0400)]
Revert "LU-14541 llite: Check vmpage in releasepage"

This reverts commit c524079f4f59a39b99467d9868ee4aafdcf033e9,
because it breaks releasepage for Lustre and does not
completely fix the data consistency issue in LU-14541.

Breaking releasepage matters because it prevents direct I/O
from working if there is page cache data present, and
because it causes similar issues with GDS, which must be
able to flush page cache pages before doing I/O.

Revert "LU-14541 llite: Check vmpage in releasepage"

This reverts commit c524079f4f59a39b99467d9868ee4aafdcf033e9,
because it breaks releasepage for Lustre and does not
completely fix the data consistency issue in LU-14541.

Breaking releasepage matters because it prevents direct I/O
from working if there is page cache data present, and
because it causes similar issues with GDS, which must be
able to flush page cache pages before doing I/O.

With patches:
"LU-16160 llite: SIGBUS is possible on a race with page reclaim"/
d9c23a7934747eb19e23470b30806482a1aa60f8
and
"LU-14541 llite: Check for page deletion after fault"/
19678e30147f50f813e72e8216cfb0453fe0ca6e
LU-14541 is fully resolved, so we can revert this patch.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I613bdb4f27161ffc3638d1d8ea38827af5a7bd47
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49654
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16508 netlink: resv_start_op for [lnet|lustre]_family 00/49800/13
Shaun Tancheff [Fri, 10 Feb 2023 18:02:41 +0000 (12:02 -0600)]
LU-16508 netlink: resv_start_op for [lnet|lustre]_family

Linux v5.0-11693-g3b0f31f2b8c9
  genetlink: make policy common to family

struct genl_family adds policy and resv_start_op members

Linux v6.1-rc2-63-g4fa86555d1cd
  genetlink: piggy back on resv_op to default to a reject policy

struct genl_family needs to set a policy and/or indicate the
commands that should be validated.

Set the resv_start_op higher than the largest command accepted.
to avoid a default policy of NLA_REJECT.

When genl_family has a policy provide one.

HPE-bug-id: LUS-11454
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: If38fbe4c9358bb4f9b57e7d25b8a6df1fba63452
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49800
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
12 months agoLU-16768 lfs: copy optarg string other than using it directly 33/50733/2
Bobi Jam [Tue, 25 Apr 2023 02:15:11 +0000 (10:15 +0800)]
LU-16768 lfs: copy optarg string other than using it directly

Copy optarg string for fp_format_printf_str lest it be messed
later.

Fixes: 6b8e97b76c ("LU-10378 utils: add formatted printf to lfs find")
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ib32883d3261ae921adf0fdd7b05bcbf728de7557
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50733
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Rick Mohr <mohrrf@ornl.gov>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-10391 lnet: set msg field for lnet message header 16/50716/2
James Simmons [Sun, 23 Apr 2023 00:12:35 +0000 (20:12 -0400)]
LU-10391 lnet: set msg field for lnet message header

During testing messages sent for larger NID setups was missing
the actual message. Fill in the header msg field to properly
send the total message.

Test-Parameters: trivial testlist=sanity-lnet
Test-Parameters: serverversion=2.12 serverdistro=el7.9 testlist=runtests
Test-Parameters: clientversion=2.12 testlist=runtests
Fixes: 7b31ef0bbac ("LU-10391 socklnd: add hello message version 4")
Change-Id: I36ef48a239a64a9002f8dc2683437bc3c57492e6
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50716
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16657 build: don't need to use zfs kmodtool on RHEL9.1 46/50746/2
Minh Diep [Tue, 25 Apr 2023 18:44:46 +0000 (11:44 -0700)]
LU-16657 build: don't need to use zfs kmodtool on RHEL9.1

Test-Parameters: trivial fstype=zfs \
clientdistro=el9.1 serverdistro=el9.1 testlist=sanity

Test-Parameters: trivial fstype=zfs \
clientdistro=el8.7 serverdistro=el8.7 testlist=sanity

Test-Parameters: trivial fstype=ldiskfs \
clientdistro=el9.1 serverdistro=el9.1 testlist=sanity

Test-Parameters: trivial fstype=ldiskfs \
clientdistro=el8.7 serverdistro=el8.7 testlist=sanity

Change-Id: I11ca6a01cb9ddc6e59bf91e1bee35a3ceccb725a
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50746
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16759 o2ib: MOFED 5.5+ ib_dma_virt_map_sg 11/50711/4
Shaun Tancheff [Sun, 23 Apr 2023 12:19:11 +0000 (07:19 -0500)]
LU-16759 o2ib: MOFED 5.5+ ib_dma_virt_map_sg

MOFED 5.5 fails with:
  ERROR: "ib_dma_virt_map_sg" [.../ko2iblnd.ko] undefined!

See if we have a broken ib_dma_map_sg() and provide
a suitable replacement for the missing functionality.

Test-Parameters: trivial
HPE-bug-id: LUS-11587
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I3b4454fcafe4640c15b13385a0209ed71f51a3d0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50711
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-11407 obdclass: init osc.*.rpc_stats start_time 34/50734/2
Andreas Dilger [Tue, 25 Apr 2023 06:30:50 +0000 (00:30 -0600)]
LU-11407 obdclass: init osc.*.rpc_stats start_time

Add missing start_time initialization for osc.*.rpc_stats.

Test-Parameters: trivial
Fixes: ea2cd3af7b ("LU-11407 obdclass: add start time to stats files")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I998b5337ccebc4d3ec18260d259f39c7893ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50734
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 months agoLU-13706 tests: remove test 119d 31/50731/2
Patrick Farrell [Mon, 24 Apr 2023 21:49:18 +0000 (17:49 -0400)]
LU-13706 tests: remove test 119d

The fail_loc used by test 119d was removed in Lustre 2.0.
The fail_loc tests for a bug which should be obvious - a
serious delay when doing DIO writes - and is definitely
fixed in current versions.  (Bugzilla 15950)

And without the fail_loc, the test isn't doing anything
interesting.  But the timer based aspect of it fails
occasionally due to hardware delays.  So let's just remove
the test.

test-parameters: trivial

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I2bc18869258e26dad99c72006f55f31315e67bdd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50731
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16217 iokit: update .gitignore files 94/50594/3
Timothy Day [Tue, 11 Apr 2023 01:45:07 +0000 (01:45 +0000)]
LU-16217 iokit: update .gitignore files

Add missing .gitignore file to new iokit directory.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I4d292c26971f4bd805dc0f2a35e4a281646405ee
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50594
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16650 kernel: update RHEL 7.9 [3.10.0-1160.88.1.el7] 53/50553/2
Jian Yu [Thu, 6 Apr 2023 06:37:16 +0000 (23:37 -0700)]
LU-16650 kernel: update RHEL 7.9 [3.10.0-1160.88.1.el7]

Update RHEL 7.9 kernel to 3.10.0-1160.88.1.el7.

Test-Parameters: trivial clientdistro=el7.9 serverdistro=el7.9

Change-Id: I4119595943940cca94d1853b59c94a02fed8cb71
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50553
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-15615 target: Free t10pi crypto state on error 39/50539/3
Oleg Drokin [Fri, 4 Mar 2022 22:10:25 +0000 (17:10 -0500)]
LU-15615 target: Free t10pi crypto state on error

Looks like when error happens we forgot to release crypto state that
not only leaks memory directly, but potentially can tie in-memory
pages too.

Change-Id: Ia0870ccbb194e4e9ca8701e1c01d519745c236df
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50539
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
12 months agoLU-16659 build: Detect the mofed path based on running kernel 17/50517/2
Gaurang Tapase [Tue, 4 Apr 2023 05:45:35 +0000 (11:15 +0530)]
LU-16659 build: Detect the mofed path based on running kernel

Test-Parameters: trivial

Change-Id: I519e93e8c26807da6143e2cf4d825ccf4a4180e4
Signed-off-by: Gaurang Tapase <gtapase@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50517
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 months agoLU-14692 tests: wait for osp in conf-sanity/84 77/50477/4
Li Dongyang [Thu, 30 Mar 2023 12:45:04 +0000 (23:45 +1100)]
LU-14692 tests: wait for osp in conf-sanity/84

Wait for osp to change the first IDIF SEQ to a
normal SEQ, before using replay_barrier.
Otherwise the SEQ change could get lost and we
will trigger LASSERT during replay.

Change-Id: I32daa49d6329902b84eebb00090ae3cebe4a71b0
Test-Parameters: trivial testlist=conf-sanity env=ONLY=84,ONLY_REPEAT=10
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50477
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
12 months agoLU-16427 lfs: rmfid does not print anything on error 88/50388/11
Arshad Hussain [Mon, 3 Apr 2023 21:48:15 +0000 (03:18 +0530)]
LU-16427 lfs: rmfid does not print anything on error

This patch:

01. Improve rmfid

    Adds llapi_root_path_open() This function accepts the device
    or path and returns the open fd for them. This was done so
    that it is called only _once_ and not at every lookup.

    Adds llapi_rmfid_at() This function makes the final IOCTL to
    rmfid. Since llapi_root_path_open() we already had the valid
    fd and populated 'fid_structure'. We could isolate this and
    not call the former llapi_rmfid()

02. Fix rmfid silently accepting fid without fsname
    or lustre root mount point. Make it correctly
    fail if required arguments is not provided.

    After Patch:
    ~~~~~~~~~~~~
    $ lfs rmfid 0x200000402:0x1:0x0
    lfs rmfid: missing <fsname|rootpath> or <fid>
    Remove file(s) by FID(s)
    usage: rmfid <fsname|rootpath> <fid> ...

    Before Patch:
    ~~~~~~~~~~~~
    $ lfs rmfid 0x200000402:0x1:0x0
    $

03. Fix rmfid memory leak

    After Patch:
    ~~~~~~~~~~~~
    $ valgrind --leak-check=full lfs  rmfid lustre 0x200000402:0x1:0x0
    ==33793== HEAP SUMMARY:
    ==33793==     in use at exit: 0 bytes in 0 blocks
    ==33793==   total heap usage: 4 allocs, 4 frees, 1,567 bytes allocated
    ==33793==
    ==33793== All heap blocks were freed -- no leaks are possible

    Before Patch:
    ~~~~~~~~~~~~
    $ valgrind --leak-check=full lfs rmfid lustre 0x200000402:0x1:0x0
    ==30812== LEAK SUMMARY:
    ==30812==    definitely lost: 48 bytes in 1 blocks
    ==30812==    indirectly lost: 0 bytes in 0 blocks
    ==30812==      possibly lost: 0 bytes in 0 blocks
    ==30812==    still reachable: 0 bytes in 0 blocks
    ==30812==         suppressed: 0 bytes in 0 blocks

04. Update/Add Man pages

    Update llapi_rmfid.3 and lustreapi.7 man pages
    Add new llapi_rmfid_at.3 and llapi_root_path_open.3 man pages

Test-Parameters: trivial testlist=sanity
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Idda9313c97e48e9f7bf6486894b6ae3c74d71981
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50388
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Thomas Bertschinger <bertschinger@lanl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16631 llmount: improve usability 60/50260/3
Timothy Day [Fri, 10 Mar 2023 16:56:59 +0000 (16:56 +0000)]
LU-16631 llmount: improve usability

Add some simple help messages to both llmount.sh and
llmountcleanup.sh, similar to what auster has. This
will help unfamilar people understand the use of these
scripts.

Add option to disable client setup for llmount.sh. Add
options for llmount.sh environment variables.

Fix a couple small shellcheck warnings.

Update the file headers to have the SPDX license and
use the standard format.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I50dbb30bad8c8bc0479585293056d61a25aa001d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50260
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16462 utils: handle lack of newer nla_attrs 08/49608/10
James Simmons [Tue, 18 Apr 2023 01:07:47 +0000 (21:07 -0400)]
LU-16462 utils: handle lack of newer nla_attrs

Some platforms like SUSE12SP5 have an older version of libnl3.
Those versions lack proper support for newer nlattrs like NLA_S64.
Without proper support of these newer nlattrs this means
nla_validate() will see newer nlattrs as invalid. We need to
fill in this missing support on older platforms.

The "lctl ping" command will loop forever in jt_ptl_ping() if the
netlink yaml parser doesn't work, instead of falling back to the
"old_api" interface.  However, because IOC_LIBCFS_PING was also
deleted, this doesn't work either.  Use lustre_lnet_ping_nid() to
fallback to IOC_LIBCFS_PING_PEER (since v2_10_52_0-21-g7a36afd9df).

Also, jt_ptl_ping() was passing argv[1] directly to the kernel as
the NID to ping, without doing name resolution on it first, which
broke using "lctl ping HOSTNAME" instead of only numeric IP NIDs.
Ensure it returns a non-zero error code in case of failure.

Restore IOC_LIBCFS_GET_NI for compatibility until there have been
some releases with netlink support, so that "lctl list_nids" works.

Also, sanity test_217 that was testing "lctl ping" was always being
skipped, because "lctl list_nids" is never returning the hostname
with embedded '-', only numeric IP addresses.  Change it to prefer
testing the hostname if it resolves to a NID, otherwise ping the
numeric NID anyway, to confirm that "lctl ping" is still working.

Test-Parameters: trivial clientdistro=sles12sp5 testlist=sanity
Test-Parameters: clientdistro=sles12sp5 testlist=conf-sanity env=ONLY=43+50+70+91+115+130
Fixes: 86ba46c244 ("LU-9680 obdclass: user netlink to collect devices info")
Fixes: d137e9823c ("LU-10003 lnet: use Netlink to support LNet ping commands")
Fixes: 3e4061862e ("LU-864 test: Hostname name doesn't equal NID")
Change-Id: Ia2dfd84c2d1782578ceff1c2dc6f74d7aa9b458b
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49608
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 months agoLU-16351 llite: Linux 6.1 prandom, folios_contig, vma_iterator 32/49232/19
Shaun Tancheff [Fri, 27 Jan 2023 06:54:42 +0000 (00:54 -0600)]
LU-16351 llite: Linux 6.1 prandom, folios_contig, vma_iterator

Linux commit v4.10-rc3-6-gc440408cf690
  random: convert get_random_int/long into get_random_u32/u64
Linux commit v6.0-11338-gde492c83cae0
  prandom: remove unused functions

prandom_u32 is a wrapper around get_random_u32, change users
of prandom_u32 to get_random_u32 and provide a fallback
to prandom_u32 when get_random_u32 is not available.

Linux commit v6.0-rc1-2-g25885a35a720
  Change calling conventions for filldir_t
Add a test for the new filldir_t signature
Provide wrappers for transition from int (error code) to bool

Linux commit v6.0-rc3-94-g35b471467f88
  filemap: add filemap_get_folios_contig()
Provide a wrapper and fallback to find_get_pages_contig

Linux commit v6.0-rc3-225-gf39af05949a4
  mm: add VMA iterator
Use vma_iterator and for_each_vma when available.

Test-Parameters: trivial
HPE-bug-id: LUS-11377
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I23dc23d0252e1995555b6685f5cf7c207edf642b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49232
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 months agoLU-15550 ptlrpc: retry mechanism for overflowed batched RPCs 40/46540/9
Qian Yingjin [Thu, 17 Feb 2022 03:42:14 +0000 (22:42 -0500)]
LU-15550 ptlrpc: retry mechanism for overflowed batched RPCs

Before send the batched RPC, the client has no idea about the
actual reply buffer size. The reply buffer size prepared by a
client may be smalller than the reply buffer buffer size in need.
We already have the patch to grow the reply buffer properly in
most cases.

However, when the reply buffer size is growing larger than
BUT_MAXREPSIZE (1000 * 1024), the server will return -EOVERFLOW
error code. At this time, the server only executed the partial
sub requests in the batched RPC. The overflowed sub requests are
not handled.

In this patch, it adds a retry mechanism for overflowed batched
RPC. When found that the reply buffer overflowed, the client will
rebuild the batched RPC for the unhandled sub requests, and use
work queue mechanism to resend the new batched RPC to the server
to re-execute then again.

Add the test case sanity test_123f to verify it for large LOV
stripes with overstriping.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: If84fad32f2026bd34ffb47b3e163f84a9d950dbb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46540
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-8704 osp: update local fldb cache 20/44720/30
Alex Zhuravlev [Sat, 21 Aug 2021 15:45:53 +0000 (18:45 +0300)]
LU-8704 osp: update local fldb cache

update local fldb cache during precreate. this is to avoid
a situation when LOD is generating LOVEA and has to lookup
in FLDB. in turn this may lead to an RPC with a local
transaction running. not good.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iadf89eddcef88750d234b0139b67e04715e68855
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/44720
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 months agoLU-16634 misc: standardize iocontrol param handling 14/50314/10
Andreas Dilger [Mon, 20 Mar 2023 02:22:10 +0000 (20:22 -0600)]
LU-16634 misc: standardize iocontrol param handling

Validate uarg and karg early in iocontrol processing where needed.
This needs kernel interop for 4.20+ kernels for access_ok(), but
this can be checked by #ifdef and does not need an autoconf test.

Fix incorrect definition of OBD_IOC_BARRIER to match reality.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reported-by: Tao Lyu <tao.lyu@epfl.ch>
Change-Id: I1a0d2f839949debf346aa15c65b0f407e9ce7057
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50314
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-15515 contrib: Some style fixes for epython scripts 07/50607/4
Oleg Drokin [Tue, 11 Apr 2023 21:10:24 +0000 (17:10 -0400)]
LU-15515 contrib: Some style fixes for epython scripts

tighten formatting, remove spurious if() constructs,
add int conversion for shifts

Test-Parameters: trivial
Change-Id: Id89bc8ca898d0d5870ca6955b185571060eafd58
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50607
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16751 misc: remove unused small files 99/50699/2
Timothy Day [Thu, 20 Apr 2023 05:12:27 +0000 (05:12 +0000)]
LU-16751 misc: remove unused small files

There are a number of small files which don't seem to serve any
purpose anymore. This patches removes them.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Iddada509bfe1aaefbffdd0ec623a4efd4fc289e6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50699
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-15123 tests: check quota reintegration after recovery 88/50688/3
Alex Zhuravlev [Wed, 19 Apr 2023 07:20:33 +0000 (10:20 +0300)]
LU-15123 tests: check quota reintegration after recovery

4th step of quota reintegration (reconciliation) waits for recovery
completion. So the tests (like sanity-quota/7a) should wait for
recovery completion before checking reintegration results.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Id0aa5db01658621103d94ad6dafe91b2960b3a33
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50688
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
12 months agoLU-12610 contrib: spelling warning for OBD_ macros 65/50665/4
Timothy Day [Tue, 18 Apr 2023 03:13:57 +0000 (03:13 +0000)]
LU-12610 contrib: spelling warning for OBD_ macros

Add a spelling warning for OBD_ macros, which are
going to removed in follow-up patches.

Now, checkpatch.pl will suggest the CFS_ alternatives:

 WARNING: 'OBD_FAILED' may be misspelled - perhaps 'CFS_FAILED'?

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I97180894d30c24acd03eb2784270879a7ec80c0d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50665
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: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
12 months agoLU-16735 test: cancel MDC locks and wait recovery 38/50638/3
Hongchao Zhang [Fri, 14 Apr 2023 11:12:21 +0000 (19:12 +0800)]
LU-16735 test: cancel MDC locks and wait recovery

During test_35, the MDC LDLM locks should also be cancelled to
flush the pending operations and the recovery should be waited
to complete before checking the quota.

Test-Parameters: trivial testlist=sanity-quota mdscount=2 mdtcount=4
Change-Id: I6508644976be77ad2895107abf90144b51790cfe
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50638
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 months agoLU-10391 lustre: obd_connect and reconnect now use large nid 97/50097/5
Mr NeilBrown [Wed, 12 Apr 2023 12:58:01 +0000 (08:58 -0400)]
LU-10391 lustre: obd_connect and reconnect now use large nid

The 'localdata' argument for o_connect and o_reconnect when called
server-side is now a 'struct lnet_nid *' rather than an
'lnet_nid_t *'.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I1ce72ec11a5d2463fb90ab2686410e2dd96118e2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50097
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-14541 llite: Check for page deletion after fault 53/49653/12
Patrick Farrell [Mon, 20 Mar 2023 21:43:43 +0000 (17:43 -0400)]
LU-14541 llite: Check for page deletion after fault

Before completing a page fault and returning to the kernel,
we lock the page and verify it has not been truncated.  But
we must also verify the page has not been deleted from
Lustre, or we can return a disconnected (ie, not tracked by
Lustre) page to the kernel.

We mark deleted pages !uptodate, but this doesn't matter
for faulted pages, because the kernel assumes they are
returned uptodate, and maps them in to the process address
space.  Once mapped, the page state is not checked until
the page is unmapped.

But because the page is referenced by the mapping, it stays
in the page cache even though it's been disconnected from
Lustre.

Because the page is disconnected from Lustre, it will not
be found and cancelled on lock cancellation.  This can
result in stale data reads.

This is particularly an issue with releasepage (called from
drop_caches or under memory pressure), which can delete
pages separately from cancelling covering locks.

If releasepage is disabled, which is effectively what
"LU-14541 llite: Check vmpage in releasepage"
does, this is not an issue.  But disabling releasepage
causes other problems and is incorrect anyway.

Fixes: c524079f4f ("LU-14541 llite: Check vmpage in releasepage")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: If1164db8f8e92a1cf811431d56d15f30d8eb3faa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49653
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
12 months agoLU-16661 build: improve lustre.spec.in Requires 97/50397/14
Andreas Dilger [Fri, 24 Mar 2023 02:31:59 +0000 (20:31 -0600)]
LU-16661 build: improve lustre.spec.in Requires

Add Suggests: bash-completion for lustre-client and lustre for
lctl and lfs sub-command completion.

Move perl from Requires to Recommends, since there are only some
uncommonly used tools (llstat, llobdstat) that are using perl.
Remove a couple of ancient obsolete test scripts that used perl.

lustre-iokit incorrectly Required perl instead of python3.

Set minimum kernel version for client to be 3.10 or later.

Change "netstat" to "ss" in tests to avoid dependency issues.
Fix sanity.sh and conf-sanity.sh tests for sles12sp5 issues.

Test-Parameters: trivial testlist=runtests clientdistro=sles12sp5
Test-Parameters: trivial testlist=runtests clientdistro=el9.1
Test-Parameters: trivial testlist=runtests clientdistro=sles15sp3
Fixes: 7521473bdd ("LU-16382 spec: add more dependencies for lustre-tests")
Fixes: fd734cffb3 ("b=18443 tests: remove obsolete tests scripts")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I48c6819596c81cb044e983bc64f1edf1ee3ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50397
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
12 months agoLU-14189 contrib: docker example to build Lustre 00/40900/6
Alexey Zhuravlev [Mon, 7 Dec 2020 14:25:48 +0000 (17:25 +0300)]
LU-14189 contrib: docker example to build Lustre

can be easily modified for any target like specific RHEL, CentOS, etc

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I9f1abf653e0a89c5d115c53abc21df8d87b86e79
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/40900
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-14139 statahead: add test for batch statahead processing 20/41220/22
Qian Yingjin [Thu, 14 Jan 2021 08:07:24 +0000 (16:07 +0800)]
LU-14139 statahead: add test for batch statahead processing

This patch adds sanity test_123ad() for batched statahead
processing, verify it work as expected.

Test-Parameters: trivial testlist=sanity env=ONLY=123ad,ONLY_REPEAT=50
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I742dcac7140ad842fff2afadeb2d948661365b95
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/41220
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-11912 tests: SEQ rollover fixes 78/50478/10
Li Dongyang [Thu, 30 Mar 2023 13:02:33 +0000 (00:02 +1100)]
LU-11912 tests: SEQ rollover fixes

To avoid changeing SEQ after replay_barrier, we
use force_new_seq when starting the test suites heavily
using replay_barrier, e.g. replay-single.
However when there are fewer OSTs, the default 16384
SEQ width could not last the entire test suite, SEQ
rollover could still happen randomly after replay_barrier.

To overcome this, change the default OSTSEQWIDTH to
65536, and divide by number of OSTs, so the SEQ width is
larger with fewer OSTs. For 8 OSTs, the SEQ width is 16384,
and make sure we don't go under it.

Use force_new_seq_all for the test suites using replay_barrier
on MDTs other than mds1.

Add force_new_seq_all for replay-ost-single, which is using
replay_barrier on OST. If SEQ rollover happens after that,
the SEQ range update on ofd is lost due to replay_barrier,
the next time when we try to allocate a new SEQ will end up
with an old one.

Use force_new_seq_all for the test cases(namely sanity-pfl/0b
0c 1c 16b sanity/27Cd) checking for number of stripes created
with overstriping, to make sure we have enough objects
in the precreate pool.

Test-Parameters: trivial ostcount=4 testlist=replay-single
Test-Parameters: ostcount=2 testlist=replay-single
Test-Parameters: mdtcount=2 testlist=conf-sanity env=ONLY=122a,ONLY_REPEAT=10
Test-Parameters: testlist=sanity,sanity-pfl
Test-Parameters: testlist=sanity-scrub,replay-single,obdfilter-survey,replay-ost-single,large-scale
Fixes: 0ecb2a167c ("LU-11912 ofd: reduce LUSTRE_DATA_SEQ_MAX_WIDTH")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: Ic65111199f042405d6db8acb729b2cddf91138af
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50478
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-11170 tests: don't fail sanity/415 in VM 54/50654/2
Andreas Dilger [Mon, 17 Apr 2023 08:34:12 +0000 (02:34 -0600)]
LU-11170 tests: don't fail sanity/415 in VM

Don't fail sanity test_415 when running in a VM due to variable
runtimes for the tests.

A proper solution would be to examine the logs to determine if
the renames are blocked or just all slow due to VM contention.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1a5d0f601705c9ec8559e760c4ec27c7f83ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50654
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Vikentsi Lapa <vlapa@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-15690 tests: skip replay-ost-single/12a on old server 01/50701/4
hxing [Thu, 20 Apr 2023 07:46:29 +0000 (15:46 +0800)]
LU-15690 tests: skip replay-ost-single/12a on old server

Skip 12a of replay-ost-single for older server version.

Test-Parameters: trivial testlist=replay-ost-single env=ONLY=12a
Fixes: 28769c65987c ("LU-15195 ofd: missing OST object")
Signed-off-by: Xing Huang <hxing@ddn.com>
Change-Id: I473452a5326691f4394c9e3ab2ab5dfecbc6ec58
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50701
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 months agoLU-14139 ptlrpc: grow PtlRPC properly when prepare sub request 07/43707/14
Qian Yingjin [Fri, 14 May 2021 14:53:52 +0000 (22:53 +0800)]
LU-14139 ptlrpc: grow PtlRPC properly when prepare sub request

In this patch, it prepares and grows PtlRPC reply buffer
properly for SUB batch request in @req_capsule_server_pack().

At the same time, it adds a limit of reply buffer size with
BUT_MAXREPSIZE = (1000 * 1024).

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I4277974b3b0e9cd19fd0d18ae7c029cccaa9c558
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/43707
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16465 tests: update sanity test 806 to use save/restore_opencache 06/50606/3
Oleg Drokin [Tue, 11 Apr 2023 20:22:38 +0000 (16:22 -0400)]
LU-16465 tests: update sanity test 806 to use save/restore_opencache

There are existing primitives to do this, so no need to opencode them

Fixes: dfb08bbf77 ("LU-16465 llite: fix LSOM blocks for ftruncate and close")
Test-Parameters: trivial testlist=sanity env=ONLY=806
Change-Id: Ibc0d34050999bfda8f56384752ede09cacc4df91
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50606
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
12 months agoLU-16734 gss: fix lookup_user_key() bug 23/50623/4
Aurelien Degremont [Fri, 31 Mar 2023 09:30:37 +0000 (11:30 +0200)]
LU-16734 gss: fix lookup_user_key() bug

With more recent kernels, like on Ubuntu 22.04, trying to
delete some keyring resources trigger a kernel warning message
and cleaning is not successful, leading to stuck resources
and warning messages being regularly printed.

This is because Linux 5.8, in commit 8c0637e, introduced an API
change for lookup_user_key() that was not taken in account.

Update the lookup_user_key() call from _user_key() to fix it.

Change-Id: I34ef4dac3f56cbb4aac6bc5a3bad36feb66b8675
Signed-off-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50623
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Jonathan Calmels <jcalmels@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 months agoLU-16573 lnet: Check empty list in cfs_match_nid_net 76/50576/2
Chris Horn [Fri, 7 Apr 2023 16:46:29 +0000 (10:46 -0600)]
LU-16573 lnet: Check empty list in cfs_match_nid_net

cfs_match_nid_net() needs to check whether the list of range
expressions describing the address is empty. Otherwise, for numeric
based addresses, we may hit the assert in libcfs_num_match().

Test-Parameters: trivial testlist=sanity-lnet
HPE-bug-id: LUS-11480
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Id2460137607f5564751e729ee7b716d9151b5d37
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50576
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16721 lfs: Fix path2fid segfault 57/50557/5
Arshad Hussain [Thu, 6 Apr 2023 07:00:45 +0000 (03:00 -0400)]
LU-16721 lfs: Fix path2fid segfault

This patch fixes segfault when calling path2fid
under interactive mode.

Before Patch
============
lfs > path2fid /mnt/lustre/a
[0x200000401:0x1:0x0]
Segmentation fault

After Patch
============
$ lfs
lfs > path2fid /mnt/lustre/a
[0x200000401:0x1:0x0]

lfs > path2fid --parent /mnt/lustre/a
[0x200000007:0x1:0x0]/a
lfs >

Testcase sanity/154h added.

Test-Parameters: trivial testlist=sanity
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I4693e0d476e9e7f570f45fd7a31d275d549245aa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50557
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16714 utils: Clarify fd/fdv naming 46/50546/5
Patrick Farrell [Wed, 5 Apr 2023 16:27:18 +0000 (12:27 -0400)]
LU-16714 utils: Clarify fd/fdv naming

The migrate code uses the deeply opaque 'fd' and 'fdv'
(file-descriptor-volatile) to refer to the source and
destination file descriptors.

Replace these with something that tells a casual reader
what's going on.

Test-parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I56f2dfe81bcd4eff1c168f093e8580b373dc1984
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50546
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16706 kernel: update RHEL 9.1 [5.14.0-162.22.2.el9_1] 12/50512/2
Jian Yu [Mon, 3 Apr 2023 22:43:46 +0000 (15:43 -0700)]
LU-16706 kernel: update RHEL 9.1 [5.14.0-162.22.2.el9_1]

Update RHEL 9.1 kernel to 5.14.0-162.22.2.el9_1.

Test-Parameters: trivial fstype=ldiskfs \
clientdistro=el9.1 serverdistro=el9.1 testlist=sanity

Change-Id: Ib5186e6f0dcd89660b7000db7f37c0c5a29f944f
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50512
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16694 tests: replace resolveip script 91/50491/4
Timothy Day [Fri, 31 Mar 2023 04:40:38 +0000 (04:40 +0000)]
LU-16694 tests: replace resolveip script

The resolveip script can be replaced with a bash one-liner,
using getent and awk.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I207ea011e43b7b236d5082994ffb51654d8d782c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50491
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16693 lod: ENODEV on setstripe with wrong OST# 87/50487/3
Vitaly Fertman [Fri, 2 Dec 2022 19:41:21 +0000 (22:41 +0300)]
LU-16693 lod: ENODEV on setstripe with wrong OST#

ENODEV should not be returned as it is a recoverable error and
the RPC will be just resent with the same set of parameters

Also, make getstripe to print out the object list for dirs
if it is MAGIC_SPECIFIC, to see the obdidx.

HPE-bug-id: LUS-11395
Signed-off-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Change-Id: Idffbf3c2b525c4e00c4b662c948460e3735445fc
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50487
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16684 utils: reset buf_len in print_out_devices() 75/50475/6
Alex Zhuravlev [Thu, 30 Mar 2023 10:10:23 +0000 (13:10 +0300)]
LU-16684 utils: reset buf_len in print_out_devices()

so that print_out_devices() doesn't hit false buffer overflow
leading to missing devices in lctl device_list output.

Fixes: ba0d5ffc1c ("LU-9680 utils: new llapi_param_display_value().")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia0ebbd0150651d7c631348201c26ea8b3d1ff704
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50475
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 months agoLU-16672 tests: auster node.yml labels Alma and Rocky as CentOS 42/50442/5
Charlie Olmstead [Mon, 27 Mar 2023 20:08:57 +0000 (14:08 -0600)]
LU-16672 tests: auster node.yml labels Alma and Rocky as CentOS

release() assumes a node with /etc/centos-release is CentOS. This patch
removes that assumption and uses the name in the centos-release file.
Corrected the os-release code to strip off the last word if present.

Test-Parameters: trivial

Change-Id: Ia5acbce3351ca23f4d9265d1aaf8d952a2c8b502
Signed-off-by: Charlie Olmstead <charlie@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50442
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-16666 doc: remove unmaintained doxyfiles 15/50415/2
Timothy Day [Fri, 24 Mar 2023 17:24:52 +0000 (17:24 +0000)]
LU-16666 doc: remove unmaintained doxyfiles

These Doxygen related files had old urls, some using http rather
than https. Some code scanning tools will flag this. Rather than
update these, remove all of the old doxyfiles. They are very out
of date, Doxygen throws many errors when you try to use them, and
they do not seem to generate usable documentation.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I5a24d4754582ecee558c4e87385b8835d2675adc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50415
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-13340 mgs: convert class_parse_nid4 to class_parse_nid 94/50094/5
Mr NeilBrown [Wed, 12 Apr 2023 13:27:16 +0000 (09:27 -0400)]
LU-13340 mgs: convert class_parse_nid4 to class_parse_nid

All callers of class_parse_nid4() now use class_parse_nid()
and so much handle a large nid.

do_lcfg_nid() is introduced to help with this.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I502fa16871d689a8248e4243679918d58464efcd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50094
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 months agoLU-13340 mgs: change record_add_uuid() to take large nids 93/50093/8
Mr NeilBrown [Wed, 12 Apr 2023 13:24:09 +0000 (09:24 -0400)]
LU-13340 mgs: change record_add_uuid() to take large nids

This just changes the function signature and does not really
change any functionality, because it always just converts the
struct lnet_nid back to lnet_nid_t.

Future patches will make more sense of this.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ib3427ba7cfe54fc00427232835e7378922d8f616
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50093
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>