Whamcloud - gitweb
fs/lustre-release.git
13 months agoLU-980 mount: improve mount/unmount messages 11/50511/2
Andreas Dilger [Mon, 3 Apr 2023 20:31:26 +0000 (14:31 -0600)]
LU-980 mount: improve mount/unmount messages

In some cases, unmount errors are printed in multiple places, or
are expected so printing them on the console log is not necessary.

Conversely, some status messages such as mounting or unmounting the
whole target should not be rate limited.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Id55f6ee3af5ad3cbe44a380314aa4b31f6b4bad3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50511
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16609 target: top_trans_create cannot alloc memory 76/50176/5
Andrew Perepechko [Tue, 10 Jan 2023 21:53:38 +0000 (16:53 -0500)]
LU-16609 target: top_trans_create cannot alloc memory

top_trans_create() requests __GFP_IO memory allocation,
which does not allow direct reclaim. However, if the
memory shortage is temporary, direct reclaim is reasonable.
GFP_NOFS is __GFP_IO with additional reclaim bits.

Change-Id: I2c84d9d74188660063c948573780745a2b59a688
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
HPE-bug-id: LUS-11293
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50176
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: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
13 months agoLU-16732 ldiskfs: update for ext4-delayed-iput for RHEL9.1 15/50615/2
Shaun Tancheff [Wed, 12 Apr 2023 12:54:15 +0000 (07:54 -0500)]
LU-16732 ldiskfs: update for ext4-delayed-iput for RHEL9.1

ext4-delayed-iput patch does not apply cleanly to RHEL9.1
kernel.

Adjust the minor conflict in ext4_put_super()

Test-Parameters: trivial
Fixes: 616fa9b581 ("LU-15404 ldiskfs: use per-filesystem workqueues to avoid deadlocks")
HPE-bug-id: LUS-11570
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Id286904177cb444aa12e3c16e134d5acc17030f3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50615
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
13 months agoLU-930 doc: update Alex Deiter contact info 58/50458/3
Alex Deiter [Tue, 28 Mar 2023 17:05:42 +0000 (21:05 +0400)]
LU-930 doc: update Alex Deiter contact info

Update my email address to the one corporate email

Test-Parameters: trivial
Change-Id: Ic540c5a289e2862212cc0164155b5f85cbc0d96c
Signed-off-by: Alex Deiter <adeiter@tintri.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50458
Reviewed-by: Peter Jones <pjones@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16646 krb: improve lookup of user's credentials 77/50377/7
Sebastien Buisson [Wed, 22 Mar 2023 16:09:58 +0000 (17:09 +0100)]
LU-16646 krb: improve lookup of user's credentials

