Whamcloud - gitweb
fs/lustre-release.git
15 months agoLU-16272 libcfs: cfs_hash_for_each_empty optimization 72/48972/4
Alexander Zarochentsev [Thu, 20 Oct 2022 19:23:39 +0000 (22:23 +0300)]
LU-16272 libcfs: cfs_hash_for_each_empty optimization

Restarts from bucket 0 in cfs_hash_for_each_empty()
cause excessive cpu consumption while checking first empty
buckets.

HPE-bug-id: LUS-11311
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: Ic03875ea25101052468213043128912ac46daf32
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48972
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16440 tests: recovery-double-scale typo fix 44/49544/3
Elena Gryaznova [Tue, 3 Jan 2023 18:37:32 +0000 (19:37 +0100)]
LU-16440 tests: recovery-double-scale typo fix

Fix the typo.

Fixes: f8e56a25cfc3 ("LU-15412 tests: Let init_clients_lists() export client vars")
Test-Parameters: trivial testlist=recovery-double-scale
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-11422
Change-Id: I91a0c545f1eb82e6b502d9b0dc434fdb174db295
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49544
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>
15 months agoLU-15626 tests: Fix shellcheck error for rpc 35/49535/3
Timothy Day [Fri, 30 Dec 2022 21:29:59 +0000 (21:29 +0000)]
LU-15626 tests: Fix shellcheck error for rpc

This patch addresses the errors and warnings
reported by shellcheck for rpc.sh. It also
breaks up the triple nested subshell for better
readability.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I0d4afa83a6b9d4f825f31896a52dd30319b4bf51
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49535
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: Arshad Hussain <arshad.hussain@aeoncomputing.com>
15 months agoLU-15828 o2iblnd: reset hiw proportionally 97/49497/4
Serguei Smirnov [Thu, 22 Dec 2022 22:42:48 +0000 (14:42 -0800)]
LU-15828 o2iblnd: reset hiw proportionally

As a result of connection negotiation, queue depth may end up
being shorter than "peer_tx_credits" tunables value. Before this
patch, the high-water mark "lnd_peercredits_hiw" would be set at
min(current hiw, queue depth - 1).

For example, considering that hiw is allowed to only be as low as
half of peer_tx_credits, negotiating queue_depth/peer_credits down
from 32 to 8 would always result in hiw set at 7, i.e. credits would
be released as late as possible.

With this patch, if queue depth is reduced, hiw is set proportionally
relative to the level it was at before:
hiw = (queue_depth * lnd_peercredits_hiw) / peer_tx_credits

Using the above example with queue depth initially at 32, negotiating
down to 8 would result in hiw set to 4 if "lnd_peercredits_hiw" is
initially at 16, 17, 18, 19; hiw set to 5 if "lnd_peercredits_hiw" is
initially at 20, 21, 22, 23, and so on.

Test-Parameters: trivial
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I633933d7448db1ca88d3c65de9c29e870ca2c9fb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49497
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: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16382 config: ensure lutf.sh is included in dist 82/49382/2
Mr NeilBrown [Tue, 13 Dec 2022 00:59:26 +0000 (11:59 +1100)]
LU-16382 config: ensure lutf.sh is included in dist

The official 2.15.1 source distribution does not contain
lutf.sh.  As lustre.spec lists it (when LUTF is enabled) this causes a
build error.

It is likely not included because "./configure --enable-dist" was run
in a context where swig was not installed.

So when determining whether to enable lutf, first check for
enable_dist and in the case for enable_lutf="yes"

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: If5f856985a6d642822baba4b6ee301c04f851217
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49382
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16385 obdlcass: stop MGC before MGS 78/49378/4
Alex Zhuravlev [Mon, 12 Dec 2022 13:35:41 +0000 (16:35 +0300)]
LU-16385 obdlcass: stop MGC before MGS

drops a reference to MGC when MGS is being umounted so that
MGC doesn't try to disconnected from a missing MGS which
can take long and hurt HA.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib15f1ca56c47201bf6e29c12b3f81a11e55944ca
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49378
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
15 months agoLU-14555 lnet: asym route inconsistency warning 52/49352/3
Gian-Carlo DeFazio [Thu, 8 Dec 2022 23:17:26 +0000 (15:17 -0800)]
LU-14555 lnet: asym route inconsistency warning

remove LNET_UNDEFINED_HOPS from lnet_check_route_inconsistency()
where it is being treated as equivalent to 1 for the
value of lr_hops.

Due to the changes made in commit 3f2844dc9
"LU-14945 lnet: don't use hops to determine the route state",
LNET_UNDEFINED_HOPS is no longer considered equivalent to 1
for lr_hops in all cases, and it is valid to leave hops undefined
for multi-hop routes.

Therefore, having a multi-hop route with a hops of
LNET_UNDEFINED_HOPS is no longer inconsistent.

Fixes: 6ab060e58e ("LU-14555 lnet: asym route inconsistency warning")
Test-Parameters: trivial
Signed-off-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Change-Id: Iab8597f59c5f8d27b16dbeda79b41e9ec4777f52
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49352
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16284 utils: lfs getstripe follows symlink 03/49003/6
Lei Feng [Tue, 1 Nov 2022 02:57:39 +0000 (10:57 +0800)]
LU-16284 utils: lfs getstripe follows symlink

'lfs getstripe' prints the information of symlink target by default.
With '--no-follow' option it prints the information of symlink itself.

Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial
Change-Id: I6cef01af5bb2235bdcbf0b5c99af4b9ed5869515
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49003
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>
15 months agoLU-16202 build: bio_alloc takes struct block_device 20/48820/9
Shaun Tancheff [Mon, 14 Nov 2022 09:30:23 +0000 (03:30 -0600)]
LU-16202 build: bio_alloc takes struct block_device

Linux commit v5.17-rc2-21-g07888c665b40
   block: pass a block_device and opf to bio_alloc

Create a compatible bio_alloc wrapper to handle the change
in arguments and behavior.

HPE-bug-id: LUS-11267
Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: I060229b25785f46a9749fcdb18727af292a940ac
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48820
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
15 months agoLU-16165 sec: retry mechanism for identity cache 79/48579/4
Sebastien Buisson [Fri, 16 Sep 2022 16:02:51 +0000 (18:02 +0200)]
LU-16165 sec: retry mechanism for identity cache

Implement a retry mechanism in the identity cache in case the
identity up call times out.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ib70d3b851a6da3cf66dfed49b03be51da7886d01
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48579
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16121 llite: invalidate_folio and dirty_folio 66/48366/13
Shaun Tancheff [Tue, 8 Nov 2022 15:26:46 +0000 (09:26 -0600)]
LU-16121 llite: invalidate_folio and dirty_folio

linux commit v5.17-rc4-10-g128d1f8241d6
   fs: Add invalidate_folio() aops method

A struct folio is often analogous to a struct page however
a struct folio can represent (contain) multiple pages.

linux commit v5.17-rc4-38-g6f31a5a261db
   fs: Add aops->dirty_folio

__set_page_dirty_nobuffers() is replaced with filemap_dirty_folio()

Test-Parameters: trivial
HPE-bug-id: LUS-11197
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Iefe67615b333e066c49c4b884dad5bea3b3ae226
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48366
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
15 months agoLU-16342 mdt: not copy pool_name to quotactl in reply 42/49242/5
Sergey Cheremencev [Fri, 15 Jul 2022 10:06:43 +0000 (13:06 +0300)]
LU-16342 mdt: not copy pool_name to quotactl in reply

Don not copy pool_name in mdt reply to avoid out-of-bounds:
BUG: KASAN: slab-out-of-bounds in mdt_quotactl+0x13ff/0x1430 [mdt]

HPE-bug-id: LUS-10579
Change-Id: I34c4cd8aaccd938c95005dca06644e02132def34
Signed-off-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-on: https://es-gerrit.dev.cray.com/160899
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Tested-by: Vitaly Fertman <c17818@cray.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49242
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: Shaun Tancheff <shaun.tancheff@hpe.com>
15 months agoLU-16091 enc: S_ENCRYPTED flag on OST objects for enc files 98/48198/12
Sebastien Buisson [Thu, 11 Aug 2022 15:08:11 +0000 (17:08 +0200)]
LU-16091 enc: S_ENCRYPTED flag on OST objects for enc files

Add a dumb encryption context on OST objects being created, when the
LUSTRE_ENCRYPT_FL flag gets set in the LMA, for ldiskfs backend
targets. This leads ldiskfs to internally set the LDISKFS_ENCRYPT_FL
flag on the on-disk inode. Also, it makes e2fsprogs happy to see an
enc ctx for an inode that has the LDISKFS_ENCRYPT_FL flag.

Add a dumb encryption context on OST objects being opened, if there is
not already one, for ldiskfs backend targets. This is done by adding
the LUSTRE_ENCRYPT_FL flag if necessary, at the same time as atime
gets updated. It is some sort of live self-check that fixes OST
objects created with an older Lustre version.

Enhance lfsck to detect and fix OST objects belonging to encrypted
files that are missing the encryption flag. This is implemented in the
MDT-OST consistency routine, as part of the layout checking.

Also add sanity-sec test_62 and sanity-lfsck test_42 to exercise this.

Note this patch does not add any dumb encryption context on OST
objects when the backend is ZFS.

