Whamcloud - gitweb
fs/lustre-release.git
21 months agoLU-15918 build: update debhelper compatibility level to 11 50/47550/2
Jian Yu [Tue, 7 Jun 2022 01:38:51 +0000 (18:38 -0700)]
LU-15918 build: update debhelper compatibility level to 11

This patch updates debhelper compatibility level to 11 (which is
currently the recommended level) to resolve the following build
warnings while running "make debs":

Compatibility levels before 10 are deprecated (level 9 in use)

Test-Parameters: trivial clientdistro=ubuntu2004 \
testlist=sanity

Change-Id: Ie5c63f6a3eb29e9aeace1f008d8d492e7587adf2
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/47550
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Thomas Stibor <thomas@stibor.net>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-15896 gss: ignore OpenSSLv3 deprecated API 85/47485/2
Sebastien Buisson [Mon, 30 May 2022 14:11:50 +0000 (16:11 +0200)]
LU-15896 gss: ignore OpenSSLv3 deprecated API

Lustre GSS code makes use of some OpenSSL API that has been
deprecated in v3, namely all the functions in the DH_* family.
Those would need to be replaced with their EVP_PKEY_* counterparts
but in the meantime we just use the OPENSSL_SUPPRESS_DEPRECATED
define to continue using the deprecated API.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I413a2af1299123b29ed2043188da0348ce9d0a5e
Reviewed-on: https://review.whamcloud.com/47485
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-14104 tests: sanity/123* shouldn't fail performance checks 12/40512/16
Alex Zhuravlev [Mon, 2 Nov 2020 07:13:44 +0000 (10:13 +0300)]
LU-14104 tests: sanity/123* shouldn't fail performance checks

running in VMs as CPU resource isn't strictly guaranteed usually.

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ieec4a89b921f7ccc198eb10513d4980ad3a20b51
Reviewed-on: https://review.whamcloud.com/40512
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
22 months agoLU-15908 build: fix debian rules 12/47512/2
Sebastien Buisson [Thu, 2 Jun 2022 10:05:02 +0000 (12:05 +0200)]
LU-15908 build: fix debian rules

A comment in debian/rules file breaks a commands-line continuation,
causing exported env vars to be dropped.

Fixes: a5084c2f2e ("LU-14937 build: re-use config cache in 'make rpms/debs'")
Test-Parameters: trivial
Signed-off-by: Ake Sandgren <ake.sandgren@hpc2n.umu.se>
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I0894199301c489b1961e043651c74d7c6c0089d2
Reviewed-on: https://review.whamcloud.com/47512
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>
22 months agoLU-15875 kernel: kernel update RHEL7.9 [3.10.0-1160.66.1.el7] 97/47397/2
Jian Yu [Thu, 19 May 2022 18:20:41 +0000 (11:20 -0700)]
LU-15875 kernel: kernel update RHEL7.9 [3.10.0-1160.66.1.el7]

Update RHEL7.9 kernel to 3.10.0-1160.66.1.el7.

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

Change-Id: I9e8ab33edd6cacbbf895399962027827a1befd5b
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/47397
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>
22 months agoLU-15865 ptlrpc: don't report eviction for lwp 74/47374/2
Alex Zhuravlev [Tue, 17 May 2022 13:28:38 +0000 (16:28 +0300)]
LU-15865 ptlrpc: don't report eviction for lwp

lwp connections aren't persistent, so they found themselves
"evicted" after target's restart, which is not correct.
don't confuse people with false error.

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia995eac2c4e1323690f42147aedc74f8748eacf0
Reviewed-on: https://review.whamcloud.com/47374
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15854 tests: fix version check for sanity test_64 43/47343/3
Aurelien Degremont [Fri, 13 May 2022 12:42:38 +0000 (12:42 +0000)]
LU-15854 tests: fix version check for sanity test_64

Add missing or proper server version check for interop
testing for sanity test 64i and 64h.

Test-Parameters: trivial testlist=sanity env=ONLY=64
Fixes: 38c78ac ("LU-9704 grant: ignore grant info on read resend")
Fixes: 4894683 ("LU-14124 target: set OBD_MD_FLGRANT in read's reply")
Change-Id: Iec21a407f467db3e9cb197d0a1436ea4e821bef2
Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-on: https://review.whamcloud.com/47343
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
22 months agoLU-15853 tests: sanity 104c should use $MOUNT 42/47342/2
Aurelien Degremont [Fri, 13 May 2022 12:42:38 +0000 (12:42 +0000)]
LU-15853 tests: sanity 104c should use $MOUNT

Replace the hardcoded mount point value in test sanity 104c
with '$MOUNT'.

Test-Parameters: trivial testlist=sanity env=ONLY=104
Fixes: 8ee6e1c ("LU-14565 ofd: Do not rely on tgd_blockbit")
Change-Id: Iead6792115bd92eb53e3da55040694feafcced8d
Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-on: https://review.whamcloud.com/47342
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
22 months agoLU-15851 gnilnd: Remove invalid ASSERT from kgnilnd_send() 20/47320/3
Chris Horn [Wed, 20 Apr 2022 21:45:35 +0000 (16:45 -0500)]
LU-15851 gnilnd: Remove invalid ASSERT from kgnilnd_send()

An LNet user can allocate a large contiguous MD. That MD can have
LNET_MAX_IOV pages which causes some LNDs to assert on either niov
argument passed to lnd_recv() or the value stored in
lnet_msg::msg_niov. This is true even in cases where the actual
transfer size is <= LNET_MTU and will not exceed limits in the
LNDs.

Remove the assert on msg_niov from kgnilnd_send(). kgnilnd will
return an error to upper layer if its unable to set up a buffer for
the send.

Move the ASSERT in kgnilnd_setup_immediate_buffer() so that we only
check niov after accounting for offset.

HPE-bug-id: LUS-10915
Test-Parameters: trivial
Fixes: 857f11169f ("LU-13004 lnet: always put a page list into struct lnet_libmd")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ide39f0745686784b1a2402c578bd472196f372b8
Reviewed-on: https://review.whamcloud.com/47320
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15793 kernel: kernel update RHEL8.5 [4.18.0-348.23.1.el8_5] 75/47175/4
Jian Yu [Wed, 18 May 2022 19:40:43 +0000 (12:40 -0700)]
LU-15793 kernel: kernel update RHEL8.5 [4.18.0-348.23.1.el8_5]

Update RHEL8.5 kernel to 4.18.0-348.23.1.el8_5.

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

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

Change-Id: I9724e304c2d32bb0ac2dcf4138438c79d4abca0f
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/47175
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15797 build: Workaround _fix_broken_configure_for_lto 68/47168/6
Shaun Tancheff [Sun, 1 May 2022 10:18:28 +0000 (17:18 +0700)]
LU-15797 build: Workaround _fix_broken_configure_for_lto

Workaround _fix_broken_configure_for_lto macro added to
configure macro in RHEL9:

redhat-rpm-config.noarch  190-1.el9.alma  @appstream

Use configure macro directly if it is not parseable

HPE-bug-id: LUS-10918
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I53072c0ffdf82abc938322e9c408cc44f5033ab9
Reviewed-on: https://review.whamcloud.com/47168
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15563 build: Include the new linux/blk-integrity.h 66/47166/3
Shaun Tancheff [Fri, 27 May 2022 15:25:05 +0000 (22:25 +0700)]
LU-15563 build: Include the new linux/blk-integrity.h

Linux v5.15-rc6-17-gfe45e630a103
  block: move integrity handling out of <linux/blkdev.h>

Include the new linux/blk-integrity.h

Since blk-integrity is only used in osd-ldiskfs we can migrate
the compatibility wrappers:
  blk_integrity_interval(),
  blk_integrity_name(),
  bdev_integrity_enabled(),
and
  bip_size()
to osd-ldiskfs/osd_internal.h

HPE-bug-id: LUS-10921
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Idcbef9b43b7d2a740291e3783f81c23454209a25
Reviewed-on: https://review.whamcloud.com/47166
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15796 build: require python2 for lustre-iokit deb 64/47164/2
Jian Yu [Thu, 28 Apr 2022 05:00:02 +0000 (22:00 -0700)]
LU-15796 build: require python2 for lustre-iokit deb

Package python is not available on Ubuntu 22.04.
We can just require python2 in the control files.

Test-Parameters: trivial clientdistro=ubuntu2004 \
testlist=obdfilter-survey

Change-Id: Id37c9babba31c575855238592cbac4ce5c9ee79a
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/47164
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Thomas Stibor <thomas@stibor.net>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-12514 LNet: get entropy from nid when nid set. 59/47159/2
Mr. NeilBrown [Wed, 27 Apr 2022 18:33:57 +0000 (14:33 -0400)]
LU-12514 LNet: get entropy from nid when nid set.

When the 'lustre' module is loaded, it gets a list of
net devices and uses the node ids to  add entropy
to the prng.  This means that the network interfaces need
to be configured before the module is loaded, which prevents
the module from being compiled into a monolithic kernel.