Rather than only looking up for user's credentials in hard-coded
FILE:/tmp/krb5cc_<uid>, try first the default ccache on the system,
and then fallback to files matching /tmp/*krb5cc* and
/run/user/<uid>/*krb5cc*.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ic2bedb4cc12e9adad0ce63bd0617b2e0ec13907e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50377
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>
13 months agoLU-16646 krb: use system ccache for Lustre services 42/50342/7
Sebastien Buisson [Fri, 17 Mar 2023 16:30:07 +0000 (17:30 +0100)]
LU-16646 krb: use system ccache for Lustre services

Instead of hard-coding a FILE credentials cache for Lustre services,
comply with the system configuration in place and use the default
ccache.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ib89fe117e9f1d937925a02c7ed786a81cd8954cb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50342
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>
13 months agoLU-16646 krb: get rid of MEMORY private cache for krb creds 41/50341/6
Sebastien Buisson [Fri, 17 Mar 2023 12:39:31 +0000 (13:39 +0100)]
LU-16646 krb: get rid of MEMORY private cache for krb creds

On client side, Kerberos credentials for root are cached in MEMORY,
but this is just in addition to the original credentials cache.
As there is no need to cache credentials twice, get rid of this
MEMORY private cache.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ifd02ee6cfafc27347b3c31e0dbbaab15190cf883
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50341
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Jonathan Calmels <jcalmels@nvidia.com>
13 months agoLU-16630 sec: improve Kerberos cross-realm trust remapping 59/50259/6
Sebastien Buisson [Fri, 10 Mar 2023 17:02:31 +0000 (18:02 +0100)]
LU-16630 sec: improve Kerberos cross-realm trust remapping

Improve Kerberos cross-realm trust remapping by leveraging existing
Kerberos mechanisms. gss_localname() can be used to resolve usernames:
it goes through the auth_to_local translation rules in krb5.conf and
thus can easily be configured by security administrators.
This new mechanism does not replace the existing and rudimentary
mapping based on /etc/lustre/idmap.conf. If /etc/lustre/idmap.conf
exists, it is used for user mapping. If not, the new mechanism based
on gss_localname() gets involved.
But we now print a warning that idmap.conf is deprecated if we detect
it is in use.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Iaaf15a757dc246673e2f412181219cc978079fab
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50259
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>
13 months agoLU-15515 contrib: epython scripts to python3 conversion 42/46442/3
Oleg Drokin [Sat, 4 Dec 2021 07:30:56 +0000 (02:30 -0500)]
LU-15515 contrib: epython scripts to python3 conversion

This is to allow them to work with newer pykdump versions
that are actually current and therefore desirable.

Test-Parameters: trivial
Change-Id: I84a1be5f24c04b61d2ab1f8d1744e3ef752ce8c6
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46442
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
13 months agoLU-13444 tests: sanity to set PTLDEBUG 94/38194/24
Alex Zhuravlev [Fri, 10 Apr 2020 08:06:38 +0000 (11:06 +0300)]
LU-13444 tests: sanity to set PTLDEBUG

otherwise any server remount reset full debug to the default
value different from full debug we want in sanity.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I2b5c5a4d2a62d11f0327686b11f9ab8f16b47b4f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/38194
Reviewed-by: Yang Sheng <ys@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>
13 months agoLU-16677 utils: add bitfields and ifdefs to wiretest 79/50479/2
Andreas Dilger [Fri, 31 Mar 2023 02:37:08 +0000 (20:37 -0600)]
LU-16677 utils: add bitfields and ifdefs to wiretest

Add CHECK_BITFIELD() for "checking" bitfields in data structures
(currently only adds a comment to wiretest.c, maybe improve later).

Add CHECK_COND_START/FINISH() for adding #ifdef/#endif conditions
into wiretest, mainly for structs not used by (upstream) client.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8ecc4bdd5b5d651faa42f65ce8ea46da003ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50479
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16652 tests: sanity-lnet test 253/254 race with discovery 69/50469/3
Chris Horn [Wed, 29 Mar 2023 21:39:33 +0000 (16:39 -0500)]
LU-16652 tests: sanity-lnet test 253/254 race with discovery

The delay rule used for test 253/254 can race with incoming discovery
PUSH (PUT + ACK). This results in an extra GET being queued on the
peer NI tx queue and subsequently dropped.

Fix this issue by restricting the delay rule to GET message type.

Test-Parameters: trivial testlist=sanity-lnet env=ONLY=253,254
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ie66cc5e00cc3718e74221b080e099958cef7a401
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50469
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
13 months agoLU-16677 utils: synchronize wirecheck.c and wiretest.c 56/50456/4
Alexander Zarochentsev [Tue, 28 Mar 2023 16:45:41 +0000 (19:45 +0300)]
LU-16677 utils: synchronize wirecheck.c and wiretest.c

wirecheck.c is not compilable and out of sync with
wiretest.c.
The patch adds forgotten changes to wirecheck.c and
replaces wiretest.c by a version generated by
"make newwiretest".

Test-Parameters: trivial
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I22cc75b02e163ce3ca743be608ec334c85129b4c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50456
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16664 build: Debian server fails building crypto.c 06/50406/2
Shaun Tancheff [Fri, 24 Mar 2023 10:34:48 +0000 (05:34 -0500)]
LU-16664 build: Debian server fails building crypto.c

When building deb files against a server built without
CONFIG_FS_ENCRYPTION it still attempts to build crypto.c
when it should not.

Test-Parameters: trivial
Fixes: 068e5f13fb ("LU-13743 build: Explicitly require encryption support")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Id1e67daa7b021fdfee49be4eb0beb2b86ca62c39
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50406
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16503 utils: add --hex-idx option for lfs getstripe 40/50340/4
Thomas Bertschinger [Fri, 17 Mar 2023 20:24:13 +0000 (16:24 -0400)]
LU-16503 utils: add --hex-idx option for lfs getstripe

The --hex-idx option for lfs getstripe and getdirstripe makes
them output OST and MDT indexes in hex.

In addition, this commit modifies the YAML parser to treat input
like "0x[0-9a-f]+" as a number so that lfs setstripe --yaml can
accept output produced by lfs getstripe --yaml --hex-idx.

Signed-off-by: Thomas Bertschinger <bertschinger@lanl.gov>
Change-Id: I98eaa9741db787bcf4516648e58e92c7520d8640
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50340
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16518 lnet: fix clang build errors 18/50318/3
Timothy Day [Tue, 28 Feb 2023 18:48:04 +0000 (18:48 +0000)]
LU-16518 lnet: fix clang build errors

LNET_PID_ANY and LNET_NID_ANY were defined outside
the range of an u64. They were moved from -1 to the
maximum value for u64.

LNET_NID_ANY was used in an instance where LNET_NET_ANY
should have been used.

Initialize a variable which could potentially be left
uninitialized.

Fixed a minor style issue.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I61c8b33d98fdaa4b7a4846d0061a483664e4f652
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50318
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-9619 misc: add Test-Parameters to git-hook 98/50298/3
Timothy Day [Tue, 14 Mar 2023 21:11:09 +0000 (21:11 +0000)]
LU-9619 misc: add Test-Parameters to git-hook

Add commented out example Test-Parameters lines
to git hook. This makes it easier to add them
in when appropriate.

Add short explaination for test parameters and
for Developer Certificate of Origin.

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

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I6af3075339f15a3c4fc4134111f47a2899005c56
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50298
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Charlie Olmstead <charlie@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-14668 tests: verify state of peer added with '--lock_prim' 49/50249/5
Serguei Smirnov [Thu, 9 Mar 2023 23:00:46 +0000 (15:00 -0800)]
LU-14668 tests: verify state of peer added with '--lock_prim'

Add peer state verification to sanity-lnet test_26:
check that peer state has corresponding bit set for a peer
created with '--lock_prim' option.

Test-Parameters: trivial testlist=sanity-lnet
Fixes: 05f7f6a0b ("LU-14668 lnet: add 'force' option to lnetctl peer del")
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Id5fde036907f9dd19a21e8e6611a070321310f0e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50249
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
13 months agoLU-16627 tests: add auster long options 37/50237/2
Timothy Day [Thu, 9 Mar 2023 04:55:26 +0000 (04:55 +0000)]
LU-16627 tests: add auster long options

Add long options to auster.

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

Address a couple of small shellcheck
warnings.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I3f1089ce6e054cd40f0afb229f9a0f0935e96d2e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50237
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Charlie Olmstead <charlie@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16563 tests: Check peer NI health after link down 88/50188/7
Chris Horn [Thu, 2 Mar 2023 17:44:44 +0000 (11:44 -0600)]
LU-16563 tests: Check peer NI health after link down

Validate whether peer NI health is decremented when a link is downed.

Test-Parameters: trivial testlist=sanity-lnet env=ONLY=303
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I5aa4a2f6efa2c0be2d7eb166b21ffab268e39941
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50188
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@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>
13 months agoLU-16608 tests: Reduce lock count in 255c 74/50174/2
Patrick Farrell [Wed, 1 Mar 2023 21:05:02 +0000 (16:05 -0500)]
LU-16608 tests: Reduce lock count in 255c

Similar to LU-10443/LU-10136, test 255c is failing due to
lock reclamation during the test, this time on GK testing.

Reducing the lock count in the test from 500 to 100 should
dramatically reduce the frequency of failures, and is
still a good test.

Test-parameters: trivial testlist=sanity env=ONLY=255c,ONLY_REPEAT=100
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I47c9a60c8425b73c53093bae34995c08c8278f2b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50174
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16221 kernel: RHEL 9.1 server support 21/49921/11
Jian Yu [Fri, 31 Mar 2023 17:43:14 +0000 (10:43 -0700)]
LU-16221 kernel: RHEL 9.1 server support

This patch makes changes to support RHEL 9.1 release
with kernel 5.14.0-162.18.1.el9_1 for Lustre server.

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

Change-Id: I4ed81f53aa6955eef06aff30a10a81f0e4124f79
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49921
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16465 llite: fix LSOM blocks for ftruncate and close 75/49675/8
Etienne AUJAMES [Wed, 18 Jan 2023 09:42:54 +0000 (10:42 +0100)]
LU-16465 llite: fix LSOM blocks for ftruncate and close

LSOM is updated on close and setattr request.
For the setattr, clients do not know the numbers blocks yet (OSTs
setattr requests have to finish). So the blocks number is set to 1 by
the server.

The close request send after a ftruncate() will wrongly update LSOM
back to its old blocks number. This is because clients do not update
the inode.i_blocks after an OST setattr.

Then the MDS will denied a client close request to update LSOM to its
correct blocks number. Only truncates are allowed to decrease the
blocks number (server side).

This patch force the client inode update at the end of an OST setattr.
And it tries (if no contention on the inode_size) to update the inode
at the end of an OST fsync or a sync IO.

Update sanity test 806/807 for this use case.

Test-Parameters: testlist=sanity env=ONLY=806,807,ONLY_REPEAT=20
Test-Parameters: fstype=zfs testlist=sanity-flr env=ONLY=70,ONLY_REPEAT=10
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: Ib1afde97071ebae56f0b413ec444403c3cdebd02
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49675
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>
13 months agoLU-16382 spec: add dependency on kernel-%1 71/49371/9
Mr NeilBrown [Mon, 12 Dec 2022 05:36:07 +0000 (16:36 +1100)]
LU-16382 spec: add dependency on kernel-%1

The SUSE OBS rpmlint tool wants all kmps to depend on the base kernel.
As RH uses didn't package naming to SUSE, these dependencies must be
conditional.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I4f8525dd2ba35b824bcfbd4097505bdfe7b11e0f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49371
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16382 spec: specify all directories. 70/49370/6
Mr NeilBrown [Mon, 12 Dec 2022 05:20:32 +0000 (16:20 +1100)]
LU-16382 spec: specify all directories.

All directories added by the package should be explicitly specified.
This allows rpm to know which package owns which directories, so it
knows when to safely remove them.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I0ed03ca09f57587d19cb350777f2ece1ed303c7e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49370
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16382 spec: add more dependencies for lustre-tests 68/49368/9
Mr NeilBrown [Mon, 12 Dec 2022 04:51:59 +0000 (15:51 +1100)]
LU-16382 spec: add more dependencies for lustre-tests

Without these packages/tools, the lustre sanity.sh test suite can fail
unexpectedly.

If dbench or iozone are absent the relevant tests are skipped rather
than failing, so that can be Recommends.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ib30731cdb11525e4f8875734314cc955f8fe1ae4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49368
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
13 months agoLU-16350 osd-ldiskfs: no_llseek removed, dquot_transfer 66/49266/13
Shaun Tancheff [Sun, 2 Apr 2023 09:09:29 +0000 (04:09 -0500)]
LU-16350 osd-ldiskfs: no_llseek removed, dquot_transfer

Linux commit v5.19-rc2-6-g868941b14441
  fs: remove no_llseek

With the removal of no_llseek, leaving .llseek set to NULL
is functionally equivalent. Only provide no_llseek if it exists.

Linux commit v5.19-rc3-6-g71e7b535b890
 quota: port quota helpers mount ids

dquot_transfer adds a user namespace argument. Provide an
osd_dquot_transfer() wrapper to discard the additional
argument for older kernels.

Test-Parameters: trivial
HPE-bug-id: LUS-11376
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: If3165aed0d7b827b90e26d9f0174137d087ce57a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49266
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16328 llite: migrate_folio, vfs_setxattr 65/49265/14
Shaun Tancheff [Sun, 2 Apr 2023 11:47:51 +0000 (06:47 -0500)]
LU-16328 llite: migrate_folio, vfs_setxattr

Linux commit v5.19-rc3-392-g5490da4f06d1
 fs: Add aops->migrate_folio

Linux commit v5.19-rc4-52-ge33c267ab70d
  mm: shrinkers: provide shrinkers with names

From Linux commit v5.19-rc5-17-g0c5fd887d2bb
  acl: move idmapped mount fixup into vfs_{g,s}etxattr()
Until Linux commit v6.0-rc3-6-g6344e66970c6
  xattr: constify value argument in vfs_setxattr()
Cast away const when required.

Linux commit v5.19-10313-geba2d3d79829
  get rid of non-advancing variants
iov_iter_get_pages_alloc2() replaces iov_iter_get_pages_alloc()

Test-Parameters: trivial
HPE-bug-id: LUS-11358
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Id1fa6db94172c0a61008ba4b066907950bdd6473
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49265
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16327 llite: read_folio, release_folio, filler_t 99/49199/20
Shaun Tancheff [Sun, 2 Apr 2023 11:45:49 +0000 (06:45 -0500)]
LU-16327 llite: read_folio, release_folio, filler_t

Linux commit v5.18-rc5-221-gb7446e7cf15f
  fs: Remove aop flags parameter from grab_cache_page_write_begin()
flags have been dropped from write_begin() and
grab_cache_page_write_begin()

Linux commit v5.18-rc5-241-g5efe7448a142
  fs: Introduce aops->read_folio
Provide a ll_read_folio handler around ll_readpage

Linux commit v5.18-rc5-280-ge9b5b23e957e
  fs: Change the type of filler_t
Affects read_cache_page, provides a wrapper for read_cache_page
and wrappers for filler functions

Linux commit v5.18-rc5-282-gfa29000b6b26
  fs: Add aops->release_folio
Provide an ll_release_folio function based on ll_releasepage

Test-Parameters: trivial
HPE-bug-id: LUS-11357
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ibd4ec1133c80cd0eb8400c4cd07b50e421dd35c5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49199
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16217 tests: Add routed lst test 00/48800/6
Chris Horn [Tue, 4 Oct 2022 10:53:48 +0000 (05:53 -0500)]
LU-16217 tests: Add routed lst test

Modify sanity-lnet test_220 to perform two quick LST tests.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-lnet env=ONLY=220
HPE-bug-id: LUS-10279
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I6b9ce85fcd232eb20c5b3e1d25eeca73856f9a82
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48800
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-11785 tests: fix conf-sanity/98 mount check on 64K page 77/48177/10
Kevin Zhao [Fri, 28 Oct 2022 02:05:24 +0000 (10:05 +0800)]
LU-11785 tests: fix conf-sanity/98 mount check on 64K page

This patch fix the mount option length check expectation
fail on 64K page. Since the maxopt_len is the minmium
value of page_size or 64K page_size, but the test cases
only hard code the length of option to the 4K one. This
patch add the mount options according to the page size.

Test-Parameters: trivial testlist=conf-sanity env=ONLY=98
Test-Parameters: testlist=conf-sanity env=ONLY=98 clientarch=aarch64 clientdistro=el8.6
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
Change-Id: Icdeb8b73308056e216c3f4ce71907b0c928d2c30
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48177
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
13 months agoLU-11047 mdt: standardize mdt object locking 64/40764/46
Lai Siyao [Fri, 23 Sep 2022 02:45:19 +0000 (22:45 -0400)]
LU-11047 mdt: standardize mdt object locking

* object LOOKUP lock should be taken from parent MDT if object and
  its parent are located on different MDTs, but current mdt object
  locking doesn't handle this explicitly, instead it implies its
  parent is on local MDT.
* PDO locking should be put into a separate function.
* with the above changes, mdt_object_lock_internal() becomes a simple
  wrapper: it calls mdt_remote_object_lock_try() if object is remote,
  and mdt_fid_lock() otherwise.
* the MDT object locking functions are as below:
    . mdt_object_lock(): lock object, this is used in most places, and
normally lock ibits doesn't contain LOOKUP, unless the caller
knows its parent is on the same MDT.
    . mdt_object_check_lock(): lock object with LOOKUP and other
ibits, it needs to check whether parent is on different MDT,
if so, take LOOKUP lock on parent MDT, and then lock other
ibits on child MDT.
    . mdt_parent_lock(): take parent UPDATE lock with specific mode,
if parent is local, take PDO lock, otherwise take regular
lock.
    . mdt_object_stripes_lock(): lock object which should be local,
and if it's a striped directory, lock its stripes. This is
called in operations which modify dir object and its stripes.
    . mdt_object_lock_try(): lock object with trybits, the trybits
contains optional inode lock bits that can be granted. This is
called by getattr/open to fetch more inode lock bits to
client, and is also called by dir migration to lock link
parent in non-block mode to avoid deadlock.
    . rename/migrate source object are locked in specific functions,
because source object and its parent may be located on
        different remote MDTs.

Test-Parameters: mdscount=2 mdtcount=4 testlist=racer,racer,racer
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I8225cbee4a1f5db8f77399866061f12e0a4cbb47
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/40764
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-14139 statahead: batched statahead processing 20/40720/37
Qian Yingjin [Fri, 20 Nov 2020 10:38:02 +0000 (18:38 +0800)]
LU-14139 statahead: batched statahead processing

Batched metadata processing can get a big performance boost.
In this patch, it implements a batched statahead mechanism which
can also increase the performance for a directory traverse or
listing such as the command 'ls'.

For the batched statahead, one batch getattr() RPC equals to
'N' normal lookup/getattr RPCs. It can pack a number of dentry
name getting from the readdir() call and prepared lock handles
one client side lock namespace into one large batched RPC
transfering via bulk I/O to obtain ibits DLM locks and
associated attributes for a lot of files in one blow.
When MDS receives a batched getattr() RPC, it executes the sub
requests in it one by one serially.

A tunable parameter named "statahead_batch_max" is defined, it
means the maximal items can be batched and processed within one
aggregate RPC. Once the number of sub requests exceeds this
predefined limit, it will pack and trigger the batched RPC.
The batched RPC will also be triggered explictly when the
readdir() call comes to the end position of the directory or
the statahead thread exits abnormally.

Batched metadata processing can get a big performance boost.
The mdtest performance results without/with this patch series are
as follow:
mdtest-easy-stat      720.562369 kIOPS : time 118.695 seconds
mdtest-easy-stat     1218.290192 kIOPS : time 70.656 seconds

In this patch, we set statahead_batch_max=0 and disabled batched
statahead by default. It will enable accordingly once some
subsequent fixes about batched RPC have been merged.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I5a80c2c377093dc8b8e21341f440e3038f017ca8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/40720
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
13 months agoLU-11404 llite: only first sync to MDS matter 75/33175/19
Alex Zhuravlev [Thu, 20 Oct 2022 05:27:48 +0000 (08:27 +0300)]
LU-11404 llite: only first sync to MDS matter

fsync() is supposed to sync metadata and data, but given file's
layout the only first MDS_SYNC matters to ensure the file creation
has been committed, everything else go to OSTs (data and attributes)
also, uid/gid/mode, EAs and ACLs must be subject to sync.

Change-Id: Iaa9095a9ace319a6dfa8840313dc536e39786847
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/33175
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>
13 months agoLU-10391 ptlrpc: change cc_nid in nrs to be struct lnet_nid 00/50100/6
Mr NeilBrown [Thu, 26 May 2022 04:34:10 +0000 (14:34 +1000)]
LU-10391 ptlrpc: change cc_nid in nrs to be struct lnet_nid

switch to struct lnet_nid and adjust accordingly.

Note the return value of nrs_crrn_cmpfn() is changed from a bool to
"0 or negative error" to make it more clear which is success and which
is failure.  The end result is the same.

Test-Parameters:trivial testlist=sanityn envdefinitions=ONLY=77b
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I3e5f2e9d88d7aeccb68ebfb4c814cc4e388cbc42
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50100
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Nikitas Angelinas <nikitas.angelinas@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
13 months agoLU-10391 mgs: fix lots of white-space irregularities 91/50091/11
Mr NeilBrown [Tue, 21 Mar 2023 23:08:29 +0000 (19:08 -0400)]
LU-10391 mgs: fix lots of white-space irregularities

In preparation for changing the code, fix lots of white-space issues
in mgs_llog.c

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I7fb40a473e3e4709778339b773988ec7079d20d8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50091
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: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-10391 obdclass: change class_match_nid to take lnet_nid 90/50090/8
Mr NeilBrown [Tue, 10 May 2022 04:09:08 +0000 (14:09 +1000)]
LU-10391 obdclass: change class_match_nid to take lnet_nid

class_match_nid now takes struct lnet_nid rather than lnet_nid_t.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I09c178a6671ee3e603d261579537ff10881d8124
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50090
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-10391 lustre: introduce class_parse_nid() 89/50089/8
Mr NeilBrown [Tue, 10 May 2022 03:29:49 +0000 (13:29 +1000)]
LU-10391 lustre: introduce class_parse_nid()

class_parse_nid() and class_parse_nid_quiet() can be used to parse
struct lnet_nid including nids with ipv6 addresses.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I82b85f183e91b7b639f58afe5b6c4f90a6b8564c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50089
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-10391 lustre: rename class_parse_nid to class_parse_nid4 88/50088/8
Mr NeilBrown [Tue, 10 May 2022 02:53:02 +0000 (12:53 +1000)]
LU-10391 lustre: rename class_parse_nid to class_parse_nid4

Use the name "nid4" for class_parse_nid(), class_parse_nid_quiet(),
parse_nid() and CLASS_PARSE_NID.  This will allow a new
class_parse_nid which handle larger nids.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I2766634ac55ae7bd30c72549decc1cfd99471bfd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50088
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-10391 obdclass: change class_add/check_uuid to large nid 86/50086/8
Mr NeilBrown [Mon, 9 May 2022 04:02:18 +0000 (14:02 +1000)]
LU-10391 obdclass: change class_add/check_uuid to large nid

class_add_uuid() and class_check_uuid() are changed to take
a struct lnet_nid* rather than a __u64 (aka lnet_nid_t).

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Iffb7aa830ca8da737fd989b11522a50f2e23effd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50086
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-10391 lnet: change LNetAddPeer() to take struct lnet_nid 85/50085/8
Mr NeilBrown [Wed, 29 Mar 2023 00:19:02 +0000 (20:19 -0400)]
LU-10391 lnet: change LNetAddPeer() to take struct lnet_nid

Rather than an array of lnet_nid_t, LNetAddPeer now takes an array of
struct lnet_nid.

The array passed is *always* from struct uuid_nid_data, so that data
structure is changed to store struct lnet_nid.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I0931c1dbbe50fcd7970bba6b68464eea14b1d25e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50085
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
13 months agoLU-16339 quota: notify OSTs until lge_qunit_nu is set 28/49228/4
Sergey Cheremencev [Wed, 9 Feb 2022 11:53:51 +0000 (14:53 +0300)]
LU-16339 quota: notify OSTs until lge_qunit_nu is set

There is a window when locks are not granted yet, but
lqe is set to qmt_reba_list to send updates to OSTs.

t1: lqe_init()->qmt_setup_lqe_gd->qmt_seed_glbe()
t1: lqe_init()->qmt_setup_lqe_gd->qmt_id_lock_notify()
t2: qmt_glimpse_lock() lustre-QMT0000: no granted locks to send glimpse
t1: ldlm_lock_enqueue()->ldlm_granted_list_add_lock() ...

If lge_qunit_nu was set to 1 in qmt_seed_glbe and appropriate qunit
is equal to the least_qunit, new qunit won't be sent to OSTs
and finally lqe_revoke will not be set causing endless -115 errors.
The fix calls qmt_id_lock_notify into qmt_dqacq0 for an lqe that has
set lge_qunit_nu or lge_edquot_nu.

Add test 85 into sanity-quota to check that write
doesn't hung if qunit initial value is equal to
the least_qunit due to small block hard limit.

HPE-bug-id: LUS-10711
Change-Id: Icd1ac29beab87c0ebf00bcb20b25c33b771b74c1
Signed-off-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-on: https://es-gerrit.dev.cray.com/160034
Tested-by: Jenkins Build User <nssreleng@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49228
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>
13 months agoLU-16634 llite: move common ioctl code to ll_iocontrol() 35/50335/2
Andreas Dilger [Mon, 20 Mar 2023 01:40:41 +0000 (19:40 -0600)]
LU-16634 llite: move common ioctl code to ll_iocontrol()

Move common ioctl cases from ll_dir_ioctl() and ll_file_ioctl()
into ll_iocontrol() to avoid duplicate code.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1a0d2f839949debf346aa15c65b0f407e3ce7057
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50335
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: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16634 obdclass: improve iocontrol error messages 34/50334/4
Andreas Dilger [Sun, 19 Mar 2023 23:09:24 +0000 (17:09 -0600)]
LU-16634 obdclass: improve iocontrol error messages

Add consistent CDEBUG() messages for iocontrol handlers.
Add helpers OBD_IOC_ERROR() and OBD_IOC_DEBUG() to print the
iocontrol parameters consistently in case of an error.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1a0d2f839949debf346aa15c65b0f407e2ce7057
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50334
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: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16634 misc: remove unnecessary ioctl typecasts 33/50333/2
Andreas Dilger [Sun, 19 Mar 2023 19:58:04 +0000 (13:58 -0600)]
LU-16634 misc: remove unnecessary ioctl typecasts

Declare "void __user *uarg" in the ioctl handling code so
that it isn't typecast on every access in the ioctl handler.
Unnecessary typecast risks hiding compiler warnings and bugs.

Convert indentation to tabs for lines previously using spaces.
Change local variable declarations to use only a single space.

Test-Parameters: trivial
Change-Id: I1a0d2f839949debf346aa15c65b0f407e1ce7057
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50333
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: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-10729 tests: replay-dual/23d to wait 23/45623/17
Alex Zhuravlev [Fri, 19 Nov 2021 19:52:28 +0000 (22:52 +0300)]
LU-10729 tests: replay-dual/23d to wait

replay-dual/23d simulates a dropped reply for the executed
update, but previous tests can break this:
 - the update modifies remote llog
 - there can be another uptdate to that remote log
   (from the previous tests)
 - fail_loc (OBD_FAIL_UPDATE_OBJ_NET) is applied to the
   old update
 - the 23d's update gets stuck

so the test has to ensure there is no pending/in-flight
updates.

Test-Parameters: trivial testlist=replay-dual mdscount=2 mdtcount=4
Test-Parameters: testlist=replay-dual fstype=zfs mdscount=2 mdtcount=4
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I3b60468d1f6f467006d5872ec62b81f57fa0423e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/45623
Reviewed-by: Alex Deiter <alex.deiter@gmail.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>
13 months agoNew tag 2.15.55 2.15.55 v2_15_55
Oleg Drokin [Wed, 5 Apr 2023 04:38:10 +0000 (00:38 -0400)]
New tag 2.15.55

Change-Id: I0329a4875ca7925bc53cb4c09ff882b9ff73348d
Signed-off-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16655 scrub: upgrade scrub_file from 2.12 format 55/50455/6
Alexander Zarochentsev [Tue, 28 Mar 2023 16:00:09 +0000 (19:00 +0300)]
LU-16655 scrub: upgrade scrub_file from 2.12 format

Scrub_file->sf_oi_count has different offsets in Lustre-2.10,
Lustre-2.12, and Lustre-2.15 due to unintended format changes.
Lustre-2.15 reads sf_oi_count from offset of sf_success_count
and may initialize incorrect number of OI files, and not be
able to do FID lookups for existing filesystem objects.

Fixes: a114f6b8c5 ("LU-13344 servers: change request timeouts to s32")
Fixes: 4c2f028a95 ("LU-9019 osd-ldiskfs: migrate to 64 bit time")
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: Id7c8bd555229405d604456c48447f01fd121aca9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50455
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: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
13 months agoLU-16676 build: always include llcrypt sources 46/50446/2
Sebastien Buisson [Tue, 28 Mar 2023 07:50:35 +0000 (09:50 +0200)]
LU-16676 build: always include llcrypt sources

llcrypt sources should always be included in source packages.
Binary build will decide whether to include llcrypt in the build
objects or not.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I726d7deb27687bffebce55f6c09d578e6290aac7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50446
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: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16668 tests: sanity-quota/75 add missing param to quota_error 24/50424/2
Arshad Hussain [Mon, 27 Mar 2023 06:11:31 +0000 (11:41 +0530)]
LU-16668 tests: sanity-quota/75 add missing param to quota_error

quota_error() takes three parameters. Add missing parameters
to one of the instance of quota_error() which only two params
were passed.

Test-Parameters: trivial testlist=sanity-quota env=ONLY=75
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I660a4be2d65e7800812db1817614dcb1b38ee483
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50424
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-9859 libcfs: move RESV_PORT definitions to lnet/lib-lnet.h 12/50412/3
Mr. NeilBrown [Fri, 24 Mar 2023 17:04:50 +0000 (13:04 -0400)]
LU-9859 libcfs: move RESV_PORT definitions to lnet/lib-lnet.h

These are network related and only used in lnet, so move
to lib-lnet.h

Test-Parameters: trivial
Signed-off-by: Mr. NeilBrown <neilb@suse.de>
Change-Id: Idcac5eb8a9c9ee255b167f01bc873aa6bbfd09dd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50412
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>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
13 months agoLU-16662 autoconf: fix configure test compile for CONFIG_KEYS 99/50399/3
Xinliang Liu [Fri, 24 Mar 2023 07:16:10 +0000 (07:16 +0000)]
LU-16662 autoconf: fix configure test compile for CONFIG_KEYS

This fixes below configure error on Linux v5.19+:
$ ./configure --disable-server
...
checking whether to enable gss keyring backend... yes
checking if Linux kernel was built with CONFIG_KEYS in or as module...
no
configure: WARNING: GSS keyring backend requires that CONFIG_KEYS be
enabled in your kernel.
checking for keyctl_search in -lkeyutils... yes
configure: error: Cannot enable gss_keyring. See above for details.
$ grep CONFIG_KEYS -rn /boot/config-*
6884:CONFIG_KEYS=y

For in-tree IB support and without passing Linux src path when run
./configure, the LINUX_OBJ maybe just a soft link to O2IBPATH, they
are pointing to the same dir. E.g.:
O2IBPATH='/usr/src/kernels/6.1.8-3.0.0.7.oe1.aarch64'
LINUX_OBJ='/lib/modules/6.1.8-3.0.0.7.oe1.aarch64/build'
$ ls -l /lib/modules/6.1.8-3.0.0.7.oe1.aarch64/build
lrwxrwxrwx 1 root root 42 Feb  7 00:00
/lib/modules/6.1.8-3.0.0.7.oe1.aarch64/build ->
/usr/src/kernels/6.1.8-3.0.0.7.oe1.aarch64
In this case, current configure will put kernel's Module.symvers to
variable KBUILD_EXTRA_SYMBOLS. This should be avoided after kernel
v5.19 which contains commit "b8422711080f modpost: make multiple export
error". This making multiple export symbol as an error from a warning
which can be seen in the config.log:
...
ERROR: modpost: vmlinux: 'init_uts_ns' exported twice. Previous export
was in vmlinux
...

Test-Parameters: trivial
Change-Id: I35295b3acc7fffb93716362f5d8c659eb922afcb
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50399
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
13 months agoLU-16661 build: add Recommends and Suggests for Debian 96/50396/5
Andreas Dilger [Fri, 24 Mar 2023 00:13:20 +0000 (18:13 -0600)]
LU-16661 build: add Recommends and Suggests for Debian

Add Suggests: bash-completion for lustre-client-tools and
lustre-server-tools for lctl and lfs completion.

Move perl from Depends to Recommends, since there are only some
uncommonly used tools (llstat, llobdstat) that are using perl.

Add python3 to Recommends for lustre-server-tools for lljobstat.
Remove python3 from lustre-iokit since it isn't used anywhere.

Change Maintainer for Debian packages to the lustre-devel mailing
list, instead of someone who hasn't worked on Lustre for 6 years.

Increase minimum kernel version for client from 2.6.32 to 3.10.

Improve package descriptions slightly.

Test-Parameters: trivial testlist=runtests clientdistro=ubuntu2204
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I43248cc78ae6a47ad77817c27ba11de25b3ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50396
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Thomas Stibor <thomas@stibor.net>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
13 months agoLU-15740 tests: scale fs_log_size by OSTCOUNT 19/50419/8
Andreas Dilger [Fri, 24 Mar 2023 23:09:44 +0000 (17:09 -0600)]
LU-15740 tests: scale fs_log_size by OSTCOUNT

The fs_log_size "free space skew" was being scaled by MDSCOUNT,
but in fact this parameter is only ever used to compare the OST
free space usage, so the OSTCOUNT should be used when scaling it.

It is likely that the skew is actually caused by blocks allocated
by OST object directories and not llogs (no llogs used on OSTs for
many years), but it isn't worthwhile to rename the function.

Test-Parameters: trivial testlist=replay-single env=ONLY="20b 89"
Test-Parameters: testlist=runtests clientdistro=ubuntu2204
Test-Parameters: testlist=replay-ost-single env=ONLY="6 7"
Test-Parameters: testlist=sanity-sec env=ONLY="16-22
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I97f05b10fa7ec367534b5bdce09feae5e93ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50419
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
13 months agoLU-16516 tests: ONLY and ONLY_REPEAT improvements 95/50395/3
Andreas Dilger [Thu, 23 Mar 2023 21:38:54 +0000 (15:38 -0600)]
LU-16516 tests: ONLY and ONLY_REPEAT improvements

ONLY_REPEAT=N did not work if multiple subtests were selected via
a "base" test number (e.g. "ONLY=118") and that resulted in more
than one subtest being run (e.g. ONLY_118a=true, ONLY_118b=true, ...)
Since the run_one() caller of run_one_logged() is already checking
whether the test should be run or not, don't repeat that check
for ONLY_REPEAT.

Allow ONLY_REPEAT to be used when multiple subtests are specified
via ONLY, even if the subtests are not explicitly listed.

Allow tests in ONLY, EXCEPT, ALWAYS_EXCEPT, and SLOW to be separated
by '+', or ',' in addition to space-separated test numbers.  That
avoids issues with handling space-separated test lists in the shell
or when specified via Test-Parameters (need to use '+' in that case).

Test-Parameters: trivial testlist=sanity env=ONLY=118,ONLY_REPEAT=5
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ieac578c098ae76994a211c7db094dd99923bcc8c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50395
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16163 tests: skip racer_on_nfs for NFSv3 85/50385/2
Andreas Dilger [Wed, 22 Mar 2023 23:42:10 +0000 (17:42 -0600)]
LU-16163 tests: skip racer_on_nfs for NFSv3

This test is continually failing and nobody is available to
fix it (it may be an NFS bug or a Lustre bug, unsure).

This same test passes on NFSv4 regularly.

Test-Parameters: trivial testlist=parallel-scale-nfsv3
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I7d9ac390c26aa8478dd35457ba20061747c2b92e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50385
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Sarah Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-9859 libcfs: discard MKSTR() macro 76/50376/2
Mr. NeilBrown [Wed, 22 Mar 2023 14:33:37 +0000 (10:33 -0400)]
LU-9859 libcfs: discard MKSTR() macro

This is only used for tracing when some strings might
be NULL.  NULL strings are not a problem for tracing,
vnsprintf() will report them as "(null)" which is probably
better (easier to parse) than an empty string.

Linux-commit: dd0393a5f29633f0e3d52e4c26ae4123c873c016

Test-Parameters: trivial
Change-Id: Ia305ea0d0dc05602a03dea589f928b6a599ee55e
Signed-off-by: Mr. NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50376
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>
13 months agoLU-16643 lnet: Health logging improvements 05/50305/7
Chris Horn [Wed, 23 Nov 2022 17:28:45 +0000 (10:28 -0700)]
LU-16643 lnet: Health logging improvements

LNet health activity can generate noise in console logs. The NI/Peer
NI recovery pings could be expected to fail and the related messages
from lnet_handle_recovery_reply() are generally redundant.

Improve this logging by having the lnet_monitor_thread() provide a
summary of NIs in recovery.

Another useful metric in spotting network trouble is if we have
messages exceeding their deadline. We do not currently log this
information. Keep a count of messages that have exceeded their
deadline and track the total excess time. The lnet_monitor_thread()
will then provide a summary of the number of messages and their
average excess time at a regular interval. These stats are then
reset when the monitor thread prints this information to the console.

Because NIs can be in recovery for extended periods of time, the
interval of console updates will increase from 1 to 5 minutes.
The interval is reset when it is detected that there are no longer any
NIs in recovery and there haven't been any messages past their
deadline since the last console update.

Test-Parameters: trivial
HPE-bug-id: LUS-11500
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I4ffffd0412806184282178ce0aca3073dd30d7e0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50305
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16260 lnet: enforce a positive minimum for lnd_timeout 36/50236/3
Frank Sehr [Thu, 9 Mar 2023 01:36:37 +0000 (17:36 -0800)]
LU-16260 lnet: enforce a positive minimum for lnd_timeout

Set the lnet_lnd_timeout to at least 1 second. The lnd_timeout is
calculated using the following formula:
max((lnet_transaction_timeout - 1) / (lnet_retry_count + 1), 1U);

Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: I64fd133974bd1f60ff3d7354bf9e0990c56d4c04
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50236
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16529 test: wait quota synced on quota slaves 97/50197/5
Hongchao Zhang [Wed, 1 Mar 2023 00:48:28 +0000 (19:48 -0500)]
LU-16529 test: wait quota synced on quota slaves

Check and wait the quota setting to be synchronized on
quota slaves before running actual sanity-quota test_84.

Test-Parameters: trivial testlist=sanity-quota env=ONLY=84,ONLY_REPEAT=100
Fixes: a2fd4d3aee ("LU-15880 quota: fix insane grant quota")
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: I7752bff33f24d1d38dc340b2addbfc98d6f7c857
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50197
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
13 months agoLU-13485 build: fscrypt checks can be run in parallel 10/50110/6
Shaun Tancheff [Fri, 24 Mar 2023 10:49:24 +0000 (05:49 -0500)]
LU-13485 build: fscrypt checks can be run in parallel

Run some fscrypt checks in parallel.

Test-Parameters: trivial
HPE-bug-id: LUS-8584
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ib4b882105958cdc6e47997992e1e978cfa01adf5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50110
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
13 months agoLU-16518 utils: fix unused function errors 01/49901/5
Timothy Day [Fri, 3 Feb 2023 03:32:59 +0000 (03:32 +0000)]
LU-16518 utils: fix unused function errors

Clang has default errors related to unused functions.
The errors related to 'fid_flatten' and 'fid_flatten32'
were resolved by moving the definitions of these
functions to the 'lustre_fid' header. This is a better
place for them, since they are small 'static inline'
functions and has the added benefit of cutting down
code duplication.

The error related to the 'static inline' function
'list_replace_init' was resolved by moving it to
'ofd_access_batch.h'.

The userspace implementation of 'fid_hash' has been
moved to the 'lustreapi.h' header.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I9714a2f36910c871c0a4579cf9400cb9ba72ec27
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49901
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-13485 libcfs: Remove unused iter_type check 91/48091/7
Shaun Tancheff [Fri, 23 Sep 2022 05:27:14 +0000 (12:27 +0700)]
LU-13485 libcfs: Remove unused iter_type check

The iter_type member check is not used, remove it.

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I48d536a27738e73314feb88317d41d8479c72528
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48091
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>
13 months agoLU-15660 statahead: statahead thread doesn't stop 73/47673/12
Yang Sheng [Fri, 17 Jun 2022 12:30:34 +0000 (20:30 +0800)]
LU-15660 statahead: statahead thread doesn't stop

Add a barrier to ensure sai_task changing can be seen
when access it without locking. Else the statahead
thread could sleep forever since wake_up was lost.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I211e99f1bdddaaaf028a205658f603fda034d389
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47673
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>
13 months agoLU-13485 lnet: Parallel configure tests for lnet 68/38368/35
Shaun Tancheff [Mon, 3 Oct 2022 05:10:14 +0000 (12:10 +0700)]
LU-13485 lnet: Parallel configure tests for lnet

Transform the compile tests in lustre-lnet to run in parallel
Also fixes the generated Makefile to work with MOFED and in-kernel
OFED.

configure build times on an 8 core 8G vm vs current serial:

             serial      parallel
            --------     --------
    real    8m27.824s    1m28.375s
    user    5m29.448s    2m11.558s
    sys     3m48.258s    0m51.763s

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I4f0cb8584e1c3149ec3f005dd55fed0c47b50472
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/38368
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-6142 build: add SPD/GPL license to build files 47/50347/3
Timothy Day [Tue, 21 Mar 2023 03:31:05 +0000 (03:31 +0000)]
LU-6142 build: add SPD/GPL license to build files

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

Convert spaces to tabs.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id02218aa5b435bc0de96a39d3daa53a83a51c857
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50347
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
13 months agoLU-16371 ldlm: clear lock converting flag on resource cleanup 39/49339/3
Bobi Jam [Wed, 7 Dec 2022 16:03:20 +0000 (00:03 +0800)]
LU-16371 ldlm: clear lock converting flag on resource cleanup

During resource cleanup clear lock's converting flag so that
ldlm_cli_cancel() won't erroneously trip the assertion, the assertion
is used for normal lock revoke callbacks.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I1be4d7f16dbc7e026b460fd5358a0fe509b97a59
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49339
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>
13 months agoLU-16658 tests: disable performance-sanity test_6 86/50386/2
Andreas Dilger [Wed, 22 Mar 2023 23:59:27 +0000 (17:59 -0600)]
LU-16658 tests: disable performance-sanity test_6

This test is likely failing due to a bug in mdsrate, which is no
longer actively developed.  It should be replaced by mdtest.

Test-Parameters: trivial testlist=performance-sanity
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I05378fb75ed30e56983f4668c03725824ad5a8ab
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50386
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sarah Liu <sarah@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16634 build: improve checkpatch warnings 31/50331/8
Andreas Dilger [Sat, 18 Mar 2023 01:03:49 +0000 (19:03 -0600)]
LU-16634 build: improve checkpatch warnings

Change checkpatch.pl to allow RETURN/GOTO as "end of switch case".

Improve CERROR/CWARN/LCONSOLE/CDEBUG message checking/warning to
print more useful message style advice than just "think hard".

Allow "DFID|DOSTID" within long error strings without complaint.

Add a spelling.txt rule to warn if version checks are added in a
test for future versions.  This is mostly useful for maintenance
branches when patches are being backported with test cases.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1a0d2f839949debf346aa15c65b0f407e0ce7057
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50331
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-15404 ldiskfs: use per-filesystem workqueues to avoid deadlocks 54/50354/3
Andrew Perepechko [Tue, 21 Mar 2023 12:30:58 +0000 (08:30 -0400)]
LU-15404 ldiskfs: use per-filesystem workqueues to avoid deadlocks

Calling flush_scheduled_work() under s_umount is dangerous and may
cause deadlocks. This patch backports the fix from
https://lore.kernel.org/all/20220402084023.1841375-1-anserper@ya.ru/

Fixes: e239a14001 ("LU-15404 ldiskfs: truncate during setxattr leads to kernel panic")
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Change-Id: Ia191b70166f94f34e96a282ec18bd8650871e108
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50354
Reviewed-by: Alex Zhuravlev <bzzz@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>
13 months agoLU-16683 tests: fix sanity-sec test_61 for SSK 76/50476/4
Sebastien Buisson [Thu, 30 Mar 2023 11:42:58 +0000 (13:42 +0200)]
LU-16683 tests: fix sanity-sec test_61 for SSK

When SHARED_KEY is in use, nodemap specific shared keys must be loaded
explicitly because sanity-sec test_61 defines a nodemap dedicated to
the client.

Fixes: a7222127c7 ("LU-16642 tests: improve sanity-sec test_61")
Test-Parameters: trivial
Test-Parameters: testlist=sanity-sec env=ONLY=61
Test-Parameters: testlist=sanity-sec env=SHARED_KEY=true,ONLY=61
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I206205496352b6f36341c8b962bb7de4b71541d5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50476
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>
13 months agoLU-16515 tests: disable sanity test_118c/118d 70/50470/2
Andreas Dilger [Wed, 29 Mar 2023 21:39:50 +0000 (15:39 -0600)]
LU-16515 tests: disable sanity test_118c/118d

Temporarily disable sanity test_118c and test_118d until there is
a fix available, since this is failing a large fraction of tests.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I16ebbc470a126bb99b5c3ecdf93407d6b73ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50470
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16642 tests: improve sanity-sec test_61 17/50317/2
Sebastien Buisson [Thu, 16 Mar 2023 16:59:59 +0000 (17:59 +0100)]
LU-16642 tests: improve sanity-sec test_61

Improve sanity-sec test_61 by using a client-specific nodemap rather
than the default nodemap.

Test-Parameters: trivial testlist=sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ie0c9e381e42a93d89558947dee9a60537cf01e65
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50317
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>
13 months agoLU-16639 misc: cleanup concole messages 83/50283/7
Andreas Dilger [Mon, 13 Mar 2023 22:08:30 +0000 (16:08 -0600)]
LU-16639 misc: cleanup concole messages

The lprocfs_job_cleanup() was not properly dropping all jobstats
from the hash table and printing errors from job_stat_exit() at
unmount.  Ensure all stats are "old enough" when @clear is set.

Change early libcfs cfs_cpu_init() messages from CERROR() to
pr_err() to avoid circular dependencies on libcfs setup before
printing an error message to the console during module init.

Test-Parameters: trivial
Fixes: ea2cd3af7b ("LU-11407 obdclass: add start time to stats files")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ide3f502103392a79419cc1836200bf5a1a3ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50283
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16589 tests: add sanity/31l to test ln command 65/50265/2
Andreas Dilger [Mon, 13 Mar 2023 04:43:53 +0000 (21:43 -0700)]
LU-16589 tests: add sanity/31l to test ln command

This patch adds a new subtest sanity/31l to test
hard-linking a file to a target direcory that has
trailing "/".

The subtest will be skipped if the coreutils version
>= 8.31 and kernel version < 5.18 because the
coreutils commit v8.30-18-g571f63f5010b reveals
a kernel issue, which is fixed by kernel commit
v5.18-rc2-188-gb3d4650d82c7.

Test-Parameters: trivial clientdistro=el7.9 env=ONLY=31l testlist=sanity
Test-Parameters: trivial clientdistro=el8.7 env=ONLY=31l testlist=sanity
Test-Parameters: trivial clientdistro=el9.1 env=ONLY=31l testlist=sanity
Test-Parameters: trivial clientdistro=el9.0 env=ONLY=31l testlist=sanity
Test-Parameters: trivial clientdistro=sles15sp4 env=ONLY=31l testlist=sanity
Test-Parameters: trivial clientdistro=sles15sp3 env=ONLY=31l testlist=sanity

Change-Id: I45d7c277a37fa538d5137150bfc7ba1704052873
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50265
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-930 docs: fix whatis output 64/50264/4
Timothy Day [Sun, 12 Mar 2023 15:19:54 +0000 (15:19 +0000)]
LU-930 docs: fix whatis output

The ".SH NAME" section has to be formatted in a certain
way for whatis and apropos to work correctly. Otherwise,
users will just see "(unknown subject)".

This patch fixes issues for all man pages.

Add a couple of one-line man page redirects.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ie11eb921c84ff9ad19b50973c616f6fb6df1f461
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50264
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>
13 months agoLU-16632 tests: more margin of error for sanity/56xh 62/50262/4
Timothy Day [Sat, 11 Mar 2023 22:55:09 +0000 (22:55 +0000)]
LU-16632 tests: more margin of error for sanity/56xh

Give sanity test_56xh more time to migrate files inside the
VMs before failing.

Also, fix a typo.

Test-Parameters: trivial testlist=sanity env=ONLY=56xh,ONLY_REPEAT=100
Fixes: 55968bfabe ("LU-13482 utils: bandwidth limit for lfs migrate")
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: If89c8c3ee113c8a14d4c0463c7bb79e353130c08
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50262
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
13 months agoLU-16633 obdclass: fix rpc slot leakage 61/50261/12
Alex Zhuravlev [Fri, 10 Mar 2023 17:47:05 +0000 (20:47 +0300)]
LU-16633 obdclass: fix rpc slot leakage

obd_get_mod_rpc_slot() can race with obd_put_mod_rpc_slot():
finishing wait_woken() resets WQ_FLAG_WOKEN (which is set
when the corresponding thread gets a slot incrementing
cl_mod_rpcs_in_flight. then another thread execting
__wake_up_locked_key() may find that wq_entry again and call
claim_mod_rpc_function() one more time again incrementing
cl_mod_rpc_in_flight. thus it's incremented twice for a
single obd_get_mod_rpc_slot().

 #1: obd_get_mod_rpc_slot() #2: obd_put_mod_rpc_slot()
flags &= ~WQ_FLAG_WOKEN
list_add()
wait_woken()
schedule claim_mod_rpc_function()
cl_mod_rpcs_in_flight++
wake_up()

flags &= ~WQ_FLAG_WOKEN

#3: obd_put_mod_rpc_slot()
claim_mod_rpc_function()
cl_mod_rpcs_in_flight++
wake_up()
list_del()

the patch introduces a replacement for WQ_FLAG_WOKEN which is never
reset once set.

Fixes: 5243630b09 ("LU-15947 obdclass: improve precision of wakeups for mod_rpcs")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I29371c8c85414413c5a8e41dec3632f64ad127bb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50261
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-14291 batch: don't include lustre_update.h for client only builds 58/50258/2
James Simmons [Fri, 10 Mar 2023 14:12:27 +0000 (09:12 -0500)]
LU-14291 batch: don't include lustre_update.h for client only builds

The header lustre_update.h contains a huge amount of server only
code. Remove lustre_update.h for a client only build and include
only what we need for client directly.

Test-Parameters: trivial
Change-Id: I84dc39672340045bde09249d98f32aa9abec63b8
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50258
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>
13 months agoLU-16615 utils: add messages in l_getidentity 13/50213/3
Lai Siyao [Wed, 18 Jan 2023 00:23:05 +0000 (19:23 -0500)]
LU-16615 utils: add messages in l_getidentity

Add time related messages in l_getidentity to help debug upon
timeout, which may cause -EACCES error in user applications.

Test-Parameters: trivial
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I87ebfb85d05e19886d8becc6b14ed0233eaed42d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50213
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16601 kernel: update SLES15 SP4 [5.14.21-150400.24.46.1] 79/50179/2
Jian Yu [Thu, 2 Mar 2023 02:34:18 +0000 (18:34 -0800)]
LU-16601 kernel: update SLES15 SP4 [5.14.21-150400.24.46.1]

Update SLES15 SP4 kernel to 5.14.21-150400.24.46.1 for Lustre client.

Test-Parameters: trivial clientdistro=sles15sp4 testlist=sanity

Change-Id: I5b9e39359e61e929adaeddece60f4d247996a00a
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50179
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16599 obdclass: job_stats can parse escaped jobid string 60/50160/7
Lei Feng [Wed, 1 Mar 2023 00:16:03 +0000 (08:16 +0800)]
LU-16599 obdclass: job_stats can parse escaped jobid string

Writing a jobid to job_stats proc entry asks lustre to clear
the stats of the specific jobid. Since job_stats outputs
escaped jobid string in some cases, it should be able to parse
an escaped jobid string when the string is written to it.

Test-Parameters: trivial
Signed-off-by: Lei Feng <flei@whamcloud.com>
Change-Id: Idbc63dac6c3b35331317927107e634a3d638dd66
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50160
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>
13 months agoLU-14668 lnet: add 'lock_prim_nid" lnet module parameter 59/50159/8
Serguei Smirnov [Tue, 28 Feb 2023 23:02:20 +0000 (15:02 -0800)]
LU-14668 lnet: add 'lock_prim_nid" lnet module parameter

Add 'lock_prim_nid' lnet module parameter to allow control
of how Lustre peer primary NID is selected.
If set to 1 (default), the NID specified by Lustre when
calling LNet API is designated as primary for the peer,
allowing for non-blocking discovery in the background.
If set to 0, peer discovery is blocking until complete
and the NID listed first in discovery response is designated
as primary.

Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I6ed1cb0c637f4aa7a7340a6f01819ba9a85858f4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50159
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16598 osp: cleanup comment in osp_sync.c 46/50146/2
Li Xi [Mon, 27 Feb 2023 14:47:59 +0000 (22:47 +0800)]
LU-16598 osp: cleanup comment in osp_sync.c

The comment of osp_sync.c is outdated can be cleaned
up a little bit for better explanation of the implementation.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I60b39ab5f7360521258200cf55e5c85373cf4aa2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50146
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>
13 months agoLU-16595 test: save one second in wait_destroy_complete() 44/50144/2
Li Xi [Mon, 27 Feb 2023 03:22:28 +0000 (11:22 +0800)]
LU-16595 test: save one second in wait_destroy_complete()

In wait_destroy_complete(), there is no need to wait another 1
second when all in flight destroys finish.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I351616ecf261f1e77c3f8d61f5541a51e327fa83
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50144
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16563 lnet: use discovered ni status to set initial health 27/50027/8
Serguei Smirnov [Thu, 16 Feb 2023 18:34:03 +0000 (10:34 -0800)]
LU-16563 lnet: use discovered ni status to set initial health

If not routing, track local NI status in the ping buffer
such that locally recognized "down" state, for example,
due to a downed network interface/link, is available
to any discovering peer.
If NI 'fatal' status is changed, push update to peers.

On the active side of discovery, check peer NI status so if NI
is down, decrement its health score and queue for recovery.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I513c7942099c0da9088fa6d4460f76386ea91d3b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50027
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Cyril Bordage <cbordage@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>
13 months agoLU-16221 kernel: update RHEL 9.1 [5.14.0-162.18.1.el9_1] 77/50177/4
Jian Yu [Fri, 10 Mar 2023 18:50:00 +0000 (10:50 -0800)]
LU-16221 kernel: update RHEL 9.1 [5.14.0-162.18.1.el9_1]

Update RHEL 9.1 kernel to 5.14.0-162.18.1.el9_1 for Lustre client.

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

Change-Id: I032f69f1ecba60248729bb856a3aad78e5f05680
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50177
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-15053 tests: reset quota if ENABLE_QUOTA=1 23/49823/5
Sergey Cheremencev [Mon, 30 Jan 2023 17:33:08 +0000 (20:33 +0300)]
LU-15053 tests: reset quota if ENABLE_QUOTA=1

Quota limits set in setup_quota() with ENABLE_QUOTA=1
should be cleaned up in the end to avoid failures in
the next sessions

Test-Parameters: testlist=sanity-quota env=ENABLE_QUOTA=yes
Test-Parameters: testgroup=review-dne-part-4 env=ENABLE_QUOTA=yes
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: Ia6b034739cfe800c6661f199420d0a4dbe7110fc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49823
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
13 months agoLU-16382 build: udev files in /usr/lib 69/49369/7
Mr NeilBrown [Mon, 13 Mar 2023 18:56:40 +0000 (14:56 -0400)]
LU-16382 build: udev files in /usr/lib

udev rules files should go in /usr/lib/udev/rules.d
/etc/udev/rules.d is meant for local configuration.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I525d25c54903c25d19b5909231e21e7a3a717d9b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49369
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16338 readahead: clip readahead with kms 26/49226/21
Qian Yingjin [Wed, 23 Nov 2022 13:03:41 +0000 (08:03 -0500)]
LU-16338 readahead: clip readahead with kms

During I/O test, it found that the read-ahead pages reach 255 for
small files with only several KiB. The amount of read data reaches
more than 1MiB.
The reason is that the granted DLM extent lock is [0, EOF], which
is larger than the requested extent. During readahead, the OSC
layer will also return [0, EOF] extent which will clip into stripe
size (1MiB) regardless the actual object size.
In this patch, the readahead range is clipped to the known min
size (kms) on OSC layer during readahead. By this way, the
read-ahead data will not beyong the last page of the file.

Add sanity/101m to verify it.

This patch also fixes multiop to return successfully when reaching
EOF instead of exiting with ENODATA during read.

Test-Parameters: testlist=sanity env=ONLY=101k,ONLY_REPEAT=3
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I285e3e1d84ad06231039306106c74d775c1b0b50
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49226
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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>
13 months agoLU-13107 utils: remove duplicate lctl erase/fork_lcfg 86/48886/3
Andreas Dilger [Wed, 13 Apr 2022 01:24:23 +0000 (19:24 -0600)]
LU-13107 utils: remove duplicate lctl erase/fork_lcfg

A patch merge error resulted in duplicate erase_lcfg and fork_lcfg
sub-commands in lctl.  Remove the duplicates, and move them to the
llog section, since they relate to the configuration llogs.

Fixes: b0efebdaef52 ("LU-13107 utils: clean up lctl command usage")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4449f7dbb0ab7b643e5057131bbc9620ac457a3d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48886
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16217 iokit: Add lst.sh wrapper and lst-survey 99/48799/5
Chris Horn [Tue, 4 Oct 2022 10:05:15 +0000 (05:05 -0500)]
LU-16217 iokit: Add lst.sh wrapper and lst-survey

lst.sh is a wrapper around the LNet selftest (lst) utility. It
provides a streamlined interface for executing read, write, combined
read/write and ping lst tests.

lst-survey leverages lst.sh to test the performance of groups of LNet
peers against each other.

HPE-bug-id: LUS-10279
Test-Parameters: trivial
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I4c2593df1289b0b97760cb402de1e101ca22c319
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48799
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-12805 tests: disable replay-single/36 91/36291/13
Alex Zhuravlev [Wed, 25 Sep 2019 18:00:40 +0000 (21:00 +0300)]
LU-12805 tests: disable replay-single/36

the test is broken as it checks for server-side message
on the client. it fails constantly if changed to make
correct checking (on the server).
see LU-12805 for the details.

Test-Parameters: trivial
Test-Parameters: testlist=replay-single
Change-Id: I70db3994ba51076ce9a8ef47efded1acb4ddaf52
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/36291
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sarah Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16604 kfilnd: kfilnd_peer ref leak on send 57/50157/2
Chris Horn [Tue, 28 Feb 2023 20:09:57 +0000 (13:09 -0700)]
LU-16604 kfilnd: kfilnd_peer ref leak on send

There is an extra refcount_inc() done by kfilnd_tn_alloc_for_peer().
This is correct in the case where we are allocating TN for HELLO
request, because our caller does not take extra ref on kfilnd_peer,
but it is wrong in the normal kfilnd_tn_alloc() path because
kfilnd_tn_alloc() takes this reference by way of a call to
kfilnd_peer_get().

Move the refcount_inc() from kfilnd_tn_alloc_for_peer() to
kfilnd_send_hello_request() where it is needed.

Test-Parameters: trivial
HPE-bug-id: LUS-11128
Fixes: 11a32d886b ("LU-16213 kfilnd: Allow one HELLO in-flight per peer")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I3d723a829ec42929ce22a80ffda97dbd87917d4b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50157
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Ron Gredvig <ron.gredvig@hpe.com>
Reviewed-by: Ian Ziemba <ian.ziemba@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-9680 lnet: handle multi-rail setups 26/50026/5
James Simmons [Tue, 7 Mar 2023 17:44:38 +0000 (12:44 -0500)]
LU-9680 lnet: handle multi-rail setups

For multi-rail setups we can push more than one interface at a
time to setup the local NIs but our netlink code ignored all but
one interface. Refactor both lnet_genl_parse_local_ni() and
lnet_net_cmd() to setup all the passed in interfaces. Also remove
setting ni to NULL in the NI deletion case which causes an oops
when we have more than one interface.

Lastly rework the Netlink userland library code to properly pack
netlink packets sent to the kernel. We were treating YAMl mappings
the same as YAML sequences. This is wrong so we separate the
handling of each case. Mapping then are translated as nested
collection of data and sequences are arrays of these data. This
ends up packing a nested collection in another nested collection.
Before we didn't have this layering which lead to improper
packing.

Test-Parameters: trivial testlist=sanity-lnet
Change-Id: Icb220127fdabfc5ebf4bb848cf2715048c40f674
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50026
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-11912 ofd: reduce LUSTRE_DATA_SEQ_MAX_WIDTH 24/38424/28
Li Dongyang [Mon, 22 Nov 2021 11:43:03 +0000 (22:43 +1100)]
LU-11912 ofd: reduce LUSTRE_DATA_SEQ_MAX_WIDTH

Reduce LUSTRE_DATA_SEQ_MAX_WIDTH from ~4B to ~32M
to limit the number of objects under /O/[seq]/d[0..31]
dir on OSTs.
This makes the directories stay optimial for ldiskfs,
to avoid going into the largedir/3-level htree territory.

Remove the hard-coded LUSTRE_DATA_SEQ_MAX_WIDTH checks
in ofd, make them check the seq->lcs_width which is
a tunable set to LUSTRE_DATA_SEQ_MAX_WIDTH by default,
allow the value up to IDIF_MAX_OID if a larger seq width
is needed.

Use the odbo->o_size in the OST_CREATE rpc reply on ofd,
to update osp with the current seq width setting.
osp then uses this seq width to determine when to rollover
to a new seq.

The seq will rollover when the seq width is exhausted,
the default is LUSTRE_DATA_SEQ_MAX_WIDTH.
For seq >= FID_SEQ_NORMAL objects, the upper limit of
seq width is OBIF_MAX_OID,
For IDIF/MDT0 objects, the upper limit is IDIF_MAX_OID.
The seq FID_SEQ_OST_MDT0 will change to a normal seq after the
rollover.

Fix osp_precreate_reserve when the last precreated is the end
of the seq and the osp_objs_precreated can not host all
the requested objects, the mdt thread would stuck:
it wakes up osp precreate thread in a loop for progress,
but osp thread will not try to do anything until the seq
is used up. This can be seen easier when seq->lcs_width is
set to a low number and try to create an overstripe with stripe
number bigger than seq->lcs_width.

Fix the precreate thread spinning when the precreate pool
is at the end of the seq, and is nearly empty.

Change the seq->lcs_width to 16384 for all tests in
test-framework.sh, except a few slow tests to avoid timeouts,
and some overstriping tests creating LOV_MAX_STRIPE_COUNT to
avoid overstriping creating less objects than expected,
when precreate pool is at the end of the seq, and there are
not enough objects.

Fix the problem where seq could still change after
replay_barrier. To achieve this, introduce new fail_loc
OBD_FAIL_OSP_FORCE_NEW_SEQ and force_new_seq/force_new_seq_all
to drain the objects in the precreate pool then rollover to a
new seq. This applies to a bunch of test suites heavily using
replay_barrier.

Change-Id: I2749c1004b7bf3197b691cc94527f90145bcdef8
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/38424
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>
13 months agoLU-16629 osd: refill the existing env 70/50270/2
Hongchao Zhang [Mon, 6 Mar 2023 13:17:10 +0000 (08:17 -0500)]
LU-16629 osd: refill the existing env

During the LDLM lock callback, the "lu_env" is created in
ldlm_bl_thread_main, which is initiated by "ldlm_setup",
and it could have no key of "osd_thread_info" yet, then it
need to call "lu_env_refill" to refill the keys.

Change-Id: Ibae978a5a10826c2e3186012911870ce7bf0b147
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50270
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>
13 months agoLU-16478 target: disconnected export 41/50041/7
Alex Zhuravlev [Fri, 17 Feb 2023 08:00:20 +0000 (11:00 +0300)]
LU-16478 target: disconnected export

eviction can race with a reconnect and this in turn can lead
to a leaked export reference prevent further umount -
mdt_obd_reconnect() grabs a reference via nodemap_add_member().
call obd_disconnect() if such a case observed to balance
obd_reconnect().

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I3fd49429ef40ef391d58e042e091258dcb9add72
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50041
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 months agoLU-16524 sec: add fscrypt_admin rbac role 84/50184/13
Sebastien Buisson [Wed, 1 Mar 2023 15:11:19 +0000 (16:11 +0100)]
LU-16524 sec: add fscrypt_admin rbac role

The purpose of the new fscrypt_admin rbac role is to control admin
tasks related to fscrypt. When not set, it is forbidden to all users
including root to modify existing protectors or policies, or create
new ones. But it remains possible to lock and unlock encrypted
directories.

Internally, this is achieved by marking fscrypt metadata files and
directories, i.e. everything under ROOT/.fscrypt, with a special mdt
object flag LOHA_FSCRYPT_MD.
Upon request processing, the mdt layer returns -EPERM if the flag
LOHA_FSCRYPT_MD is found on an object that is the target of a modify
request.
The LUSTRE_IMMUTABLE_FL flag is also returned to clients for such
objects.

sanity-sec test_64f is added to exercise the new fscrypt_admin flag.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I99956499133994444ccd88e33340067790a182ce
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50184
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
13 months agoLU-16524 sec: enforce rbac roles 07/49907/18
Sebastien Buisson [Fri, 3 Feb 2023 13:11:51 +0000 (14:11 +0100)]
LU-16524 sec: enforce rbac roles

There are 5 different rbac roles defined via nodemap:
- byfid_ops, to allow operations by FID (e.g. 'lfs rmfid').
- chlg_ops, to allow access to Lustre Changelogs.
- dne_ops, to allow operations related to DNE (e.g. 'lfs mkdir').
- file_perms, to allow modifications of file permissions and owners.
- quota_ops, to allow quota modifications.
Enforce these roles by checking the value of the 'rbac' nodemap
property on server side and returning -EPERM if operation is
forbidden.

Add sanity-sec test_64* to exercise these capabilities.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I37057f0ab50c02fa99db03cb04149a437e35ee0a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49907
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: Patrick Farrell <pfarrell@whamcloud.com>