Test-Parameters: testlist=sanity-sec mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 fstype=zfs
Test-Parameters: testlist=sanity-sec mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 fstype=zfs
Test-Parameters: testlist=sanity-sec mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 fstype=zfs
Test-Parameters: testlist=sanity-sec mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 fstype=zfs
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I6bee3c82ee4d1a52275facf9e2b0d60061e0beef
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48198
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>
15 months agoLU-16008 tests: don't enforce umount in recovery-small/150 40/47940/5
Alex Zhuravlev [Wed, 13 Jul 2022 07:50:24 +0000 (10:50 +0300)]
LU-16008 tests: don't enforce umount in recovery-small/150

as such an enforcement disconnects all MDS clients, then
another MDS trying to talk to that original MDS gets evicted
and an unlucky RPC (e.g. rmdir in test cleanup) can fail with:
rm: cannot remove '...d110h.recovery-small/source_dir': Is a directory

Fixes: 57f3262baa7 ("LU-15788 lmv: try another MDT if statfs failed")

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I593e1425b44fc19cb7b2b7da33fa10590532f930
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47940
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-930 misc: improve .mailmap coverage 94/47894/5
Andreas Dilger [Mon, 29 Jun 2020 07:23:04 +0000 (01:23 -0600)]
LU-930 misc: improve .mailmap coverage

Improve .mailmap coverage and correctness for "git shortlog"
and related commands.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I41a2474f2c69e1e49b5f8569ca6cc7bfcf3ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47894
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@hpe.com>
Reviewed-by: Peter Jones <pjones@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-14824 test: sanity 413a/b unlink timeout 55/45955/16
Lai Siyao [Wed, 22 Dec 2021 12:26:49 +0000 (07:26 -0500)]
LU-14824 test: sanity 413a/b unlink timeout

Unlinking remote/striped directories is slow on zfs system, limit
total directory number for 1-stripe directory test in 413a/b on zfs
system, and don't test striped directory to avoid timeout.

Also limit total stripe object count to avoid timeout.

Test-Parameters: trivial
Test-Parameters: mdscount=2 mdtcount=4 fstype=ldiskfs testlist=sanity env=ONLY="413a 413b",ONLY_REPEAT=50
Test-Parameters: mdscount=2 mdtcount=4 fstype=zfs testlist=sanity env=ONLY="413a 413b",ONLY_REPEAT=50
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ie116e6df5aee3877ed9f093f58e7bd71f6c6d9d5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/45955
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>
15 months agoLU-14683 tests: get rid of no longer actual test 76/43676/6
Elena Gryaznova [Wed, 12 May 2021 18:59:23 +0000 (21:59 +0300)]
LU-14683 tests: get rid of no longer actual test

replay-single test_40() is no longer actual for
modern Lustre with Layout lock support.

Fixes: 945a97dbc2f0 ("LU-2628 tests: disable test_40 of replay-single")
Test-Parameters: trivial testlist=replay-single env=ONLY=40
Signed-off-by: Elenai Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-9970
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I51c3a05ef40f389535e04bd50cdf9fe51bca8acd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/43676
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-16210 llite: replace selinux_is_enabled() 75/48875/10
Etienne AUJAMES [Thu, 6 Oct 2022 13:30:54 +0000 (15:30 +0200)]
LU-16210 llite: replace selinux_is_enabled()

selinux_is_enabled() was removed from kernel 5.1.
The commit 39e5bfa add the kernel support by assuming SELinux to be
enabled if the function selinux_is_enabled() does not exist.

This has performances impacts: on older kernel (e.g: Centos7) getxattr
RPCs was not send for "security.selinux" if selinux was disabled.
Utilities like "ls -l" always try to get "security.selinux".
See the LU-549 for more information.

This patch uses security_inode_listsecurity() when mounting the
client to know if a LSM module (selinux) required a xattr to store
file contexts. If a xattr is returned we store it and use it for in
request security context.

For getxattr/setxattr we use the stored LSM's xattr to filter xattr
security contexts like security.selinux. If xattr does not match the
stored xattr name we returned -EOPNOTSUPP to userspace.

It adds also the s_security check for security_inode_notifysecctx() to
avoid calling this function if selinux is disabled (as in
nfs_setsecurity()).

For "Enforcing SELinux Policy Check" functionnality, the selinux check
have been moved in l_getsepol: -ENODEV is returned if selinux is
disabled.

Add a regresion test "sanity test_434" for this use case.

*Note:*
This patch detects that selinux is disabled without explicitly
disabled it in kernel cmdline. This is recommended for RHEL >= 8.5.

*Performances:*
Tests with "strace -c ls -l" with 100000 files on root in a multi VMs
env (on Rocky 9). FS is remount for each tests (cache is cleaned) and
selinux is disabled.
 __________________ ___________ _________
| Total time %     | lgetxattr | statx   |
|__________________|___________|_________|
|Without the patch:|    29%    |   51%   |
|__________________|___________|_________|
|With the patch:   |    0%     |   87%   |
|__________________|___________|_________|
"ls -l" uses lgetxattr to get "security.selinux".

Linux-commit: 3d252529480c68bfd6a6774652df7c8968b28e41

Fixes: 39e5bfa ("LU-12355 llite: include file linux/selinux.h removed")
Fixes: 9bcac0b ("LU-549 llite: Improve statfs performance if selinux is disabled")
Test-Parameters: clientselinux=false clientdistro=el7.9 testlist=sanity env=ONLY=434,ONLY_REPEAT=20
Test-Parameters: clientselinux=false clientdistro=el8.5 testlist=sanity env=ONLY=434,ONLY_REPEAT=20
Test-Parameters: clientselinux=false clientdistro=el8.6 testlist=sanity env=ONLY=434,ONLY_REPEAT=20
Test-Parameters: clientselinux clientdistro=el8.6 testlist=sanity-selinux
Test-Parameters: clientselinux clientdistro=el8.6 testlist=sanity-selinux
Test-Parameters: clientselinux clientdistro=el7.9 testlist=sanity-selinux
Test-Parameters: clientselinux clientdistro=el7.9 testlist=sanity-selinux
Signed-off-by: Etienne AUJAMES <etienne.aujames@cea.fr>
Change-Id: I4dac87ac0341b45a1c2fef836cdce0361017b3f5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48875
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-16227 utils: Add warning for lfs setdirstripe -D -i x,y,z 20/49420/6
Timothy Day [Thu, 15 Dec 2022 19:47:57 +0000 (19:47 +0000)]
LU-16227 utils: Add warning for lfs setdirstripe -D -i x,y,z

Adjust setdirstripe to be more user friendly. The
use of "-D -i x,y,z" now returns a clear error
that this is creating a default striped directory
layout and that this is a bad idea, if it is not
accompanied by "-c N" that matches the number of
index values given.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ic9f91853d4016bf0edfb3845ac9f1edafdf73d55
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49420
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>
15 months agoLU-16082 ldiskfs: Large EA upgrade test 50/48350/11
Alexander Zarochentsev [Sat, 20 Aug 2022 11:34:25 +0000 (14:34 +0300)]
LU-16082 ldiskfs: Large EA upgrade test

Check whether old Lustre-only ea inodes
are accessible under new ext4 versions;
additional fixes for 32newtarball test
to work with dm-flakey devices;
32newtarball now creates ldiskfs fs with
ea_inode fs feature enabled;
disk2_12 ldiskfs image is replaced by
a new disk image with a large xattr test
file;
Fix FLR file creation in 32newtarball test.

Test-Parameters: env=ONLY=32 testlist=conf-sanity serverdistro=el7.9
Test-Parameters: env=ONLY=32 testlist=conf-sanity serverdistro=el8.5
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: Id8c33b91f7ca7d68a97384dce8922dd25e8ecd68
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48350
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@hpe.com>
Reviewed-by: Sarah Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
15 months agoLU-16439 socklnd: clarify error message on timeout 40/49540/3
Aurelien Degremont [Mon, 2 Jan 2023 16:26:15 +0000 (16:26 +0000)]
LU-16439 socklnd: clarify error message on timeout

When the local peer times out when writing
to another peer, prints an explicit error message
rather than a generic one. This is make it clearer
for admins and easier to debug.

Add port to help determining if this is always
the same one or not.

Test-Parameters: trivial
Change-Id: Iaefbc601963b50293743a22ff9329018e8a5fc4f
Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49540
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16438 llite: remove false outdated comment 39/49539/3
Aurelien Degremont [Mon, 2 Jan 2023 16:04:31 +0000 (16:04 +0000)]
LU-16438 llite: remove false outdated comment

Old commit 99727c7a1 from Lustre 2.6 changed
ll_i2gids() behavior without updating the function
documentation accordingly. Fix it as this is confusing.

Test-Parameters: trivial
Fixes: 99727c7 ("LU-4476 kernel: support process namespace containers")
Change-Id: Iccc50fe6ac9e02de9bae7fd8f91e3e73ff45e327
Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49539
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>
15 months agoLU-16413 osd-ldiskfs: fix T10PI for CentOS 8.x 41/49441/5
Li Dongyang [Mon, 19 Dec 2022 10:03:47 +0000 (21:03 +1100)]
LU-16413 osd-ldiskfs: fix T10PI for CentOS 8.x

Recreate the currently broken lustre kernel patches
to allow using custom integrity functions for bio.
Note we don't need to save the generate_fn anymore,
it will be used once we call bio_integrity_prep_fn().