So move this entropy addition to the moment when
the interface is imported to LNet and the node id is first known.

Linux-commit: 9f0e4c2b823b0cf5744a448d3b23cd618b86db41

Change-Id: I1c9b4f9a5c01de5b14188ccd9330b51eeafd43ac
Signed-off-by: Mr. NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/47159
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15789 tests: execute cleanup_115() 1 time 53/47153/4
Elena Gryaznova [Wed, 27 Apr 2022 12:26:26 +0000 (15:26 +0300)]
LU-15789 tests: execute cleanup_115() 1 time

Patch fixes the following test_115() defects:
cleanup_115 () is called 3 times:
  1. at the end of test
  2. on run_one() returns
  3. on run_one() subshell exits

No reason to use $SINGLEMDS since test operates with mds1
only.
No reason to save FLAKEY since test is executed in subshell.
Correctly call DEBUGFS -c -R 'stat ROOT/$tdir/$tfile',
without correct quotation we have:
    debugfs 1.45.6.cr1 (14-Aug-2020)
    debugfs: No such file or directory while trying to open
      ROOT/d115.conf-sanity/f115.conf-sanity
      stat: Filesystem not open

Fixes: ef13d5464e ("LU-11915 tests: fix conf-sanity 115 test")
Fixes: d7449233c1 ("LU-8444 tests: test for unsigned xattr inode number")
Test-Parameters: trivial testlist=conf-sanity env=ONLY="115 116"
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-10901
Reviewed-by: Vladimir Saveliev <vlaidimir.saveliev@hpe.com>
Change-Id: I11c4889ebe309c48527235c59fce1381202401b4
Reviewed-on: https://review.whamcloud.com/47153
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15785 tests: do not detect versions for RPC_MODE mode 44/47144/2
Elena Gryaznova [Tue, 26 Apr 2022 13:37:27 +0000 (16:37 +0300)]
LU-15785 tests: do not detect versions for RPC_MODE mode

lustre_version_code() is called each time when do_rpc_nodes()
is called. It is not needed to detect versions for RPC_MODE mode.

Fixes: 8fa23490bb ("LU-1538 tests: standardize test script init - sanity")
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-10914
Change-Id: Ia7645de0a4eedfddf859c80e661ebcb2e45de140
Reviewed-on: https://review.whamcloud.com/47144
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
22 months agoLU-15773 kernel: kernel update SLES12 SP5 [4.12.14-122.116.1] 15/47115/4
Jian Yu [Fri, 13 May 2022 01:16:04 +0000 (18:16 -0700)]
LU-15773 kernel: kernel update SLES12 SP5 [4.12.14-122.116.1]

Update SLES12 SP5 kernel to 4.12.14-122.116.1 for Lustre client.

Test-Parameters: trivial clientdistro=sles12sp5 \
env=SANITY_EXCEPT="56oc 430c 817" testlist=sanity

Change-Id: I66d2ef62e009b56502724f8c299e5d4dea4fa766
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/47115
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>
22 months agoLU-930 iokit: remove obsolete obdsurvey reference 02/47102/2
Andreas Dilger [Wed, 20 Apr 2022 23:38:21 +0000 (17:38 -0600)]
LU-930 iokit: remove obsolete obdsurvey reference

Remove reference to long obsolete "obdsurvey" tool from README.

Fixes: c8521aa1599c ("Removed per Peter Bojanic...")
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ic95e0544b725ff9a83e8865d9913af51336b4655
Reviewed-on: https://review.whamcloud.com/47102
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: cliff white <cwhite@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15766 doc: Improve lfs-hsm.1 to match options in lfs.c 99/47099/3
Thomas Stibor [Wed, 20 Apr 2022 11:52:47 +0000 (13:52 +0200)]
LU-15766 doc: Improve lfs-hsm.1 to match options in lfs.c

Manual page lfs-hsm.1 has minor inconsistent formatting
issues such as:

lfs hsm_state <FILE>...
lfs hsm_action file

and missing optional argument [--archive-id NUM]. According
to lfs.c the options shall be, e.g:

{"hsm_set", lfs_hsm_set, 0, "Set HSM user flag on specified files.n"
 "usage: hsm_set [--norelease] [--noarchive] [--dirty] [--exists] "
 "[--archived] [--lost] [--archive-id NUM] <file> ..."}

This patch ensures that manual page and options
in lfs.c are in match and consistent.

Change-Id: I745958f842d74e2627ae232197cc0143c368048d
Test-Parameters: trivial
Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Reviewed-on: https://review.whamcloud.com/47099
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15758 build: Client module DEB can't be installed on Debian 87/47087/4
Thomas Stibor [Tue, 19 Apr 2022 12:31:09 +0000 (14:31 +0200)]
LU-15758 build: Client module DEB can't be installed on Debian

Building DEB package lustre-client-modules-*.deb depends
since commit 32c4b80192652f55bcef5786e4ec683e85234c04 on
package linux-generic. This package is however available
on Ubuntu distributions, but not e.g. on Debian distribution.
As a consequence the built package lustre-client-modules-*.deb
cannot be installed on Debian due to non-existing package
dependency.

Test-Parameters: trivial clientdistro=ubuntu2004
Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Change-Id: Ia541aaede7d779c4dd2f81f896a6be8a797780b3
Reviewed-on: https://review.whamcloud.com/47087
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-13485 build: remove parallel configure dir 77/47077/2
Jian Yu [Fri, 15 Apr 2022 03:07:05 +0000 (20:07 -0700)]
LU-13485 build: remove parallel configure dir

This patch removes the temporary directory for
parallel configure tests at the end of configure
to avoid checking the already generated modules
while configuring the same Lustre codes with
a different kernel.

Change-Id: I4505fb932954531d262b5380f17b3df75a80bfa0
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/47077
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15308 lod: set ldo_mirrors to NULL on error 08/47008/2
John L. Hammond [Wed, 6 Apr 2022 16:51:47 +0000 (11:51 -0500)]
LU-15308 lod: set ldo_mirrors to NULL on error

In lod_alloc_comp_entries() if OBD_ALLOC_LARGE fails and we free
ldo_mirrors then we set it to NULL to avoid a double free later.

Test-Parameters: trivial
Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: I27552d1eaecc06720190db9cfe89ded71b9fef53
Reviewed-on: https://review.whamcloud.com/47008
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
22 months agoLU-15709 tests: t-f stopall() defect: num not initialized 57/46957/2
Elena Gryaznova [Wed, 30 Mar 2022 18:22:32 +0000 (21:22 +0300)]
LU-15709 tests: t-f stopall() defect: num not initialized

The following test demonstrates the defect (OSTCOUNT=2):
  test_0A () {
        local num=100
        echo $num
        stopall
        echo $num after stopall
  }
Result:
  == sanity test 0A: num ===
  100
  Stopping clients: fre0107,fre0108 /mnt/lustre (opts:)
  ...
  2 after stopall

Fixes: d2d56f38da (" - make HEAD from b_post_cmd3")
Test-Parameters: trivial
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-10864
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Change-Id: I46648c741943f219c03f3501585051e285365578
Reviewed-on: https://review.whamcloud.com/46957
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15699 build: without mpi build fails 38/46938/2
Shaun Tancheff [Sun, 27 Mar 2022 11:14:24 +0000 (07:14 -0400)]
LU-15699 build: without mpi build fails

RPM build must honor the --without mpi and should ensure
that packaging does not fail.

Also where multiple mpi flavors are installed only the
desired mpi_name should be loaded / unloaded

Test-Parameters: trivial
HPE-bug-id: LUS-8718
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I2367597c715f68166275a689fe62634bf8a0607f
Reviewed-on: https://review.whamcloud.com/46938
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15689 libcfs: libcfs_debug_mb set incorrectly on init 25/46925/2
Chris Horn [Wed, 23 Mar 2022 06:21:06 +0000 (01:21 -0500)]
LU-15689 libcfs: libcfs_debug_mb set incorrectly on init

If libcfs_debug_mb parameter is specified to insmod (i.e. set before
module is initialized) then it does not get initialized correctly.

libcfs_param_debug_mb_set() expects cfs_trace_get_debug_mb() to return
zero if the module has not been initialized yet, but
cfs_trace_get_debug_mb() will return 1 in this case. Modify
cfs_trace_get_debug_mb() to return zero as expected. A related issue
is that in this case we need to call cfs_trace_get_debug_mb() after
cfs_tracefile_init() so that libcfs_debug_mb gets the same value it
would get if we had set it after module init.

When libcfs_debug_mb is specified to insmod, libcfs_debug_init()
divides its value by num_possible_cpus(), but this is already done in
libcfs_param_debug_mb_set().

Test-Parameters: trivial
Fixes: 8b78a3ffb5 ("LU-9859 libcfs: always range-check libcfs_debug_mb setting.")
HPE-bug-id: LUS-10839
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I1003758156acb5cf6ea30bbdfd7b45a743a2a5aa
Reviewed-on: https://review.whamcloud.com/46925
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15674 tests: skip cifs tests for mlnx 5.4 93/46893/3
Elena Gryaznova [Tue, 22 Mar 2022 15:34:14 +0000 (18:34 +0300)]
LU-15674 tests: skip cifs tests for mlnx 5.4

OFED installation caused CIFS to break in RHEL8.4 Release: 5.4
https://docs.nvidia.com/networking/display/MLNXENv543100/Known+Issues

Test-Parameters: trivial
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-10825
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: Id2d0e98fbfa1a24460fc6eb229da1ba6e659ad38
Reviewed-on: https://review.whamcloud.com/46893
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15672 tests: fix typo in facet_failover_host() 92/46892/2
Elena Gryaznova [Tue, 22 Mar 2022 14:41:08 +0000 (17:41 +0300)]
LU-15672 tests: fix typo in facet_failover_host()

mgsfailover_HOST is to be equal to mds1failover_HOST if mds and
mgs are combined and mds1failover_HOST is not empty.

Fixes: 36475ba5fc ("LU-9272 tests: fix for facet_failover mgs")
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-10746
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: Iadd27e977d95794a53149a99380296329469452c
Reviewed-on: https://review.whamcloud.com/46892
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15655 contrib: update branch_comm to python3 56/46856/3
John L. Hammond [Thu, 17 Mar 2022 13:55:32 +0000 (08:55 -0500)]
LU-15655 contrib: update branch_comm to python3

Update the branch_comm script from to python2 to python3.

Test-Parameters: trivial
Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: Icbb747c01e15cbe77c6dd6df3e913654ded84239
Reviewed-on: https://review.whamcloud.com/46856
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15626 tests: Fix "error" reported by shellcheck(2) 14/46814/3
Arshad Hussain [Wed, 16 Mar 2022 07:23:13 +0000 (12:53 +0530)]
LU-15626 tests: Fix "error" reported by shellcheck(2)

This patch fixes "error" issues reported by shellcheck
for *.sh files. This patch also moves spaces to tabs.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-scrub,sanity-dom
Test-Parameters: testlist=large-scale
Test-Parameters: testlist=lnet-selftest
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I4d129f26493bc17ee6d5988ae234dace149dfdd3
Reviewed-on: https://review.whamcloud.com/46814
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15647 utils: 'lfs df' shouldn't loop forever 13/46813/2
Andreas Dilger [Sun, 13 Mar 2022 02:35:45 +0000 (19:35 -0700)]
LU-15647 utils: 'lfs df' shouldn't loop forever

Don't loop forever in "lfs df" if there is a problem fetching
the target statfs information from the kernel and -ENODEV is
not returned for whatever reason.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I5110c7246cf53eb5c4d59424a44b73b9d23ebbe5
Reviewed-on: https://review.whamcloud.com/46813
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15484 tests: Increase timeout to wait for child 64/46764/4
Patrick Farrell [Wed, 9 Mar 2022 15:15:22 +0000 (10:15 -0500)]
LU-15484 tests: Increase timeout to wait for child

Sanity-pcc 101a is failing because the remote 'sleep 600'
process is not always started in time, meaning the NS
doesn't exist.

Increase the wait time for this process to start.

Fixes: f3be560031 "LU-15170 llite: Switch pcc to lookup_one_len"

Test-Parameters: trivial
Test-Parameters: testlist=sanity-pcc env="ONLY=101a,ONLY_REPEAT=50"
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I57175ec2f0e948045cf88d4a13a1e56cc34f8407
Reviewed-on: https://review.whamcloud.com/46764
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
22 months agoLU-15632 tests: Typo in check_node_health 46/46746/3
Chris Horn [Tue, 8 Mar 2022 02:59:05 +0000 (20:59 -0600)]
LU-15632 tests: Typo in check_node_health

A typo in test-frameworks.sh::check_node_health() causes test failures
if "lctl get_param catastrophe" doesn't return any output.

Test-Parameters: trivial
Fixes: 67752f6db2 ("LU-14773 tests: skip check_network() on working node")
HPE-bug-id: LUS-10800
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I5dbb46578a62f8fc13f39be6fbebe87c75bc2a7d
Reviewed-on: https://review.whamcloud.com/46746
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@hpe.com>
22 months agoLU-15636 test: add iabf 44/46744/7
John L. Hammond [Wed, 16 Mar 2022 17:00:36 +0000 (01:00 +0800)]
LU-15636 test: add iabf

Usage: [IABF_OPTIONS...] iabf [INIT] --- A --- B --- [FINI] ---

Initialize, run tasks A and B with various overlaps, and Finalize.

Command lines for INIT, A, B, and FINI are terminated by ---.
If INIT or FINI is empty then it will be skipped.
If INIT or FINI fail then we exit immediately with status 1.

For delay = $IABF_DELAY_BEGIN_NS; delay < $IABF_DELAY_END_NS;
delay += $IABF_DELAY_STEP_NS
  Run initializer (INIT).
  In parallel: Fork, delay *, and exec processes A and B.
    If delay is negative then delay A by abs(delay) ns.
    Otherwise delay B by delay ns.
  Wait for A and B to terminate.
  Run finilizer (FINI).

See lustre/tests/iabf/README for more information.

Test-Parameters: trivial
Change-Id: I97920e082a7a5bec458c805c507b4fefb448427b
Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46744
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-10994 lov: remove lov_page 21/47221/6
John L. Hammond [Thu, 5 May 2022 16:14:55 +0000 (11:14 -0500)]
LU-10994 lov: remove lov_page

Remove the lov page layer since it does nothing but costs 24 bytes per
page plus pointer chases.

Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: Icd7b4b0041e0fe414a3a4143179f45845177960e
Reviewed-on: https://review.whamcloud.com/47221
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15618 lnet: Return ESHUTDOWN in lnet_parse() 11/46711/2
Chris Horn [Thu, 3 Mar 2022 07:12:32 +0000 (01:12 -0600)]
LU-15618 lnet: Return ESHUTDOWN in lnet_parse()

If the peer NI lookup in lnet_parse() fails with ESHUTDOWN then we
should return that value back to the LNDs so that they can treat the
failed call the same way as other lnet_parse() failures.

Returning zero results in at least one bug in socklnd where a
reference on a ksock_conn can be leaked which prevents socklnd from
shutting down.

Fixes: 47b7b31978 ("LU-8106 lnet: Do not drop message when shutting down LNet")
Test-Parameters: trivial testlist=sanity-lnet
HPE-bug-id: LUS-15794
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ic403619c6dccf3921c46a674808c404adad7a30e
Reviewed-on: https://review.whamcloud.com/46711
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15617 contrib: Add shellcheck to prepare-commit-msg 05/46705/6
Arshad Hussain [Fri, 4 Mar 2022 06:41:06 +0000 (12:11 +0530)]
LU-15617 contrib: Add shellcheck to prepare-commit-msg

Add shellcheck verifiction to prepare-commit-msg.
SHELLCHECK_OPT export can be used to further add
option if the user wants. 'shellcheck' by deault
is set to 'yes' (SHELLCHECK_RUN="yes"). However,
it can be switched off by setting SHELLCHECK_RUN=
Tested on shellcheck version 0.8.0

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Id0603b26202b92f68d43b82a3b2d846dd634c20e
Reviewed-on: https://review.whamcloud.com/46705
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>
22 months agoLU-15598 tgt: free allocated page on error 59/46659/2
Andreas Dilger [Tue, 1 Mar 2022 04:49:53 +0000 (21:49 -0700)]
LU-15598 tgt: free allocated page on error

Free allocated page if cfs_crypto_hash_init() fails.

Fixes: b1e7be00cb6e ("LU-10472 osc: add T10PI support for RPC checksum")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0a45a82a57a98ad2517ccf50a2be1e8d65550bb5
Reviewed-on: https://review.whamcloud.com/46659
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
22 months agoLU-15596 build: set TARBALL with m-a build helper for debs 39/46639/12
Shaun Tancheff [Fri, 25 Mar 2022 18:31:06 +0000 (13:31 -0500)]
LU-15596 build: set TARBALL with m-a build helper for debs

debs built using module-assistant tool by default scan
for packages and may find a random lustre tarball

Specify the correct tarball with the TARBALL
environment variable to avoid default search picking an
incorrect tarball source.

HPE-bug-id: LUS-10783
Test-Parameters: trivial
Fixes: 1d97ac16d8 ("LU-14948 build: Warn about /usr/src/lustre.tar.bz2")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Iaa5a31aaa81e11ee97ae2ea27811c7a4399a0efa
Reviewed-on: https://review.whamcloud.com/46639
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15573 build: remove mpi, CC deps from config cache 62/46562/2
Shaun Tancheff [Sun, 20 Feb 2022 17:49:39 +0000 (12:49 -0500)]
LU-15573 build: remove mpi, CC deps from config cache