Add upstream fix
b13e0c718568 ("block: bio-integrity: Advance seed correctly
for larger interval sizes") for CentOS 8.0 to 8.6.

Handle the kernel api changes for the T10PI generate and
verify functions introduced in CentOS 8.x kernel,
mostly because of switching to blk_integrity_iter.

Update the custom generate and verify functions, to sync
with upstream versions.
- Add T10-DIF-TYPE2, currently only a place holder,
  not used in upstream either.
- Use __be16 instead of __u16 for guard tags.

Only reuse guard tags if the rpc checksum is the same
one supported on the target. We already have some protection
during checksum type negotiation, the server
will mark the target's T10PI type as the only
T10PI checksum type supported. But it's still good to
have the logic in place.

Do not call bio_integrity_prep() if the custom interface
bio_integrity_prep_fn() does not exist, submit_bio() will
do that for us.

On the servers, show the target's T10PI checksum as
the preferred checksum_type even if it's not the fastest.
Note this is only cosmetic and does not impact the checksum
type used, which is still done during negotiation.

Change-Id: I2d0ba0b80ba9cde2977da24db08095671aa5373c
Test-Parameters: trivial
Fixes: 293844d132 ("LU-16222 kernel: RHEL 8.7 client and server support")
Fixes: f176efd183 ("LU-12269 kernel: RHEL 8.0 server support")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49441
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-14409 ldiskfs: remove stray tracing code 83/49383/3
Mr NeilBrown [Tue, 13 Dec 2022 03:35:30 +0000 (14:35 +1100)]
LU-14409 ldiskfs: remove stray tracing code

These lines should never have landed :-(

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Fixes: 3a83078628a4 ("LU-14409 ldiskfs: Add support for SUSE 5.3.18-24.46.1")
Change-Id: I7720158605cce81721738a5f6640ccb4e0440b09
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49383
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
15 months agoLU-16387 lustre: switch OBD_ALLOC_LARGE to vmalloc faster 80/49380/3
Alexander Zarochentsev [Tue, 6 Dec 2022 17:10:41 +0000 (20:10 +0300)]
LU-16387 lustre: switch OBD_ALLOC_LARGE to vmalloc faster

No need to waste time trying hard to kmalloc large memory
chunk in OBD_ALLOC_LARGE. Reduce memory allocation attempts
by specifiying __GFP_NORETRY for all allocations > PAGE_SIZE
(as in kvmalloc in linux-4.18 kernel),
so the kmalloc part fails easily.

HPE-bug-id: LUS-11409
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I7ff8acfb6b467a4f5a7e61b2b8ec631bea89f8a5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49380
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Nikitas Angelinas <nikitas.angelinas@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-15626 tests: Fix shellcheck warning for acceptance-small 50/49350/5
Timothy Day [Thu, 8 Dec 2022 19:09:38 +0000 (19:09 +0000)]
LU-15626 tests: Fix shellcheck warning for acceptance-small

This patch addresses the warning and style suggestions
reported by shellcheck. The patch also ensures that
all spaces have been moved to tabs, and the script now
logs what test suites are about to be run.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ia88758d0bf89e7d0aa67dfae31d969c780507b88
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49350
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>
15 months agoLU-16335 test: add fail_abort_cleanup() 35/49335/4
Lai Siyao [Wed, 7 Dec 2022 04:04:42 +0000 (23:04 -0500)]
LU-16335 test: add fail_abort_cleanup()

Add helper fail_abort_cleanup() to unlink test directories (call lfs
rm_entry if directory is broken) after fail_abort because after
LU-16159 update logs will be canceled upon recovery abort, which may
leave broken directories.

Update replay-single.sh in places where fail_abort is called and
directory may become broken.

Test-Parameters: trivial mdscount=2 mdtcount=4 testlist=replay-single,replay-single,replay-single,replay-single
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I260689b1a6fa5b0b4db5aab5095cb062ae57d612
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49335
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: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16322: build: Add client build support for openEuler 87/49187/4
Xinliang Liu [Wed, 26 Oct 2022 08:58:14 +0000 (08:58 +0000)]
LU-16322: build: Add client build support for openEuler

The kernel of current openEuler LTS version 22.03 is based on Linux
5.10.0 which is already supported in Lustre master. Thus we only need
to add build support for openEuler client.

OpenEuler Linux although is not compatible with RHEL, but it uses the
same package manager DNF/tools as RHEL and references the package
naming of RHEL. Thus we can reuse most of the RHEL build logic/scripts
for openEuler client building.

OpenEuler Linux is becoming the mainstream Linux distro in China. So
adding support for it makes sense for the users. For more details about
it see: https://www.openeuler.org/en/.

Test-Parameters: trivial
Change-Id: I8e8b59d36e566c6e49b12346c2fde985153f014d
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49187
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-16279 lnet: improve error reporting in LUTF 87/48987/2
Cyril Bordage [Mon, 31 Oct 2022 11:08:44 +0000 (12:08 +0100)]
LU-16279 lnet: improve error reporting in LUTF

When an error occurs without using an RPC, the error reporting lacks
of traceback, listing only the exception itself. This patch adds the
traceback to the error string reported by R().

Test-Parameters: @lnet
Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: I3fe5f7628a3f96aeb7941ec75db6b6b5e49e9d84
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48987
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16268 mdd: set effective changelog mask correctly 61/48961/3
Mikhail Pershin [Tue, 25 Oct 2022 15:34:45 +0000 (18:34 +0300)]
LU-16268 mdd: set effective changelog mask correctly

When changelog mask is changed from MINMASK to a particular
value then recalculation is missed, so effective mask could
stay unchanged against expectations.

Patch adds additional check that old mask is MINMASK or not
to decide if mask recalculation is needed.

Test 160o is extended for that issue.

Fixes: ffe259f81cda ("LU-13055 changelog: use default mask if server has no mask")
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Ia3c93e19daeb71ff1042ebdb555e918faf89f844
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48961
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-16117 build: Avoid excessive modpost warnings 62/48362/9
Shaun Tancheff [Thu, 10 Nov 2022 06:53:47 +0000 (00:53 -0600)]
LU-16117 build: Avoid excessive modpost warnings

To avoid modpost warnings about duplicate symbols do not add
the LINUX_OBJ kernel symbols to the KBUILD_EXTRA_SYMBOLS list

Test-Parameters: trivial
HPE-bug-id: LUS-11192
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I85fc90661efcb66e4aa39c9bd3393dbe4f7ba5eb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48362
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: Petros Koutoupis <petros.koutoupis@hpe.com>
15 months agoLU-16113 build: Fix configure tests for lock_page_memcg 44/49144/8
Shaun Tancheff [Tue, 15 Nov 2022 04:06:05 +0000 (22:06 -0600)]
LU-16113 build: Fix configure tests for lock_page_memcg

Linux commit v5.15-12273-gab2f9d2d3626
   mm: unexport {,un}lock_page_memcg

Fails when lock_page_memcg exists but is not exported.

Adjust usage of [un]lock_page_memcg() to vvp_[un]lock_page_memcg() and
define the mapping accordingly to avoid the compile error.

Test-Parameters: trivial
HPE-bug-id: LUS-11189
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I18029d078a00a0b21a14721bcdf953939b4118a1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49144
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
15 months agoLU-16116 build: Configure tests for rhltable, bitmap_alloc... 61/48361/9
Shaun Tancheff [Wed, 9 Nov 2022 13:33:40 +0000 (07:33 -0600)]
LU-16116 build: Configure tests for rhltable, bitmap_alloc...

rhel8.6 with kernel 5.18 breaks a couple of compile tests

struct rhltable test fails with:
... error: â€˜hlt’ is used uninitialized in this function
    [-Werror=uninitialized]

rdma_wr() test failes with:
... error: assignment discards â€˜const’ qualifier from pointer
    target type [-Werror=discarded-qualifiers]
   wr = rdma_wr(NULL);

nla_strdup() test fails due to unused variable 'tmp'

Test-Parameters: trivial
HPE-bug-id: LUS-11191
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ib2b1d223ac809cea157158fe35fd2535b04367df
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48361
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: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
15 months agoLU-16118 build: Use pde_data() when available 63/48363/9
Shaun Tancheff [Sat, 12 Nov 2022 09:29:42 +0000 (03:29 -0600)]
LU-16118 build: Use pde_data() when available

Linux commit v5.16-11573-g6dfbbae14a7b
   introduce pde_data() and
Linux commit v5.16-11574-g359745d78351
   remove PDE_DATA()

Use PDE_DATA() when pde_data is not available.

Test-Parameters: trivial
HPE-bug-id: LUS-11193
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ida570462acd466a251adc81a14bc1fbf35d96b00
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48363
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: Jian Yu <yujian@whamcloud.com>
15 months agoLU-13642 lnet: Allow IP specification 60/47660/24
Frank Sehr [Thu, 16 Jun 2022 18:40:06 +0000 (11:40 -0700)]
LU-13642 lnet: Allow IP specification

Allows selecting an interface by specifying an IP address in the NID.
All variations of interface and IP address are considered.

1 no interface and no IP address is specified: Select first interface
2 interface and no IP: Select main IP address
3 no interface and IP specified: Select first interface
        that has the IP address
4 interface and IP specified: Verify that interface and IP match

The change does not have any effect on current configurations and
will be active when the changes in lnetctl, YAML or
module parameter are applied.
This patch effects only socklnd component. A macro is defined in
lnet-types.h to check if an IP address is set (IPV4 or IPV6).
Further IPV6 changes are not integrated.

For further reference please read

IP specification in LNet
https://wiki.whamcloud.com/display/LNet/IP+specification+in+LNet

Test-Parameters: trivial
Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: Ifdf8f884ce1ee1fb1b97ca3121aa83efb46f8ef0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47660
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-15288 lnet: increase transaction timeout 80/45780/3
Cyril Bordage [Tue, 7 Dec 2021 22:14:43 +0000 (23:14 +0100)]
LU-15288 lnet: increase transaction timeout

In LU-13145, it was decided to increase default transaction timeout
(LNET_TRANSACTION_TIMEOUT_DEFAULT) to 150s. But, in the associated
patch, it was set to 50s. This modification will also modify
lnd_timeout (from 16 to 49).

Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: I13a8b5d14230bb6e8936cb3e18540f19dbc62985
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/45780
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-16321 osd: Allow fiemap on kernel buffers 90/49190/7
Shaun Tancheff [Fri, 2 Dec 2022 10:19:59 +0000 (04:19 -0600)]
LU-16321 osd: Allow fiemap on kernel buffers

Linux commit v5.17-rc3-19-g967747bbc084
  uaccess: remove CONFIG_SET_FS

When KERNEL_DS gone lustre needs an alternative for fiemap to
copy extents to kernel space memory.

Direct in-kernel calls to inode->f_ops->fiemap() can utilize
an otherwise unused flag on fiemap_extent_info fi_flags
to indicate the fiemap extent buffer is allocated in kernel space.

Include ldiskfs patches for ldiskfs_fiemap() to
define EXT4_FIEMAP_FLAG_MEMCPY and utilize it.

HPE-bug-id: LUS-11337
Fixes: d0337cab8e ("LU-14195 osd: don't use set_fs() for ->fiemap() calls.")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I7a8edb481833fd1bdcf7b6cd6e08397c1754baee
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49190
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-14645 tests: test lfs setdirstripe with '/$' 63/49463/2
Jian Yu [Tue, 20 Dec 2022 20:24:25 +0000 (12:24 -0800)]
LU-14645 tests: test lfs setdirstripe with '/$'

This patch improves one of the lfs setdirstripe tests to
verify that dir name ending with '/' also works.

Test-Parameters: trivial mdscount=2 mdtcount=4 \
env=ONLY=24B testlist=sanity

Change-Id: I237d5a9ebad42cc0569aa1db487d0df147372316
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49463
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>
15 months agoLU-16373 tests: failover mds1 back to the primary server 45/49345/2
Jian Yu [Thu, 8 Dec 2022 07:56:36 +0000 (23:56 -0800)]
LU-16373 tests: failover mds1 back to the primary server

This patch fixes recovery-small test 144a to failover
mds1 back to the primary server so that stack_trap can
set timeout parameter on the correct mds node.

Test-Parameters: trivial \
env=SLOW=yes,FAILURE_MODE=HARD,ONLY=144a \
clientcount=4 mdtcount=1 mdscount=2 osscount=2 \
austeroptions=-R failover=true iscsi=1 \
testlist=recovery-small

Change-Id: Idbfdb7b084c7edac8784008e0455f76632aa685b
Test-Parameters: trivial testlist=recovery-small
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49345
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Sarah Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16433 llite: check vvp_account_page_dirtied 12/49512/6
Jian Yu [Thu, 29 Dec 2022 08:21:32 +0000 (00:21 -0800)]
LU-16433 llite: check vvp_account_page_dirtied

This patch removes duplicated codes from vvp_set_pagevec_dirty()
and check vvp_account_page_dirtied to determine if falling back
to call __set_page_dirty_nobuffers().

HAVE_ACCOUNT_PAGE_DIRTIED_EXPORT also needs to be checked because
vvp_account_page_dirtied is not defined if account_page_dirtied
is exported.

Test-Parameters: trivial clientdistro=el8.6 testlist=sanity

Test-Parameters: trivial clientdistro=el8.7 testlist=sanity

Test-Parameters: trivial clientdistro=el9.0 \
env=SANITY_EXCEPT="130 244a" testlist=sanity

Test-Parameters: trivial clientdistro=sles15sp4 \
env=SANITY_EXCEPT="27J 101j 244a" testlist=sanity

Change-Id: I272033d7494a157145224b1b8ce999a80958aa6c
Fixes: 4bf090b811 ("LU-15959 kernel: new kernel [SLES15 SP4 5.14.21-150400.24.18.1]")
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49512
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
15 months agoLU-16120 build: Add support for kobj_type default_groups 65/48365/12
Shaun Tancheff [Fri, 16 Dec 2022 09:41:54 +0000 (03:41 -0600)]
LU-16120 build: Add support for kobj_type default_groups

Linux commit v5.1-rc3-29-gaa30f47cf666
  kobject: Add support for default attribute groups to kobj_type

Linux commit v5.18-rc1-2-gcdb4f26a63c3
  kobject: kobj_type: remove default_attrs

Switch to using kobj_type default_groups when it is available.
Provide support for default_attrs for older kernels.

HPE-bug-id: LUS-11196
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I43b03c67c22307293a2abc444aa1a73889ca09ee
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48365
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>
15 months agoLU-16297 ptlrpc: don't panic during reconnection 29/49029/9
Alexander Boyko [Thu, 3 Nov 2022 11:23:20 +0000 (07:23 -0400)]
LU-16297 ptlrpc: don't panic during reconnection

ptlrpc_send_rpc() could race with ptlrpc_connect_import_locked()
in the middle of assertion check and this leads to a wrong panic.
Assertion checks

(AT_OFF || imp->imp_state != LUSTRE_IMP_FULL ||

reconnect changes import state and flags
and second part

(imp->imp_msghdr_flags & MSGHDR_AT_SUPPORT) ||
!(imp->imp_connect_data.ocd_connect_flags & OBD_CONNECT_AT)))

MSGHDR_AT_SUPPORT is disabled during client reconnection.
It is not good to use locking at this hot part, so fix changes
assertion to a report.

HPE-bug-id: LUS-10985
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: Ifc9e413c679c3e8a4c8f4f541251bebabae41c82
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49029
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-15935 tests: add version check to replay-dual test_33 98/49398/3
Jian Yu [Wed, 14 Dec 2022 02:31:05 +0000 (18:31 -0800)]
LU-15935 tests: add version check to replay-dual test_33

This patch adds MDS version check to replay-dual test_33
to avoid interop test failure.

Test-Parameters: trivial \
serverjob=lustre-b2_15 serverbuildno=28 \
env=ONLY=33 testlist=replay-dual

Test-Parameters: trivial env=ONLY=33 testlist=replay-dual

Change-Id: I3ec665302a431d3c0f07bc819a08237dbc5b4309
Fixes: 1a79d395dd ("LU-15935 target: keep track of multirpc slots in last_rcvd")
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49398
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-8367 osp: wait for precreate on reformatted OST 51/49151/6
Li Dongyang [Mon, 14 Nov 2022 13:28:37 +0000 (00:28 +1100)]
LU-8367 osp: wait for precreate on reformatted OST

We should wait for precreate rpc to finish when we see a just
reformatted/replaced OST, otherwise the client could try
to access the object on OST before it's created.

Do not use sync_trans when recreating the objects on the
reformatted/replaced OST.

Fix detecting reformatted OST for FID_SEQ_NORMAL, for such
seqs the oid will be initialized as LUSTRE_FID_INIT_OID,
which is 1.

Change-Id: I4aebb9d573aa352dd7897e5f1129dc2117a084bb
Fixes: 63e17799a3 ("LU-8367 osp: enable replay for precreation request")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49151
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-15921 tests: fix sanity-hsm 24c 64/47564/2
Aurelien Degremont [Wed, 8 Jun 2022 07:49:32 +0000 (07:49 +0000)]
LU-15921 tests: fix sanity-hsm 24c

Fix bad copy-paste in test sanity-hsm 24c causing
the test to save 3 different tunables, but actually
restoring the same one three times.

Also improve the code to support values including spaces.

Test-Parameters: trivial testlist=sanity-hsm,sanity-pcc
Fixes: 2042bce ("LU-9474 tests: rewrite copytool_setup to use stack_trap")
Fixes: f172b11 ("LU-10092 llite: Add persistent cache on client")
Change-Id: I34cc61515ebb862d5996f41cdb2055ac53ccac65
Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47564
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-16277 lnet: fix bad parameter in LUTF 85/48985/2
Cyril Bordage [Mon, 31 Oct 2022 08:57:10 +0000 (09:57 +0100)]
LU-16277 lnet: fix bad parameter in LUTF

In SimpleLustreNode, exception parameter is not passed to BaseTest
that leads to this parameter not used when using remote agent.

Test-Parameters: @lnet
Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: Ie458ef4a41dc059da8f069d8d62d365c21c9f25d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48985
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16384 tests: dump lustre log if DEBUG_RMMOD set 74/49374/5
Alex Zhuravlev [Mon, 12 Dec 2022 09:52:16 +0000 (12:52 +0300)]
LU-16384 tests: dump lustre log if DEBUG_RMMOD set

just to simplify local development and use existing code in
lustre_rmmod script:
DEBUG_RMMOD=<logfile> sh sanity.sh will dump a text lustre log to <logfile>.
it can be DEBUG_RMMOD=- to direct lustre log to standard output.

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I8d72e1e9cecb354bcc5d41ab3cca5767a298c668
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49374
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>
15 months agoLU-15626 tests: Fix "error" reported by shellcheck (3/5) 37/49437/2
Arshad Hussain [Wed, 22 Jun 2022 12:25:56 +0000 (17:55 +0530)]
LU-15626 tests: Fix "error" reported by shellcheck (3/5)

This patch fixes "error" issues reported by shellcheck
for file lustre/tests/test-framework.sh. This patch also
moves spaces to tabs.

Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I5c802e268e68edc118d89d86063a23bedf972013
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49437
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: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16386 utils: Improve mkfs.lustre.8 man page 84/49384/2
Arshad Hussain [Tue, 13 Dec 2022 05:23:26 +0000 (10:53 +0530)]
LU-16386 utils: Improve mkfs.lustre.8 man page

This patch imporves the
- Options section of "--version" argument
- Adds "--version" option to examples section

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I7fd3e7f1ea9a313a33db5620a92a595f2c4bd36f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49384
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-16348 tests: export TESTLOG_PREFIX and TESTNAME to rpc.sh 60/49260/4
Jian Yu [Tue, 20 Dec 2022 04:50:59 +0000 (20:50 -0800)]
LU-16348 tests: export TESTLOG_PREFIX and TESTNAME to rpc.sh

In Lustre test suites, while running do_rpc_nodes, if the
remote function failed and error() was called,
then gather_logs() can not gather logs with a correct
prefix name because TESTLOG_PREFIX and TESTNAME variables
were not exported to rpc.sh.

Test-Parameters: trivial testlist=sanity,conf-sanity
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: I2bdbca7f1886f376160a87293ef367f3a4a59f86
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49260
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>
15 months agoLU-15626 tests: Fix "error" reported by shellcheck (4/5) 38/49438/2
Arshad Hussain [Wed, 22 Jun 2022 12:47:30 +0000 (18:17 +0530)]
LU-15626 tests: Fix "error" reported by shellcheck (4/5)

This patch fixes "error" issues reported by shellcheck
for file lustre/tests/test-framework.sh. This patch also
moves spaces to tabs.

Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I84b43cba5b50d6618bee756d2f3c7f59ab0d74da
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49438
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>
15 months agoLU-16271 ptlrpc: fix eviction right after recovery 57/49257/4
Alexander Boyko [Mon, 28 Nov 2022 14:20:05 +0000 (09:20 -0500)]
LU-16271 ptlrpc: fix eviction right after recovery

When recovery is finished exports could be timedout since
recovery thread waits stale clients, and no more requests
come after final ping. This was handled as exports timers update
after final ping processing. LU-16002 introduced fast evictions
and brings error - eviction right after recovery.
Process exports timers updates before obd_recovering is cleared.

Fixes: 6bdeda7afe ("LU-16002 ptlrpc: reduce pinger eviction time")
Test-Parameters: testlist=replay-single env=ONLY=89,ONLY_REPEAT=20
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: Ibf3b2f632d6d3aa1de57038fdecbec38cf9a97cf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49257
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-16434 tests: replace '-m' with '-i' in sanity/230j 23/49523/3
Jian Yu [Wed, 28 Dec 2022 18:08:20 +0000 (10:08 -0800)]
LU-16434 tests: replace '-m' with '-i' in sanity/230j

In lfs_setdirstripe(), '-m' was originally used for '--mode'.
Fix sanity test_230j to replace '-m 0' with '-i 0' to force
directory creation on MDT0000 as the test expected.

Test-Parameters: trivial mdscount=2 mdtcount=4 \
env=ONLY=230j testlist=sanity

Change-Id: I10d435719f4b29ec47fa06c478caee9fcc8134a5
Fixes: 8deea7888c ("LU-11508 mdt: reject DoM file migration")
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49523
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
15 months agoNew tag 2.15.53 2.15.53 v2_15_53
Oleg Drokin [Sat, 24 Dec 2022 03:47:34 +0000 (22:47 -0500)]
New tag 2.15.53

Change-Id: I93c2e581fd13b3d233030ce3b178c23059276b01
Signed-off-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16378 lnet: handles unregister/register events 75/49375/4
Cyril Bordage [Sat, 10 Dec 2022 00:51:16 +0000 (01:51 +0100)]
LU-16378 lnet: handles unregister/register events

When network is restarted, devices are unregistered and then
registered again. When a device registers using an index that is
different from the previous one (before network was restarted), LNet
ignores it. Consequently, this device stays with link in fatal state.

To fix that, we catch unregistering events to clear the saved index
value, and when a registering event comes, we save the new value.

Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: I17e93a1103d588f3e630a9c7446b345f4d472b97
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49375
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16335 build: remove _GNU_SOURCE dependency in lustre_user.h 28/49328/8
Lai Siyao [Thu, 1 Dec 2022 08:17:00 +0000 (03:17 -0500)]
LU-16335 build: remove _GNU_SOURCE dependency in lustre_user.h

The lustre_user.h header uses the non-standard strchrnul() function
in userspace.  This will always leads to LC_IOC_REMOVE_ENTRY configure
check to fail, and in the end "lfs rm_entry" always returns -ENOTSUP.

Implement an alternative approach to avoid external dependencies on
the lustre_user.h header.  Also, LC_IOC_REMOVE_ENTRY is itself
unnecessary, the code can check for LL_IOC_REMOVE_ENTRY directly.

Replace the NFS-specific -ENOTSUP error return code with -EOPNOTSUPP.

Fix the compile test_400[ab] checks to not use "-std=c99" to verify
that the uapi headers are usable without this dependency.

Fixes: b59835f8b6 ("LU-13903 utils: have liblustreapi support Linux client")
Fixes: 7a7309fa84 ("LU-13274 uapi: make lustre UAPI headers C99 compliant")
Fixes: 6331eadbd6 ("LU-15420 uapi: avoid gcc-11 -Werror=stringop-overread")
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: If42743a2148c317b8a9b701ceb5d08bac5149f5f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49328
Reviewed-by: Andreas Dilger <adilger@whamcloud.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>
15 months agoLU-16390 tests: check Lustre filefrag in sanity-flr/49a 86/49386/2
Andreas Dilger [Tue, 13 Dec 2022 07:01:06 +0000 (00:01 -0700)]
LU-16390 tests: check Lustre filefrag in sanity-flr/49a

Check that a Lustre-patched filefrag is installed when running
sanity-flr test_49a.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ic909ea4ca160d47480004f53a96ce7539ce5076c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49386
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 months agoLU-16386 mkfs: Handle --version argument correctly 79/49379/3
Arshad Hussain [Mon, 12 Dec 2022 14:42:44 +0000 (09:42 -0500)]
LU-16386 mkfs: Handle --version argument correctly

Running mkfs.lustre with --version or -V argument
fails instead of printing the version. This patch
fixes the error.

Without patch:
--------------
$ ./lustre/utils/mkfs.lustre --version
usage: mkfs.lustre <target type> [--backfstype=ldiskfs]
<snip>

With patch:
-----------
$ ./lustre/utils/mkfs.lustre --version
mkfs.lustre 2.15.52_175_ge7aa83d

Test-Parameters: trivial fstype=zfs testlist=sanity
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I4d4d1144d669fce8b02e9f8c3fb5f45f68b337b4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49379
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>
15 months agoLU-14073 ldiskfs: don't test LDISKFS_IOC_FSSETXATTR 53/49353/4
Mr NeilBrown [Fri, 9 Dec 2022 05:31:13 +0000 (16:31 +1100)]
LU-14073 ldiskfs: don't test LDISKFS_IOC_FSSETXATTR

EXT4_IOC_FSSETXATTR was removed upstream in Linux 5.9, Commit
cb29a02d3a9d ("ext4: use generic names for generic ioctls").
So we cannot use it to test if project quotas are supported.

Instead test if EXT4_MAXQUOTAS is 3.  This was changed to 3 upstream
in the commit immediately before EXT4_IOC_FSSETXATTR was added, so it
is effectively the same test.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I88c51c03959ebe98cd5066596f5158fac570a625
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49353
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16376 obdclass: NUL terminate long jobid strings 51/49351/3
Andreas Dilger [Thu, 8 Dec 2022 18:43:57 +0000 (11:43 -0700)]
LU-16376 obdclass: NUL terminate long jobid strings

It appears that some jobid names can be sent that are using the full
32-byte size, rather than containing an embedded NUL terminator. This
caused errors in lprocfs_job_stats_log() when it overflowed.

If there is no NUL terminator in lustre_msg_get_jobid() then add one
if not found within the buffer, so that the rest of the code doesn't
have to deal with unterminated strings.

This potentially exposes a larger issue that other places may not be
handling the unterminated string properly either, which needs to be
addressed separately on both the client and server.  Terminating the
jobid to 31 chars only on the client does not totally solve the issue,
since there will still be older clients that are not doing this, so
the server needs to handle this in any case.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4c05fabdacb6a0bbf6477d3601a628fe1f3ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49351
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-14707 tests: Bashify more scripts for Ubuntu et. al. 96/49296/3
Timothy Day [Thu, 1 Dec 2022 19:18:31 +0000 (19:18 +0000)]
LU-14707 tests: Bashify more scripts for Ubuntu et. al.

Some scripts that are not POSIX sh are being
invoked using sh. The scripts should be called
using the shell listed in the shebang.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I7233ce56df95a5b8698b39872e6118a4fa1a029a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49296
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-15014 osc: Fix possible null pointer 75/44975/3
Patrick Farrell [Thu, 6 Oct 2022 11:40:41 +0000 (07:40 -0400)]
LU-15014 osc: Fix possible null pointer

Change init to fix possible null pointer access.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Id1bee8b5ea5fb92a8831992ad44c487c69d52e1e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/44975
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16231 misc: rename lprocfs_stats functions 47/48847/3
Andreas Dilger [Thu, 13 Oct 2022 06:05:04 +0000 (00:05 -0600)]
LU-16231 misc: rename lprocfs_stats functions

Rename lprocfs_{alloc,register,clear,free}_stats() to be
lprocfs_stats_*() so these functions can be found more easily
in relation to struct lprocfs_stats.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I671284a86ee2a1fd3c58da75923f9467e72540e5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48847
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ellis Wilson <elliswilson@microsoft.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 months agoLU-16157 lnet: lst read-outside of allocation 47/48547/3
Alexey Lyashkov [Wed, 14 Sep 2022 19:59:11 +0000 (22:59 +0300)]
LU-16157 lnet: lst read-outside of allocation

lnet_selftest want a some parameters from userspace,
but it never sends. It caused a read of outside of allocation
like
BUG: KASAN: slab-out-of-bounds in lstcon_testrpc_prep+0x19e7/0x1bb0
Read of size 4 at addr ffff8888bbaa866c by task lt-lst/6371

Signed-off-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Change-Id: I2a98e60c4be65c49fa9da4b418e50f1c7309b69d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48547
Reviewed-by: Andreas Dilger <adilger@whamcloud.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>
16 months agoLU-16366 build: Add LCME_FL_PARITY to wirecheck 11/49311/2
Shaun Tancheff [Mon, 5 Dec 2022 04:39:03 +0000 (22:39 -0600)]
LU-16366 build: Add LCME_FL_PARITY to wirecheck

 - OBD_MD_DOM_SIZE: Should use 0x instead of 0X for consistency.
 - LCME_FL_PARITY should be included in wirecheck and wiretest
 - QIF_DQBLKSIZE_BITS used where QIF_DQBLKSIZE is expected

Test-Parameters: trivial
Fixes: 4c47900889 ("LU-12186 ec: add necessary structure member for EC file")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ic2eecfc2b1945b5b249bb341f791a99c5b109b97
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49311
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>
16 months agoLU-16364 llite: Move d_u.d_alias compat define 08/49308/2
Shaun Tancheff [Fri, 2 Dec 2022 19:40:38 +0000 (13:40 -0600)]
LU-16364 llite: Move d_u.d_alias compat define

Breaks zpl_d_drop_aliases (seen in 2.1.7)

The only user of d_alias is llite so move the
define to a header private to llite.

Test-Parameters: trivial
HPE-bug-id: LUS-11394
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I44f511073f4dd17fd6dba1588e88d29cdfd3f6cb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49308
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>
16 months agoLU-16363 build: fiemap flexible array 05/49305/5
Shaun Tancheff [Mon, 5 Dec 2022 04:32:35 +0000 (22:32 -0600)]
LU-16363 build: fiemap flexible array

Linux commit v5.19-rc2-1-g94dfc73e7cf4
 treewide: uapi: Replace zero-length arrays with flexible-array
 members
Adjust wiretest to handle flexible array when
sizeof(fiemap->fm_extents) is undefined.

Test-Parameters: trivial
HPE-bug-id: LUS-11388
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ia2692d126a871b43e9144e5d151215166604702d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49305
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>
16 months agoLU-16359 build: RHEL use Module.symvers during find-provides 02/49302/4
Shaun Tancheff [Fri, 2 Dec 2022 14:46:19 +0000 (08:46 -0600)]
LU-16359 build: RHEL use Module.symvers during find-provides

find-provides fails to find module versions on newer
kernels.

The generated Module.symvers is always generated and
correct. Install it to the well known location BUILDROOT
use it to generate provides and ignore it for installation.

Create a new find-provides and find-provides.ksyms for
lustre based on the one provided by the redhat-rpm-config
package using Module.symvers to supply the symbol versions
instead of extracting symbol versions from the .ko files.

Test-Parameters: trivial
HPE-bug-id: LUS-11383
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I01c3b3692e6a2a6be86a6930eaead9df75147f90
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49302
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-13705 utils: fix llstat -n option 89/49289/3
Andreas Dilger [Thu, 1 Dec 2022 00:04:26 +0000 (17:04 -0700)]
LU-13705 utils: fix llstat -n option

The '-n' option was not configured as a valid option for getopt
and would return an error if specified, instead of limiting the
number of stats outputs as it should.

Test-Parameters: trivial
Fixes: 3e0d994fbf4c ("LU-13705 utils: improve llstat/llobdstat usability")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ifacafce741854fe12b80ced28e95bc7cc9254035
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49289
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-16353 config: enable_foo variables mustn't contains space 82/49282/2
Mr NeilBrown [Wed, 30 Nov 2022 00:47:03 +0000 (11:47 +1100)]
LU-16353 config: enable_foo variables mustn't contains space

$enable_crypto is in some circumstances set to "embedded llcrypt"
which contains a space.
When the code from lustre-build.m4 then tests the value with:

   if test x$enablecrypto = xyes

we get a syntax error from ./configure

We could add quotes to this comment, but for consistency we would need
to add quotes to ever other test for an enable_foo variable.

It is simpler just to ensure we don't add spaces.  So change the space
to a hyphen.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I097e857409d6ec48a765ccda1cc470d28b90e601
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49282
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: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-16346 utils: fix lctl stack smashing 54/49254/4
Artem Blagodarenko [Fri, 25 Nov 2022 12:01:06 +0000 (12:01 +0000)]
LU-16346 utils: fix lctl stack smashing

on aarch64 architecture:
... 
exec lustre/utils/.libs/lctl dl
*** stack smashing detected ***: terminated
Aborted (core dumped)

genlmsg_parse() was misused in yaml_netlink_msg_parse().
It requires passing maxtype+1 elements, but maxtype+1 as a number
of elements passed actually. Should be maxtype actually.

Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Change-Id: Ic9cd0de35a028ca28bdd112700296d21e04a1cc5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49254
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: James Simmons <jsimmons@infradead.org>
16 months agoLU-14992 tests: add more mkdir_on_mdt0 calls 52/49252/3
Mr NeilBrown [Sun, 27 Nov 2022 20:49:50 +0000 (07:49 +1100)]
LU-14992 tests: add more mkdir_on_mdt0 calls

A previous patch changed some mkdir calls in test_133a to
mkdir_on_mdt0. This allows stats collected from mdt0 to
reflect the mkdir.

However two mkdir calls were missed, so "crossdir_rename" stats can be
wrong.

Test-Parameters: trivial mdscount=2 mdtcount=4 testlist=sanity env=ONLY=133a

Fixes: f0324c5c2f ("LU-14992 tests: sanity/replay-vbr mkdir on MDT0")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I4e5c2e5504307462bff4012a13ef9deb24f8da8c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49252
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
16 months agoLU-15816 tests: use correct ost host to manage failure 48/49248/2
Mr NeilBrown [Fri, 25 Nov 2022 05:13:20 +0000 (16:13 +1100)]
LU-15816 tests: use correct ost host to manage failure

sanity test_398m sets up striping across 2 OSTs.  It ensures that
failing IO to either OST individually will fail the total IO.

However it sends the command to fail IO for the second OST (OST1) to
the host managing the first OST (ost1).  If the first 2 OSTs are on
the same host, this works.  If not, it fails.

Also there error messages when testing the second stripe say "first
stripe".

Test-Parameters: trivial env=ONLY=398m
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ic7085dab2610fa2c044a966fd8de40def0438ca4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49248
Reviewed-by: Andreas Dilger <adilger@whamcloud.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>
16 months agoLU-16334 llite: update statx size/ctime for fallocate 21/49221/4
Qian Yingjin [Wed, 23 Nov 2022 07:44:47 +0000 (02:44 -0500)]
LU-16334 llite: update statx size/ctime for fallocate

In the VFS interface ->fallocate(), it should update i_size and
i_ctime returned by statx() accordingly when the file size grows.

Add sanity/150h.

fallocate() call does not update the attributes on MDT.
We use STATX with cached-always mode to verify it as it will not
send Glimpse lock RPCs to OSTs to obtain file size information
and use the caching attributes (size) on the client side as much
as possible.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ib8128892222a01cd00250c704328bd13cfb12e2d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49221
Reviewed-by: Oleg Drokin <green@whamcloud.com>
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>
16 months agoLU-930 docs: add lfs-rm_entry.8 man page 64/49064/6
Andreas Dilger [Mon, 7 Nov 2022 21:56:24 +0000 (14:56 -0700)]
LU-930 docs: add lfs-rm_entry.8 man page

Add man page for "lfs rm_entry" and alias "lfs rmentry".

Test-Parameters: trivial
Fixes: 2ad263c602 ("LU-1187 utils: add lfs setdirstripe/getdirstripe")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I783f23ec8fd0c75c69bcc78c180a07e54dd0c8a1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49064
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
16 months agoLU-16291 build: make kobj_type constant 43/49043/3
Jian Yu [Fri, 2 Dec 2022 19:27:43 +0000 (11:27 -0800)]
LU-16291 build: make kobj_type constant

Kernel v5.16-rc2-28-gee6d3dd4ed48:
commit ee6d3dd4ed48ab24b74bab3c3977b8218518247d
driver core: make kobj_type constant.

This patch makes struct kobj_type constant to fix
the following build failure against kernel 5.16:

lustre/obdclass/obd_config.c: In function 'class_modify_config':
lustre/obdclass/obd_config.c:1639:13: error: assignment discards
'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
1639 |         typ = get_ktype(kobj);
     |             ^

Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: I19e0d1f4e3cf97f6871e038487cda9294ac1f67b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49043
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
16 months agoLU-16205 sec: reserve flag for fid2path for encrypted files 28/49028/3
Sebastien Buisson [Thu, 3 Nov 2022 10:47:46 +0000 (11:47 +0100)]
LU-16205 sec: reserve flag for fid2path for encrypted files

Reserve OBD_CONNECT2_ENCRYPT_FID2PATH connection flag for fid2path
support for encrypted files.
This connection flag is required so that newer servers continue to
return -ENODATA to older clients.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I505b90a061687a7ef481adacca98908c96e487be
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49028
Reviewed-by: Andreas Dilger <adilger@whamcloud.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>
16 months agoLU-16159 lod: cancel update llogs upon recovery abort 84/48584/26
Lai Siyao [Sun, 28 Aug 2022 18:35:25 +0000 (14:35 -0400)]
LU-16159 lod: cancel update llogs upon recovery abort

If recovery is aborted, cancel update catalog from catlist, and keep
them on disk for some time (for debug purpose), as can avoid
accumulating stale update records, and also avoid recovery problems
if update llogs are corrupt.

Update llogs are canceled after recovery completes and before regular
request processing. For these logs, their ctime will be set, and log
header will be marked with LLOG_F_MAX_AGE|LLOG_F_RM_ON_ERR, and when
30 days passed, they will be removed automatically.

Tidy up recovery abort code:
* if obd_abort_recovery is set, or OBD is stopping, stop both
  client recovery and MDT recovery.
* otherwise if obd_abort_mdt_recovery is set, stop MDT recovery only.

lctl llog_print support printing update log FIDs used by specified
MDT:
* "lctl --device <MDT> llog_print update_log" will list all update
  llog FIDs used by this MDT device.

Disabled replay-single.sh 100c stripe check because abort_recovery
will cancel update llogs, and won't replay them upon next recovery.

Added replay-single.sh 100d.

Formatall in the end of replay-single.sh because directory unlink may
fail.

Test-Parameters: mdscount=2 mdtcount=4 testlist=replay-single,replay-single,replay-single,replay-single,replay-single,replay-single,replay-single,replay-single,replay-single
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ie2bda6c097d65f5c51cba66c2dbf6ae4a5d36dda
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48584
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>
16 months agoLU-15801 ldiskfs: Server support for RHEL9 69/47169/10
Shaun Tancheff [Tue, 15 Nov 2022 12:10:42 +0000 (06:10 -0600)]
LU-15801 ldiskfs: Server support for RHEL9

RHEL9 server patches update from SUSE 15 SP 4 series

Test-Parameters: trivial
HPE-bug-id: LUS-10920
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I221f946d09892bf90406da70aa16432e5753d18a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47169
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: Jian Yu <yujian@whamcloud.com>
16 months agoLU-16114 build: Update security_dentry_init_security args 59/48359/6
Shaun Tancheff [Sun, 28 Aug 2022 14:38:39 +0000 (21:38 +0700)]
LU-16114 build: Update security_dentry_init_security args

Linux commit v5.15-rc1-20-g15bf32398ad4
   security: Return xattr name from security_dentry_init_security()

Adjust security_dentry_init_security() calls accordingly

Test-Parameters: trivial
HPE-bug-id: LUS-11188
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I42d3307f7fe0d2412381363f60ac5b3df2d5891a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48359
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
16 months agoLU-16112 build: ki_complete removed unused argument 57/48357/9
Shaun Tancheff [Wed, 30 Nov 2022 12:12:51 +0000 (06:12 -0600)]
LU-16112 build: ki_complete removed unused argument

Linux commit v5.15-rc6-145-g6b19b766e8f0
   fs: get rid of the res2 iocb->ki_complete argument

Prior to 4.1 Linux provided an aio_complete(iocb, res, res2)
which propagated res2 to io_event.res2. This functionality
migrated to iocb->ki_complete().

Provide a wrapper around iocb->ki_complete() to use
aio_complete() or iocb->ki_complete() as appropriate.

HPE-bug-id: LUS-11187
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I11d1ee61528d4d89e2a316fd71066824b202dac7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48357
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-15581 utils: add check_iam util 75/46575/17
Artem Blagodarenko [Wed, 7 Sep 2022 12:46:54 +0000 (08:46 -0400)]
LU-15581 utils: add check_iam util

A tool for parsing and checking IAM files.
And a test to check utility works without segfaults for
corrupted files.

To process all files in OI catalog:
for f in /root/md65_ldiskfs/oi.16.*; do
echo $f; lustre/utils/check_iam -v $f;
done > output.txt 2>&1

Test-Parameters: trivial testlist=conf-sanity env=ONLY=134
HPE-bug-id: LUS-10501
Change-Id: I7a8e83bc2720040e48c953511801816fd3dd6288
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46575
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-6142 lustre: fix minor typos in comments 74/49274/2
Mr. NeilBrown [Tue, 29 Nov 2022 17:08:38 +0000 (12:08 -0500)]
LU-6142 lustre: fix minor typos in comments

Fix minor typos in comments.

Linux-commit: d88727b ("staging: lustre: fix minor typos in comments")

Test-Parameters: trivial
Change-Id: I2232597d261c8d33d21bdfe690a5b7460bf4069d
Signed-off-by: Mr. NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49274
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-15707 lod: force creation of a component without a pool 55/46955/9
Etienne AUJAMES [Wed, 30 Mar 2022 16:43:44 +0000 (18:43 +0200)]
LU-15707 lod: force creation of a component without a pool

This patch add the pool option "lfs setstripe -p ignore" to force
the creation of component without a pool set by inheritance (from
parent or root).

e.g:
$ lfs setstripe -p pool tdir
$ lfs setstripe -E1M -p ignore -E-1 -p '' -c2 -S2M tdir/tfile
$ lfs getstripe -I1 -p tdir/tfile
(no pool set)
$ lfs getstripe -I2 -p tdir/tfile
pool
(inherited from tdir)

This patch add the test "ost-pools test_32" to verify this behavior.

The poorly-named "-p none" keyword, which indicates the pool name
should be inherited from the root or parent dir layout, will be
eventually replaced by the new "-p inherit" keyword.

Test-Parameters: serverdistro=el7.9 serverversion=2.12.8 testlist=ost-pools env=ONLY=32,ONLY_REPEAT=50
Test-Parameters: testlist=ost-pools env=ONLY=32,ONLY_REPEAT=50
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I782cbafe209cff6857162303a4650f5e3b438be5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46955
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>
16 months agoLU-16231 misc: fix stats snapshot_time to use wallclock 21/48821/7
Andreas Dilger [Tue, 11 Oct 2022 09:09:08 +0000 (03:09 -0600)]
LU-16231 misc: fix stats snapshot_time to use wallclock

The timestamps reported during stats collection inadvertently changed
from being POSIX epoch timestamps to elapsed-from-boot timestamps.

While some collection tools ignore these timestamps, or only use the
delta between successive reads, having uniform timestaps in stats
files simplifies stats correlation between different servers.

Revert the snapshot_time back to showing wallclock time.

Some "init" times were not initialized when stats were allocated or
cleared, do this for all stats shown by lprocfs_stats_header().

Rename struct osc_device fields from od_ to osc_ to avoid confusion
with struct osd_device. Having two od_stats was especially confusing.

Add a test case to verify snapshot_time, start_time, elapsed_time.

Test-Parameters: testlist=sanity env=ONLY=127a,ONLY_REPEAT=100
Fixes: ea2cd3af7b ("LU-11407 obdclass: add start time to stats files")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I421c3b0301c2566b48c2fc6fe7bb8b54ec48ca5d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48821
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Ellis Wilson <elliswilson@microsoft.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-16110 lprocfs: make job_stats and rename_stats valid YAML 17/48417/27
Lei Feng [Fri, 2 Sep 2022 07:05:22 +0000 (15:05 +0800)]
LU-16110 lprocfs: make job_stats and rename_stats valid YAML

Adjust the format of job_stats and rename_stats to make
them valid YAML.  This fixes the output to correctly indent
the items to follow YAML formatting rules.

Add a test case to verify the format of these params is valid
YAML to avoid other errors being introduced in the future.

Signed-off-by: Lei Feng <flei@whamcloud.com>
Change-Id: Idca36621241e97ff87f8ab0448f3c5604057a460
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48417
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
16 months agoLU-16344 docs: Improve explaination in manual of lfs-getstripe 56/49256/2
Xing Huang [Mon, 28 Nov 2022 11:29:32 +0000 (19:29 +0800)]
LU-16344 docs: Improve explaination in manual of lfs-getstripe

Modify the --ost|-O explaination in manual of lfs-getstripe.

Test-Parameters: trivial
Signed-off-by: Xing Huang <hxing@ddn.com>
Change-Id: I0b99906d07ac23126914d75c70efe4899069d507
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49256
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-12837 doc: add lfs-changelog* manpages 09/49209/3
Etienne AUJAMES [Tue, 22 Nov 2022 12:39:25 +0000 (13:39 +0100)]
LU-12837 doc: add lfs-changelog* manpages

This patch moves the documentation for "lfs changelog" and "lfs
changelog_clear" utilities from "lfs.1" to the following manpages:
- lfs-changelog.1
- lfs-changelog_clear.1

Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Test-Parameters: trivial
Change-Id: I6db2e687e506a6116fe4755358a9abbd5509c3bb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49209
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
16 months agoLU-13665 lfs: use correct DST setting for mktime() 06/49206/3
Mr NeilBrown [Tue, 22 Nov 2022 05:09:59 +0000 (16:09 +1100)]
LU-13665 lfs: use correct DST setting for mktime()

When lfs is passed a "-newerXY" arg when Y=='t' and the arg doesn't
start %H, it leaves ->tm_isdst set to 0 which tells mktime() to assume
that DST is not active.
This means that it produces incorrect results for times when DST is
active.

We should set ->tm_isdst to -1 to tell mktime() that it is not known
whether DST is active.  Then mktime() will use the timezone database
to determine the correct DST setting.

This allows us to re-enable test 56oc on all platforms.

Test-Parameters: trivial clientdistro=sles15sp3 env=ONLY=56
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I94afba96e2563442786726096501c5ec0b40a881
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49206
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-16313 pcc: use two bits to indicate pcc type for attach 60/49160/5
Qian Yingjin [Tue, 15 Nov 2022 06:57:08 +0000 (01:57 -0500)]
LU-16313 pcc: use two bits to indicate pcc type for attach

PCC currenty supports two types: readwrite and readonly.
The attach data structure @lu_pcc_attach is using 32 bit value to
indicate the PCC type:
struct lu_pcc_attach {
__u32 pcca_type;
__u32 pcca_id;
};

In this patch, it changes to use 2 bits to represent the PCC type.
The left bits in @pcca_type can be used as flags for attach such
as a flag to indicate using the asynchronous attach via the
command "lfs pcc attach -A" for PCCRO.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Idee26018642a174b04d1d36a81952ea98a06514e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49160
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-15544 osd-ldiskfs: Update bio_set_dev and BIO_MAX_VECS 35/49135/5
Shaun Tancheff [Fri, 11 Nov 2022 08:19:53 +0000 (02:19 -0600)]
LU-15544 osd-ldiskfs: Update bio_set_dev and BIO_MAX_VECS

Linux commit v5.11-rc5-9-g309dca309fc3
  block: store a block_device pointer in struct bio
created bio_set_dev macro and
Linux commit v5.15-rc6-127-gcf6d6238cdd3
  block: turn macro helpers into inline functions
change the macro to an inline function for bio_set_dev.
This change tests for bio_set_dev and provides one, if one
is not provided by the kernel.

Linux commit v5.12-rc1-20-ga8affc03a9b3
   block: rename BIO_MAX_PAGES to BIO_MAX_VECS
This change provide a fallback for older kernels when
BIO_MAX_VECS is not defined.

Linux commit v5.11-rc4-8-g5857c9209ce5
  mm: Mark anonymous struct field of 'struct vm_fault' as 'const'
Breaks and exisiting configure test for vm_fault.address
This changes the configure test for vm_fault.address so it does
not fail due to address being const

Test-Parameters: trivial
HPE-bug-id: LUS-10744
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I06d3bf60e32b969e1e635e378cbd1ee36293165c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49135
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
16 months agoLU-16308 llite: wake_up after cl_object_kill 30/49130/7
Lai Siyao [Thu, 10 Nov 2022 13:15:51 +0000 (08:15 -0500)]
LU-16308 llite: wake_up after cl_object_kill

cl_inode_fini() calls cl_object_kill() to set LU_OBJECT_HEARD_BANSHEE,
and then calls cl_object_put_last() to wait for object refcount to
become one, It should wake_up() in the middle in case someone is
waiting on the flag.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I244db71ee4ed9c39118e443b99c3b8a3a0aa4bc3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49130
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-16295 kernel: kernel update RHEL 7.9 [3.10.0-1160.80.1.el7] 45/49045/5
Jian Yu [Fri, 4 Nov 2022 07:15:39 +0000 (00:15 -0700)]
LU-16295 kernel: kernel update RHEL 7.9 [3.10.0-1160.80.1.el7]

Update RHEL 7.9 kernel to 3.10.0-1160.80.1.el7.

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

Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: I50a0ee572d24ddc73f8af6dc32ef701c260e45b7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49045
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
16 months agoLU-16262 tests: Remove sanity-gss.sh 48/48948/6
Arshad Hussain [Fri, 4 Nov 2022 05:10:47 +0000 (10:40 +0530)]
LU-16262 tests: Remove sanity-gss.sh

Purpose of sanity-gss is to test just the
GSSAPI code itself. This is done by making
use of the gssnull/null security flavor.
Currently, this is exercised through
non-regression tests with SSK and therefore
sanity-gss.sh is not required. This patch
removes sanity-gss.sh from repo due to above
reasons.

Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ief62e8111cafdc5bebca1f47a1b09fbafb152a76
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48948
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: Sebastien Buisson <sbuisson@ddn.com>
16 months agoLU-16087 lprocfs: add histogram to stats counter 78/48278/12
Lei Feng [Wed, 17 Aug 2022 00:48:33 +0000 (08:48 +0800)]
LU-16087 lprocfs: add histogram to stats counter

Add histogram to stats counter.
Enable histogram for read/write_bytes in mdt/obdfilter
job stats.

Sample job_stats:
- job_id:          md5sum.0
snapshot_time   : 3143196.864165417 secs.nsecs
start_time      : 3143196.707206168 secs.nsecs
elapsed_time    : 0.156959249 secs.nsecs
  read_bytes:      { samples: 2, ..., hist: { 32K: 1, 1M: 1 } }
  write_bytes:     { samples: 1, ..., hist: { 1K: 1 } }

Signed-off-by: Lei Feng <flei@whamcloud.com>
Change-Id: I75b6909c8b63f08b74c3c411ff3dcd27881bb839
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48278
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Shuichi Ihara <sihara@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>
16 months agoLU-15998 pcc: set hsm-root correctly during copytool setup 09/47909/3
Qian Yingjin [Fri, 8 Jul 2022 02:59:36 +0000 (22:59 -0400)]
LU-15998 pcc: set hsm-root correctly during copytool setup

During copytool setup, we set --hsm-root with the archive root
path of $SINGLEAGT. However, when set --hsm-root explicitly via
"-h|--hsm-root", it should reset the hsm root with the specified
one. Otherwise, it will cuase sanity-pcc/test_3b failed.

Test-Parameters: clientcount=3 testlist=sanity-pcc,sanity-pcc,sanity-pcc
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ida6c1ff7459548b068fd62ce315fe8075633b5fc
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47909
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>
16 months agoLU-8837 lustre: remove target declarations from obd.h 52/41952/11
Mr NeilBrown [Wed, 23 Nov 2022 21:35:25 +0000 (16:35 -0500)]
LU-8837 lustre: remove target declarations from obd.h

lu_target.h and obd_target.h are only needed in obd.h
for some structs in obd_device.u.  We don't really need to mention
these structs in the union as they are all quite small.

So we can define accessor function that cast a pointer to the union
into the required type, and then we can completely remove these
includes from obd.h

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I9b314b0bfc1baae03ccb8eadf134964ea308f638
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/41952
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 months agoLU-8837 target: don't build any 'target' on client. 68/41768/9
Mr NeilBrown [Fri, 13 Nov 2020 02:28:23 +0000 (13:28 +1100)]
LU-8837 target: don't build any 'target' on client.

Nothing in the 'target/' directory is needed on the client,
so don't build it for client-only builds

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I9a63c1a11c7b44edadc355bd323381ba1951376f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/41768
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
16 months agoLU-13485 build: Parallel build configure cache fixes 49/49149/3
Shaun Tancheff [Mon, 14 Nov 2022 15:43:32 +0000 (09:43 -0600)]
LU-13485 build: Parallel build configure cache fixes

This fixes the infrastructure for parallel builds when cached
enabled results are enabled, the critical fix being proper
usage of AC_CACHE_CHECK in the LB2_LINUX_TEST_RESULT macro.

Test-Parameters: trivial
Fixes: b0209c2d4d ("LU-13485 build: Enable 2 stage configure tests")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I94d7ff291dfd4f2dc5e218acc811329b986f8fbf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49149
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: Oleg Drokin <green@whamcloud.com>
16 months agoLU-10391 lnet: change lnet_find_best_lpni to handle large NIDs 81/49181/3
James Simmons [Mon, 21 Nov 2022 14:23:56 +0000 (09:23 -0500)]
LU-10391 lnet: change lnet_find_best_lpni to handle large NIDs

Currently lnet_find_best_lpni() only handles small NID addresses
for the dst_nid. Change this to large NID address to allow IPv6
and other large address protocols.

Test-Parameters: trivial testlist=sanity-lnet
Test-Parameters: serverversion=2.12 serverdistro=el7.9 testlist=runtests
Test-Parameters: clientversion=2.12 testlist=runtests
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: I23ef73f5955a3016262d096706d5cf00ffa4abda
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49181
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: Oleg Drokin <green@whamcloud.com>