Also drop mpi and CC dependencies compiler type from the
initial values in the configure cache as these may be
changed during the setup in the rpm spec or debian build rules

Test-Parameters: trivial
Fixes: a5084c2f2e ("LU-14937 build: re-use config cache in 'make rpms/debs'")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I986c2ae3653deae08b9da8d64d0b3c02fdc8fa2b
Reviewed-on: https://review.whamcloud.com/46562
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-9243 gss: fix GSS struct definition badness 43/46543/6
Sebastien Buisson [Thu, 17 Feb 2022 15:40:20 +0000 (16:40 +0100)]
LU-9243 gss: fix GSS struct definition badness

struct lgssd_ioctl_param should not be defined in multiple places. So
move it to a new header file lgss.h that can be included from kernel
space and user space.

struct gss_header, struct gss_rep_header, struct gss_err_header and
struct gss_wire_ctx are going on the wire, so they need to be moved to
lustre_idl.h, and be wire-checked.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I97c4a8322e6bb7627c6dff5f068931278f4567d7
Reviewed-on: https://review.whamcloud.com/46543
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-14875 import: fix bad CPT read 41/46541/2
Cyril Bordage [Thu, 17 Feb 2022 11:49:16 +0000 (12:49 +0100)]
LU-14875 import: fix bad CPT read

When importing, CPT was read from tunables field but in fact, it is in
the same level in the YAML file generated during export.

Test-parameters: trivial testlist=sanity-lnet

Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: Iea7b6189ad1a25b95ae6416d75ee2cbe4dca2fbf
Reviewed-on: https://review.whamcloud.com/46541
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15559 tests: add do_node_vp() and do_facet_vp() 35/46535/4
John L. Hammond [Wed, 16 Feb 2022 17:54:26 +0000 (11:54 -0600)]
LU-15559 tests: add do_node_vp() and do_facet_vp()

Add new test-framework functions (do_node_vp() and do_facet_vp())
which carefully escape and quote command lines for execution on the
local or remote node. Add sanityn test_0 to verify.

Test-Parameters: trivial env=ONLY="0" testlist=sanityn
Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: Ic491b0148e6ef11ecd0b3ccce983afcf4d1300e5
Reviewed-on: https://review.whamcloud.com/46535
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15635 ldiskfs: Interface change fix server v5.10 75/46775/6
Shaun Tancheff [Fri, 11 Mar 2022 17:14:39 +0000 (00:14 +0700)]
LU-15635 ldiskfs: Interface change fix server v5.10

Linux v5.9-rc7-8-g15ed2851b0f4
    ext4: remove unused argument from ext4_(inc|dec)_count

Test for ext4_inc_count with 2 arguments and provide a compat
wrapper for ldiskfs_inc|dec_count that discards handle has
needed.

HPE-bug-id: LUS-10808
Fixes: c93a3e5b15 ("LU-14195 ldiskfs: update patches for Linux 5.10")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I48fb52e67ad334e2fc0c045e96fc5dffd3243842
Reviewed-on: https://review.whamcloud.com/46775
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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>
22 months agoLU-15538 lnet: DLC sets map_on_demand incorrectly 92/46492/2
Chris Horn [Sat, 5 Feb 2022 23:15:30 +0000 (23:15 +0000)]
LU-15538 lnet: DLC sets map_on_demand incorrectly

When any NET or LND tunable is specified via CLI or yaml, then the
whole tunables struct gets memset to 0, or in the case of yaml config,
0 gets assigned to any tunable that isn't specified in the yaml. This
causes a problem for map_on_demand because 0 is a valid value for that
parameter, and ko2iblnd cannot know whether the user specified that 0
should be used or if DLC is specifying that the parameter was unset.

Rather than setting this parameter to 0 in the LND tunables struct,
have DLC set it to UINT_MAX to indicate that ko2iblnd should use the
value of the kernel module parameter.

Test-Parameters: trivial
HPE-bug-id: LUS-10740
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I303e64d4d402ba61b5ae3e3910873f192a4a2845
Reviewed-on: https://review.whamcloud.com/46492
Reviewed-by: James Simmons <jsimmons@infradead.org>
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: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15521 spec: fix bare words error with rpm 4.16 71/46471/3
Jian Yu [Mon, 7 Feb 2022 18:21:47 +0000 (10:21 -0800)]
LU-15521 spec: fix bare words error with rpm 4.16

RPM 4.16 removed support for bare words in expressions
(eg a == b needs to be "a" == "b" now). The change is
backward compatible. More changes are in:
https://rpm.org/wiki/Releases/4.16.0

This patch accommodates the above change and fixes more
errors/warnings:
- E: specfile-error error: bare words are no longer supported,
     please use "...":  redhat=="redhat" || redhat=="fedora"
- E: specfile-error warning: extra tokens at the end of %else
     directive in line 140:  %else #for Suse
- W: macro-in-comment %optflags
- W: macro-in-comment %{name}

Test-Parameters: trivial

Change-Id: I725c47f62be7762a89e5919fd2865e2fb2ced407
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46471
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15522 util: make readline() static 65/46465/2
John L. Hammond [Sun, 6 Feb 2022 17:45:02 +0000 (11:45 -0600)]
LU-15522 util: make readline() static

In libcfs/libcfs/util/parser.c make readline() static to avoid
conflicting with the real readline().

Test-Parameters: trivial
Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: I4b90fd5d22c9fd5d193f5d18588afd3d97ca591c
Reviewed-on: https://review.whamcloud.com/46465
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15508 gss: protect from arbitrary write to init channel 61/46461/2
Sebastien Buisson [Fri, 4 Feb 2022 14:53:35 +0000 (15:53 +0100)]
LU-15508 gss: protect from arbitrary write to init channel

In case some arbitrary data was written to the gss init channel,
directly return -EINVAL. This protects against unsolicited
authentication requests, and avoids having a dandling entry
in the auth init cache.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Iadde630012e4ded83f9609fbb3e10b2e092deb57
Reviewed-on: https://review.whamcloud.com/46461
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15509 lnet: Ping buffer ref leak in lnet_peer_data_present 31/46431/2
Chris Horn [Wed, 2 Feb 2022 22:05:15 +0000 (22:05 +0000)]
LU-15509 lnet: Ping buffer ref leak in lnet_peer_data_present

lnet_peer_merge_data() and lnet_peer_set_primary_data() are
responsible for dropping the reference on the ping buffer that is
taken by lnet_peer_push_event() and lnet_discovery_event_reply().
However, there are some error paths in lnet_peer_data_present()
where we do not call either lnet_peer_merge_data() or
lnet_peer_set_primary_data(). In these cases, we need to drop
the reference on the ping buffer otherwise it will leak.

HPE-bug-id: LUS-10715
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I36ba0017caa9d6ce139f94090912496f14eda626
Reviewed-on: https://review.whamcloud.com/46431
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15511 misc: allow Lustre-change and Lustre-commit 20/46420/3
Andreas Dilger [Wed, 2 Feb 2022 02:34:34 +0000 (19:34 -0700)]
LU-15511 misc: allow Lustre-change and Lustre-commit

Allow the Lustre-change:, Lustre-commit:, Linux-commit: labels in
the signoff section.  Verify that Lustre-change: has a valid-looking
Gerrit URL in "permalink" format "https://review.whamcloud.com/nnnnn".
Verify -commit: labels have a valid-looking Git hashes (40 hex chars),
though the actual hash cannot be verified because it may be from a
different Git repository.

Shorten the help message in case of error, and add "commit-msg --help"
to print the full commit format help.

Allow lines over 70 chars that contain URLs, which cannot be shorter.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I866ab91b33f6e52ff893344df74af243903ebbe5
Reviewed-on: https://review.whamcloud.com/46420
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alena Nikitenko <anikitenko@ddn.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15393 lod: skip qos for qos_threshold_rr=100 88/46388/3
Alexander Boyko [Mon, 31 Jan 2022 14:04:08 +0000 (09:04 -0500)]
LU-15393 lod: skip qos for qos_threshold_rr=100

Current implementation of qos allocation is called for
every statfs update. It takes lq_rw_sem for write and
recalculate penalties, even whith setting qos_threshold_rr=100.
Which means always use rr allocation. Let's skip unnecessary
locking and calculation for 100% round robin allocation.

HPE-bug-id: LUS-10388
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I2fcc272d00a988ca4ba0f745b1d5809d65b28654
Reviewed-on: https://review.whamcloud.com/46388
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15493 tests: facet_failover() improvements 59/46359/10
Elena Gryaznova [Mon, 7 Feb 2022 14:14:25 +0000 (17:14 +0300)]
LU-15493 tests: facet_failover() improvements

Fix template matching in affected facets accounting
(when the == and != operators are used, the string to the
right of the operator is considered a pattern).

Reduce failover duration done by facet_failover(): long
failover duration needs increasing of ldlm_enqueue_min to
avoid evictions with striped objects, so let's do node reboot
and mount on failover node in parallel.

Make wait_clients_import_state() working with a facet list.

Test-Parameters: env=CONF_SANITY_EXCEPT=32a
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Signed-off-by: Andriy Skulysh <andriy.skulysh@hpe.com>
HPE-bug-id: LUS-7112, LUS-9901, LUS-10718
Change-Id: Ibbeeea49632acce590219da53f322afb44fa4ffa
Reviewed-on: https://review.whamcloud.com/46359
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15492 build: fallthrough macro for pre/post gcc-7 57/46357/4
Shaun Tancheff [Fri, 28 Jan 2022 07:56:33 +0000 (01:56 -0600)]
LU-15492 build: fallthrough macro for pre/post gcc-7

gcc-7.5 on openSUSE 15:
   error: this statement may fall through [-Werror=implicit-fallthrough=]

Use the __attribute__((fallthrough)) for gcc-7 and later.
and use a no op statement for earlier gcc where the fallthrough
attribute is not available.

Test-Parameters: trivial
Fixes: 5549b1b9e0 ("LU-15220 lustre: use 'fallthrough' pseudo keyword for switch")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ib72f5996149c738805f15e354e1e1606d981ce29
Reviewed-on: https://review.whamcloud.com/46357
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-13906 build: Fix %{name}-osd-ldiskfs-mount 41/46341/3
Shaun Tancheff [Fri, 28 Jan 2022 08:15:00 +0000 (15:15 +0700)]
LU-13906 build: Fix %{name}-osd-ldiskfs-mount

The following error occurs during installation:

error: Failed dependencies:
    lustre-osd-ldiskfs-mount = 2.14.57_56_g4d94d2f is needed by
    kmod-lustre_ib-osd-ldiskfs-2.14.57_56_g4d94d2f-1.el8.x86_64

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Idbcdbd5a1e7793c1359f90c1035ded9fe8e90576
Reviewed-on: https://review.whamcloud.com/46341
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-13906 build: Enable using ldiskfsprogs without wc tag 40/46340/5
Shaun Tancheff [Tue, 1 Feb 2022 16:14:43 +0000 (10:14 -0600)]
LU-13906 build: Enable using ldiskfsprogs without wc tag

HPE ldiskfsprogs internal versioning is tagged with 'cr',
Whamcloud ldiskfsprogs internal version is tagged with 'wc'.

Instead depend on an ldiskfsprogs > 1.45.6

Test-Parameters: trivial
HPE-bug-id: LUS-10712
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ic1c6037aaf4d9877ee9a3cf54c9285dd36abf64d
Reviewed-on: https://review.whamcloud.com/46340
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15420 uapi: avoid gcc-11 -Werror=stringop-overread 19/46319/4
James Simmons [Sat, 5 Feb 2022 16:34:22 +0000 (09:34 -0700)]
LU-15420 uapi: avoid gcc-11 -Werror=stringop-overread

GCC 11 warns about string and memory operations on fixed address:

In function ‘strlen’,
    inlined from ‘changelog_rec_sname’ at include/uapi/linux/lustre/lustre_user.h:1981:19,
    inlined from ‘mdd_changelog_rec_ext_rename’ at lustre/mdd/mdd_dir.c:932:2,
    inlined from ‘mdd_changelog_ns_store’ at lustre/mdd/mdd_dir.c:1061:3:
include/linux/fortify-string.h:25:33: error: ‘__builtin_strlen’
reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
   25 | #define __underlying_strlen     __builtin_strlen

The reason is that we are looking for an address right after the end
of the chanelog record header which gcc thinks is an overrun. Rework
the code to allow us to index the memory right after the changelog
record header.

Also fix a long hidden bug in the lustre snmp code.

Change-Id: I13479b9074a392330d39f01656b26f9e9a91a8ec
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/46319
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
22 months agoLU-15480 build: style cleanup lustre/tests/aiocp.c 97/46297/6
Shaun Tancheff [Wed, 16 Feb 2022 09:19:00 +0000 (03:19 -0600)]
LU-15480 build: style cleanup lustre/tests/aiocp.c

Add implicit-fallthrough decorator
Also some minor style-cleanups

Test-Parameters: trivial
HPE-bug-id: LUS-10201
Fixes: 689714eb51 ("LU-13846 llite: move iov iter forward by ourself")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I3be3b27c1c006d13820ea55a84c083fbfc8c4b0f
Reviewed-on: https://review.whamcloud.com/46297
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15474 test: facet_failover() should mount all facets concurrently 66/46266/2
Andriy Skulysh [Fri, 24 Jul 2020 09:07:27 +0000 (12:07 +0300)]
LU-15474 test: facet_failover() should mount all facets concurrently

A single host can hold multiple facets.
They all are needed to be mounted after reboot.
Mounting all facets for in one by one mode increases
total recovery time and leads to evictions
while using striped files.

Change-Id: Ifa76dfd080cd89f1316ccb1d5552bb12d070168a
HPE-bug-id: LUS-9141
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Signed-off-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-on: https://review.whamcloud.com/46266
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@hpe.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-9859 libcfs: add "default" keyword for debug mask 51/46251/3
Andreas Dilger [Fri, 21 Jan 2022 07:20:56 +0000 (00:20 -0700)]
LU-9859 libcfs: add "default" keyword for debug mask

Allow "lctl set_param debug=default" to reset the debug mask to
the default value.  This is useful if the debug needs to be set
to a higher value temporarily, but should be easily reset back
to the original value afterward.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I7d0d8fb81e51afb5ea6f29abea0d0814de3ebbe5
Reviewed-on: https://review.whamcloud.com/46251
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15420 llite: add rcu argument to ->get_acl() callback 86/46086/5
Jian Yu [Tue, 25 Jan 2022 05:51:02 +0000 (21:51 -0800)]
LU-15420 llite: add rcu argument to ->get_acl() callback

Kernel 5.15 commit 0cad6246621b5887d5b33fea84219d2a71f2f99a
added a rcu argument to the ->get_acl() callback.

Test-Parameters: trivial
Change-Id: Icd711b38dda1a5a3c56bd631fa2edd94eab3572c
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46086
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15412 tests: Let init_clients_lists() export client vars 94/45994/7
Xinliang Liu [Fri, 7 Jan 2022 02:41:00 +0000 (02:41 +0000)]
LU-15412 tests: Let init_clients_lists() export client vars

init_clients_lists() counts the value of client related variables
correctly. So let it define and export these variables.

This patch can fix sanity test 807 stuck issue when running on
multi-node Lustre cluster and CLIENTS is empty.

Also cleanup client count checking. Now CLIENTS is always set.

Change-Id: I9a5d4b9bde401e14e1d7f6f88b04c8d1c6aea11a
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Reviewed-on: https://review.whamcloud.com/45994
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15393 lod: use killable semaphore for creation path 21/45921/7
Alexander Boyko [Wed, 22 Dec 2021 12:06:16 +0000 (07:06 -0500)]
LU-15393 lod: use killable semaphore for creation path

lod_ost_alloc_qos() function sleeps during ost failover, but object
allocation could use different OSTs. The patch changes
down_write call to down_write_killable and adds timer for a
wakeup.

The main idea of this fix is next, when OST is lost during
lod_ost_alloc_rr() and MDT does not have precreated objects for it
lod_ost_alloc_rr()->..->lod_qos_declare_object_on() would sleep while
holding a lq_rw_sem for read. Any creation thread would stuck at
lod_ost_alloc_qos() waiting lq_rw_sem for write, after statfs update.
Whith a fix sleep is limited and allocation would going through
lod_ost_alloc_rr(). For read lq_rw_sem is shared and stripe allocation
would skip OST without objects.

lod_ost_alloc_rr() refills OST pool with a lq_rw_sem for write, when
lq_rr.lqr_flags has LQ_DIRTY. This should happen only when OST is
added/removed. No need to set LQ_DIRTY for lq_rr when statfs get
error, this flag does not affect any change for pool list at
lod_qos_calc_rr().

Change behaviour for lod_check_and_reserve_ost(), it  would sleep
during object allocation for speed 2 only.

HPE-bug-id: LUS-10388
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I4768c4cf7d2f9f02f0a9e0dfb6d15e02932cb5fe
Reviewed-on: https://review.whamcloud.com/45921
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-13783 sec: support of native Ubuntu 20.04 HWE 5.8 kernel 38/46238/10
James Simmons [Thu, 17 Feb 2022 13:44:22 +0000 (06:44 -0700)]
LU-13783 sec: support of native Ubuntu 20.04 HWE 5.8 kernel

For Linux 5.5 kernel a patch to improve nokey names was landed
that removed several variables that Lustre's llite and mdt layer
were using. Rework the code to use other defines that exist.
Second change for Ubuntu is several backports to handle a few
variables changing across different kernel versions. One is the name
change of DCACHE_ENCRYPTED_NAME and the other being
is_chipertext_name. So the simpler approach Ubuntu took was to use
fscrypt_prepare_lookup() and fscrypt_is_nokey_name() to work
around these changes. Lastly the good news is for 5.12 the
stomping of ll_d_ops no longer happens and the special
revalidate_dentry fscrypto function is exported.

Change-Id: I7f70fe9abddf34798e2e01b35099c9a032d92b91
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-on: https://review.whamcloud.com/46238
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>
22 months agoLU-15317 osc: Add RPC to iotrace 94/45894/8
Patrick Farrell [Wed, 9 Feb 2022 21:25:10 +0000 (16:25 -0500)]
LU-15317 osc: Add RPC to iotrace

Add RPCs to iotrace debugging.

To avoid creating too much debug output, this debug
ignores the possiblity that an RPC contains non-contiguous
extents.  Thus the eventual visualization will act as
though the RPC is a continuous whole.  I judge this to be
superior to the amount of log data and complexity of
capturing each extent separately.  If that level of detail
is needed, a higher debug level can be used.

Test-parameters: trivial

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I6fe416ba44be5572f130704ba9d3e9b85d09c656
Reviewed-on: https://review.whamcloud.com/45894
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15317 llite: Add COMPLETED iotrace messages 84/46484/3
Patrick Farrell [Wed, 9 Feb 2022 21:14:23 +0000 (16:14 -0500)]
LU-15317 llite: Add COMPLETED iotrace messages

It's very useful to see how long an I/O call took.  There
are other ways to do this, but the goal is for iotrace to
provide all necessary information for basic I/O performance
analysis, so we add COMPLETED messages to iotrace.

Test-Parameters: trivial

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I17f52ebc87a31d5ba34f63dc8b6a279e83cd10ef
Reviewed-on: https://review.whamcloud.com/46484
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15317 llite: Add FID to async ra iotrace 12/45912/7
Patrick Farrell [Tue, 21 Dec 2021 16:34:53 +0000 (11:34 -0500)]
LU-15317 llite: Add FID to async ra iotrace

IOtrace log entries need to include the FID of the file
concerned.  Add this to async readahead.

test-parameters: trivial

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I8d788969f29412ce88f1cafa229977f6efa20962
Reviewed-on: https://review.whamcloud.com/45912
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15317 llite: Add strided readahead to iotrace 88/45888/4
Patrick Farrell [Sat, 18 Dec 2021 21:27:59 +0000 (16:27 -0500)]
LU-15317 llite: Add strided readahead to iotrace

We need to capture some additional parameters to correctly
understand the behavior of strided readahead.  Add these
parameters to the existing iotrace message.

test-parameters: trivial

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I7caddf9dfaf9ba5f2645d045d5a4a50562cc1b54
Reviewed-on: https://review.whamcloud.com/45888
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>
22 months agoLU-15317 llite: Make iotrace logging quieter 87/45887/4
Patrick Farrell [Sat, 18 Dec 2021 21:23:52 +0000 (16:23 -0500)]
LU-15317 llite: Make iotrace logging quieter

Most of the time, we don't read any pages with readahead,
since we're moving through the window and aren't ready to
read more yet.  That's important for readahead debug, but
there's no need to log it for iotrace.  (This matters
because without this change, this messsage is the large
majority of iotrace messages.)

test-parameters: trivial

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I58197acd1ef97c903320a2433ec1d5dcb0e46bd0
Reviewed-on: https://review.whamcloud.com/45887
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>
22 months agoLU-11787 test: Fix checkfilemap tests for 64K page 29/45629/11
James Simmons [Mon, 31 Jan 2022 17:44:46 +0000 (12:44 -0500)]
LU-11787 test: Fix checkfilemap tests for 64K page

File mapping is page size aligned. Modify the tests to handle 64K
page.

Test-Parameters: trivial clientdistro=el8.5 clientarch=aarch64 testlist=sanityn env=ONLY="71a 71b"
Test-Parameters: trivial clientdistro=el8.5 clientarch=ppc64le testlist=sanityn env=ONLY="71a 71b"
Change-Id: I316a197db8cdd0f9064431f8c572b43adf6110b8
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Reviewed-on: https://review.whamcloud.com/45629
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15583 build: Update ZFS version to 2.1.2 91/45591/6
Jian Yu [Wed, 11 May 2022 23:26:41 +0000 (16:26 -0700)]
LU-15583 build: Update ZFS version to 2.1.2

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

Change-Id: If7c81a4b1fe13e29eea1c277b896223f5c06b31a
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45591
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15207 libcfs: reset hs_rehash_bits 33/45533/8
Alex Zhuravlev [Thu, 11 Nov 2021 08:19:46 +0000 (11:19 +0300)]
LU-15207 libcfs: reset hs_rehash_bits

if rehash work is cancelled, then nobody resets
hs_rehash_bits and the first iterator asserts
at LASSERT(!cfs_hash_is_rehashing(hs)) in
cfs_hash_for_each_relax().

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I1a567f6be77ca6c45e5d4f256722206b12588554
Reviewed-on: https://review.whamcloud.com/45533
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15193 quota: expand QUOTA_MAX_TRANSIDS to 12 56/45456/6
Lei Feng [Thu, 4 Nov 2021 11:41:06 +0000 (19:41 +0800)]
LU-15193 quota: expand QUOTA_MAX_TRANSIDS to 12

In some rare cases 12 quota ids are needed.
Usually (user, group) * (block, inode) * (inode, parent) = 8 qids
are needed. But with project id,
(user, group, project) * (block, inode) * (inode, parent) = 12 qids
are needed.

Change-Id: I4b3ee197f6e274abda06edf60b246f089fe28d10
Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial testlist=sanity-quota
Reviewed-on: https://review.whamcloud.com/45456
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Stephane Thiell <sthiell@stanford.edu>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15082 osp: invalidate statfs data from the timer callback 99/45199/11
Alex Zhuravlev [Tue, 12 Oct 2021 05:26:21 +0000 (08:26 +0300)]
LU-15082 osp: invalidate statfs data from the timer callback

osp_statfs_timer_cb() can be called just before statfs data gets
stale. this in turn may cause early wakeup to the precreate thread
which would find statfs data still up-to-data and go back to slepp.
if no precreate happens to this OSP (e.g. due to current space
usage), then the precreate thread will stay asleep for a long time,
statfs data won't get refreshed and this may block new objects
on the corresponding OST.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I86e16eed6f1068702db696a9ddec7a22994180b7
Reviewed-on: https://review.whamcloud.com/45199
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-14979 lnet: set max recovery interval duration 27/44927/8
Cyril Bordage [Wed, 15 Sep 2021 16:15:08 +0000 (18:15 +0200)]
LU-14979 lnet: set max recovery interval duration

Add a tunable parameter to limit the recovery ping interval which was
previously statically set to 900.
This can be done by using:

  lnetctl set max_recovery_ping_interval <value>

Modify sanity-lnet test 210/211 to validate this new functionality.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I766ceb6e03ffdab125005e16472b6f9eeadfb9d5
Reviewed-on: https://review.whamcloud.com/44927
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-14264 tests: make PARALLEL available to all suites 63/44763/5
James Nunez [Thu, 26 Aug 2021 23:27:16 +0000 (17:27 -0600)]
LU-14264 tests: make PARALLEL available to all suites

The PARALLEL environment variable is checked and a default
value is set in the sanity test suite, but recovery-small
also uses PARALLEL and does not check/initialize it.

Move check and set the PARALLEL environment variable to a
default value in the init_test_env() routine in
test-framework.sh.

Fixes: 688d5da6a89 (“LU-12846 mdd: return error while delete failed”)
Fixes: 26e8f1137b8 (“LU-13116 mgc: do not lose sptlrpc config lock”)

Test-Parameters: trivial testlist=sanity,recovery-small
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: If773e2ea7300056a0ef00a2cb24e13e20a971bd6
Reviewed-on: https://review.whamcloud.com/44763
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15483 tests: Improve test 398b 21/44321/15
Patrick Farrell [Thu, 15 Jul 2021 19:15:12 +0000 (15:15 -0400)]
LU-15483 tests: Improve test 398b

Test 398b is currently only writing 3 MiB (12 MiB/4) of
data from each thread in the racing set (4 DIO, 4 BIO).
This is such a small amount that it's probably finishing
too quickly to generate the intended overlap & races most
of the time.

It also currently writes only at PAGE_SIZE, which excludes
a lot of possible races.

This is currently a pretty fast test - ~ 2 seconds on my
local machine, similar on Maloo - so let's have it write 4
times more data and use 4 different block sizes, so it will
hit more races.

This is 16x more I/O, but the test still only takes around
16 seconds on my local machine.

This is motivated by difficulties dealing with rare
failures while developing the LU-13799 patch series and
hoping to make them easier to catch.

Test-Parameters: trivial testlist=sanity env=ONLY=398b,ONLY_REPEAT=50
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I1092023a526c085dfacd1bd112c2ebb714da63e5
Reviewed-on: https://review.whamcloud.com/44321
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wangshilong1991@gmail.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-14832 llite: Correct cl_env comments 91/44191/6
Patrick Farrell [Thu, 8 Jul 2021 19:34:33 +0000 (15:34 -0400)]
LU-14832 llite: Correct cl_env comments

The comments related to cl_env caching behavior are
dangerously out of date and misleading, describing an
old caching mechanism which was linked to threads.

This has not been present for some time, and we cannot use
cl_env_get to get the environment for a thread as it
describes.

Correct the various comments and remove a now extraneous
include.

Test-Parameters: trivial
Fixes: 4533271278 ("LU-4257 obdclass: Get rid of cl_env hash table")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I0a855094c66281bfb35e234ecad1af3b923e8538
Reviewed-on: https://review.whamcloud.com/44191
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wangshilong1991@gmail.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
22 months agoLU-14771 ptlrpc: Rearrange version mismatch message 29/44029/3
Andrew Elwell [Thu, 17 Jun 2021 23:38:40 +0000 (09:38 +1000)]
LU-14771 ptlrpc: Rearrange version mismatch message

Minor change to reposition the client version string on
console warning message, and merge split string to one line

Test-Parameters: trivial
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Change-Id: I89242cff873028f4f76bafdd5a14f169a98f7875
Reviewed-on: https://review.whamcloud.com/44029
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-8137 utils: fix llverdev for use on regular files 30/43230/14
Andreas Dilger [Wed, 7 Apr 2021 20:59:45 +0000 (14:59 -0600)]
LU-8137 utils: fix llverdev for use on regular files

Allow llverdev to work with regular files to verify data contents.

Add a parameter to allow specifying the maximum file size to use.
Allow the use of unit suffix when specifying sizes as arguments.
If the file size is zero, write until the filesystem is full.
Use pread() and pwrite() to avoid having to deal with file offsets.

Add sanityn test_56a/56b to verify proper operation on a large file.

Update llverdev.8 man page to describe options properly.

Test-Parameters: trivial testlist=sanityn env=ONLY=56a,56b ostsizegb=12
Test-Parameters: fstype=zfs testlist=sanityn env=ONLY=56a,56b ostsizegb=12
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib06dc989fe692fd6aae388a79d9aa28f702540e5
Reviewed-on: https://review.whamcloud.com/43230
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Anjus George <georgea@ornl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15460 test: wait quota pool to be prepared 53/46853/4
Hongchao Zhang [Fri, 25 Mar 2022 02:34:56 +0000 (10:34 +0800)]
LU-15460 test: wait quota pool to be prepared

When one OST pool was created, the corresponding quota pool
could need more time to prepare after it was created, then
fail to check the info of the quota pool

Test-Parameters: trivial
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ibea33403639087f27e438d71c0e87fea5367bc3e
Reviewed-on: https://review.whamcloud.com/46853
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-14503 o2iblnd: clean up zombie connections on shutdown 68/42068/6
Serguei Smirnov [Thu, 18 Mar 2021 03:52:16 +0000 (20:52 -0700)]
LU-14503 o2iblnd: clean up zombie connections on shutdown

Clean up zombie connections on net shutdown in o2iblnd
Wake up connd threads and wait for them to do the clean-up
before proceeding.

Test-Parameters: trivial
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Iff8424d9be7401987046fe9aef6e7a787f5efe83
Reviewed-on: https://review.whamcloud.com/42068
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-14422 utils: check empty stripe-count/offset setting 93/41793/6
Bobi Jam [Tue, 23 Mar 2021 03:18:25 +0000 (11:18 +0800)]
LU-14422 utils: check empty stripe-count/offset setting

Prohibit "" stripe count and stripe offset setting in lfs setstripe.

Test-Parameters: trivial
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I4d0cc2354c4249a31222e0f90de39e16ec4694a5
Reviewed-on: https://review.whamcloud.com/41793
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>
22 months agoLU-13970 llite: add option to disable Lustre inode cache 73/39973/14
Lai Siyao [Fri, 18 Sep 2020 09:53:17 +0000 (17:53 +0800)]
LU-13970 llite: add option to disable Lustre inode cache

A tunable option is added to disable Lustre inode cache:
"llite.*.inode_cache=0" (default =1)

When it's turned off, ll_drop_inode() always returns 1, then
the last iput() will release inode.

Add sanity test_433.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I0642bdc694dc365a05395c3fae98131e1e7723c6
Reviewed-on: https://review.whamcloud.com/39973
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
22 months agoLU-13906 build: consistent use of %{name} 62/39662/8
Shaun Tancheff [Fri, 28 Jan 2022 08:13:10 +0000 (15:13 +0700)]
LU-13906 build: consistent use of %{name}

Make the of the %{name} macro consistent across lustre packages

Fixes: cfaf0eb92005 ("LU-12214 build: fixes if the name is not just 'lustre'")
Test-Parameters: trivial
HPE-bug-id: LUS-5914, LUS-5915
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I71c0a0e77a0fc7319a166311e33d3ca9de60e499
Reviewed-on: https://review.whamcloud.com/39662
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-10973 lutf: Fix library path 02/46502/4
Amir Shehata [Thu, 10 Feb 2022 23:54:10 +0000 (15:54 -0800)]
LU-10973 lutf: Fix library path

Correct library path pointing the lnetconfig library.

Test-Parameters: trivial
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: I60089ba0e86d2c3406e283c44530793d84065674
Reviewed-on: https://review.whamcloud.com/46502
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-13547 tests: remove ea_inode from mkfs MDT options 82/38582/9
James Nunez [Tue, 12 May 2020 18:38:24 +0000 (12:38 -0600)]
LU-13547 tests: remove ea_inode from mkfs MDT options

The large_dir and ea_inode is enabled by default when MDTs
are formatted.  Thus, remove 'ea_inode' and 'large_dir'
from the mkfs options in the test-framework.

Add a test to make sure that these MDT features are enabled
by default.

Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I1b3f1bee7e0c091f8fffc9da0e769eed921dac8f
Reviewed-on: https://review.whamcloud.com/38582
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-12186 ec: add necessary structure member for EC file 19/38319/5
Bobi Jam [Mon, 2 May 2022 14:47:47 +0000 (10:47 -0400)]
LU-12186 ec: add necessary structure member for EC file

Added basic structure members for erasure-coding layout.

Test-Parameters: trivial
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I697dc144877d6c5fbe9335dc721200e43749f5d9
Reviewed-on: https://review.whamcloud.com/38319
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-14195 libcfs: test for nla_strscpy 76/46876/5
James Simmons [Wed, 25 May 2022 14:20:23 +0000 (10:20 -0400)]
LU-14195 libcfs: test for nla_strscpy

During the development of the Linux 5.10 kernel the function
nla_strlcpy() was replaced by nla_strscpy(). Handle this
change for Lustre.

Test-parameters: trivial
Change-Id: I47f12add619cfd88a3692f0760b8bcc35b7877d9
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/46876
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15788 lmv: try another MDT if statfs failed 52/47152/6
Alexander Boyko [Wed, 27 Apr 2022 08:36:49 +0000 (04:36 -0400)]
LU-15788 lmv: try another MDT if statfs failed

With lazystatfs option statfs could fail if MDT0 is offline.
This leads to MPICH->IOR fail during FOFB tests. A client
could get statfs data from different MDT at DNE setup.

HPE-bug-id: LUS-10581
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: Icec83aba0c3ddbc749b782787b1b52faadf34a3e
Reviewed-on: https://review.whamcloud.com/47152
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-12756 lnet: Avoid redundant peer NI lookups 23/36623/5
Chris Horn [Sun, 27 Oct 2019 17:44:23 +0000 (12:44 -0500)]
LU-12756 lnet: Avoid redundant peer NI lookups

Each caller of lnet_peer_ni_traffic_add() performs a subsequent call
to lnet_peer_ni_find_locked(). We can avoid the extra lookup by having
lnet_peer_ni_traffic_add() return a peer NI pointer (or ERR_PTR as
appropriate).

lnet_peer_ni_traffic_add() now takes a ref on the peer NI to mimic
the behavior of lnet_peer_ni_find_locked().

lnet_nid2peerni_ex() only has a single caller that always passes
LNET_LOCK_EX for the cpt argument, so this function argument is
removed.

Some duplicate code dealing with ln_state handling is removed from
lnet_peerni_by_nid_locked()

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I8e9e2449ef2b958b53abd59cd2c122e5492fbb34
Reviewed-on: https://review.whamcloud.com/36623
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-6864 osp: manage number of modify RPCs in flight 75/14375/23
Gregoire Pichon [Thu, 5 May 2022 21:42:56 +0000 (17:42 -0400)]
LU-6864 osp: manage number of modify RPCs in flight

Currently we use a rpc_lock to ensure concurrent in-flight
request are handled serially to prevent the execution status
from being over written. This patch changes the osp component
to send multiple modify RPCs in parallel to the MDT. This will
improve metadata performance of cross-MDT operations.

For testing replace mkdirmany with createmany -d which does the
same thing.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: Icb601afabd6767463634a4c7943ec4206bc758ec
Reviewed-on: https://review.whamcloud.com/14375
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15841 lod: iterate component to collect avoid array 93/47293/3
Bobi Jam [Wed, 11 May 2022 10:36:15 +0000 (18:36 +0800)]
LU-15841 lod: iterate component to collect avoid array

In newly created file, the mirror information hasn't been established
as LOD is trying allocate OST for its components, so we need to
iterate component instead of mirror to collect the avoid guidance
information.

Test-Parameters: testlist=sanity-flr env=ONLY=47,ONLY_REPEAT=40
Fixes: fabf3fe7 ("LU-9007 lod: improve obj alloc for FLR file")
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I6bbe5f6b6dfea06c5213b77b7ebb6a5d28aa0d17
Reviewed-on: https://review.whamcloud.com/47293
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15786 tests: get maxage param on mds1 properly 45/47145/2
Elena Gryaznova [Tue, 26 Apr 2022 14:25:41 +0000 (17:25 +0300)]
LU-15786 tests: get maxage param on mds1 properly

The correct maxage parameters on mds1:
  osp.${FSNAME}-MDT000[1-N]-osp-MDT0000.maxage

To reproduce the failure just run the following on
failover setup where mds1_HOST != mds1failover_HOST:
  sh llmount.sh
  ONLY="100b 100c" sh replay-single.sh

  error: get_param: param_path
   'osp/*MDT0000*MDT0001/maxage': No such file or directory
  sleep: missing operand
  Try 'sleep --help' for more information.

Fixes: 436cd4fd21 ("LU-14938 tests: fail_abort() in t-f to take care of MDTs")
Test-Parameters: trivial testlist=replay-single,recovery-small
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-10804
Reviewed-by: Vladimir Saveliev <vlaidimir.saveliev@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: Icbedb044c4a008868bd3a99d44aa1c350e7c9eaa
Reviewed-on: https://review.whamcloud.com/47145
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15754 lfsck: skip an inode if iget() returns -ENOMEM 79/47079/2
Artem Blagodarenko [Wed, 13 Apr 2022 20:01:58 +0000 (16:01 -0400)]
LU-15754 lfsck: skip an inode if iget() returns -ENOMEM

After the change
commit c2b6d621c4ffe9936adf7a55c8b1c769672c306f
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Thu Jun 28 15:53:17 2018 -0400 new primitive: discard_new_inode()

find_inode_fast() returns -ESTALE, but iget_locked() replaces
it to the NULL and finally ldiskfs_inode_attach_jinode()
returns -ENOMEM.

So this check in osd_iit_iget() doesn't work.

if (rc == -ENOENT || rc == -ESTALE)
    RETURN(SCRUB_NEXT_CONTINUE);

As a solution we can skip an inode if -ENOMEM returned

Hpe-bug-id: LUS-10833
Change-Id: Icb30610e46e2ab899a512761b63aea248c4f2ada
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Reviewed-on: https://review.whamcloud.com/47079
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15724 tests: MDT failover hang reproducer 06/47006/8
Alexander Boyko [Wed, 6 Apr 2022 09:39:27 +0000 (05:39 -0400)]
LU-15724 tests: MDT failover hang reproducer

The patch adds recovery-small 144a test to reproduce
MDT failover hang when precreate threads are blocked on objects.

LustreError: 0-0: Forced cleanup waiting for mdt-kjcf05-MDT0001_UUID
namespace with 46 resources in use, (rc=-110)

Test-Parameters: trivial testlist=recovery-small env=ONLY=144a
HPE-bug-id: LUS-10750
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I2743a1b5c8911d6982b527f7e7b7bbbaf310cd04
Reviewed-on: https://review.whamcloud.com/47006
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15724 osp: wakeup all precreate threads 05/47005/5
Alexander Boyko [Wed, 6 Apr 2022 09:06:46 +0000 (05:06 -0400)]
LU-15724 osp: wakeup all precreate threads

Number of threads could sleep at osp_precreate_reserve() and
wait objects from OST. When MDT stops Lustre should wakeup
all threads. When opd_pre_recovering is set any wakeup of
opd_pre_user_waitq is useless. Failover of MDT does not produce
disconnect event, only inactive, so osp_precreate_cleanup_orphans()
can not be awakened.

LustreError: 0-0: Forced cleanup waiting for mdt-kjcf05-MDT0001_UUID
namespace with 46 resources in use, (rc=-110)

 schedule_timeout at ffffffff8e551cd3
 osp_precreate_reserve at ffffffffc17d2d83 [osp]
 osp_declare_create at ffffffffc17c7eb9 [osp]
 lod_sub_declare_create at ffffffffc156415b [lod]
 lod_qos_declare_object_on at ffffffffc155bf42 [lod]
 lod_ost_alloc_rr.constprop.23 at ffffffffc155db2f [lod]
 lod_qos_prep_create at ffffffffc15630a6 [lod]
 lod_declare_instantiate_components at ffffffffc154b237 [lod]

HPE-bug-id: LUS-10750
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: If0164cfbecb1e358d9857421cb234559dc8cecbc
Reviewed-on: https://review.whamcloud.com/47005
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15132 mdc: Use early cancels for hsm requests 81/47181/5
Etienne AUJAMES [Mon, 2 May 2022 12:27:17 +0000 (14:27 +0200)]
LU-15132 mdc: Use early cancels for hsm requests

HSM RELEASE and RESTORE requests take EX layout lock on the MDT side.
So the client can use early cancel for its local lock on the resource
to limit the contention (mdt side).

This patch does not pack ldlm request inside the hsm request because
the field (RMF_DLM_REQ) does not exist in the request. Adding this
field inside the request would break compatibility with _old_ servers.

Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I30a57b4855c28eef9c55a9645d3b6c491f962b13
Reviewed-on: https://review.whamcloud.com/47181
Reviewed-by: Nikitas Angelinas <nikitas.angelinas@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-13363 lod: do object allocation in OST pool 36/38136/17
Emoly Liu [Thu, 14 Apr 2022 16:04:24 +0000 (12:04 -0400)]
LU-13363 lod: do object allocation in OST pool

Currently, the ltd->ltd_qos.lq_same_space boolean that decides
whether the LOD QOS allocator is active for an allocation or not
is tracked for the entire LOV. But when a pool is specified, this
judgement should be tracked on a per-pool basis.

sanity.sh test_116c is added to verify this patch.

Test-Parameters: ostcount=6 testlist=sanity env=ONLY=116c
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I463d5927c7a9c9171483615d2cec629ec10dc666
Reviewed-on: https://review.whamcloud.com/38136
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>
22 months agoLU-15800 ofd: take a read lock for fallocate 68/47268/5
Alex Zhuravlev [Tue, 10 May 2022 07:48:55 +0000 (10:48 +0300)]
LU-15800 ofd: take a read lock for fallocate

there is no need to take an write (exclusive) object's
lock for fallocate - we just need to serialize fallocate
vs destroy, all internal structures should be protected
by OSD and disk filesystem like the write path does.

Fixes: cdaaa87f6b ("LU-14214 ofd: fix locking in ofd_object_fallocate()")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I65986745865ee329c5257a7efca5e79403830608
Reviewed-on: https://review.whamcloud.com/47268
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15718 lnet: improve lnet_selftest speed 02/47002/4
Alexey Lyashkov [Wed, 6 Apr 2022 05:13:46 +0000 (08:13 +0300)]
LU-15718 lnet: improve lnet_selftest speed

lets replace a global spinlock with atomic variables,
to avoid cpu power limit in testing.

Test-Parameters: trivial testlist=lnet-selftest
HPE-bug-id: LUS-10812
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Change-Id: Ib12a3b3fe2fe300354e5a7c502bc6f5165e7d05c
Reviewed-on: https://review.whamcloud.com/47002
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 months agoLU-15832 lod: clear .do_index_ops in striping free 56/47256/2
Lai Siyao [Thu, 28 Apr 2022 14:48:01 +0000 (10:48 -0400)]
LU-15832 lod: clear .do_index_ops in striping free

LDLM lock can guarantee LOD object directory striping is safe to
access, but lod_striping_free_nolock() should clear .do_index_ops,
otherwise upon some failure the directory striping is freed, while a
subsequent dt_try_as_dir() skips striping initialization, and call
.do_index_ops directly, which will cause crash.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ib94a4ef2f8bf5f0d34521abff77d8be46ecbf428
Reviewed-on: https://review.whamcloud.com/47256
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>