Whamcloud - gitweb
fs/lustre-release.git
3 weeks agoLU-18110 spelling: change sematics -> semantics 68/55968/2
Oleg Drokin [Thu, 8 Aug 2024 07:09:32 +0000 (03:09 -0400)]
LU-18110 spelling: change sematics -> semantics

3 occurences in total, one in documentation

Test-Parameters: trivial
Change-Id: I8f417163058f203095a063726d3280712158d38d
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55968
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-18110 doc: fix wrong structure name in llapi_advise 67/55967/2
Oleg Drokin [Thu, 8 Aug 2024 07:01:22 +0000 (03:01 -0400)]
LU-18110 doc: fix wrong structure name in llapi_advise

lla_advice is misspelled as lla_ladvice in description,
so fix it.

Test-Parameters: trivial
Change-Id: I0ee455c5151436e3de114767fe3cfb6c164e6ef2
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55967
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-18110 doc: change recieved -> received 66/55966/2
Oleg Drokin [Thu, 8 Aug 2024 06:58:34 +0000 (02:58 -0400)]
LU-18110 doc: change recieved -> received

Seems to be a pretty common misspelling, so change it in other places
too.

Test-Parameters: trivial
Change-Id: I7339eb4c2c67f7bda4cf0b23c4d74a9b28a4e295
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55966
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-17794 lustre: replace 0-length arrays with flexible arrays (2/3) 40/55940/5
Jian Yu [Tue, 6 Aug 2024 16:42:45 +0000 (09:42 -0700)]
LU-17794 lustre: replace 0-length arrays with flexible arrays (2/3)

This patch replaces 0-length arrays with flexible arrays to
resolve the UBSAN array-index-out-of-bounds runtime warnings.

Most replacement of 0-length arrays with flexible arrays
requires no special handling. Simply removing the “0” in
the array declaration is sufficient.

In order to have a flexible array member in a union or alone
in a struct, it needs to be wrapped in an anonymous struct
with at least 1 named member, but that member can be empty.
This was wrapped in Linux with the DECLARE_FLEX_ARRAY() macro.

Test-Parameters: optional mdtcount=4 mdscount=2 \
  clientdistro=ubuntu2404 testgroup=full-dne-part-1
Test-Parameters: optional mdtcount=4 mdscount=2 \
  clientdistro=ubuntu2404 testgroup=full-dne-part-2
Test-Parameters: optional mdtcount=4 mdscount=2 \
  clientdistro=ubuntu2404 testgroup=full-dne-part-3

Change-Id: I833bea287764005bd4b09cd2a6a008f527f897b3
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55940
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: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18105 tests: take care of "run LFSCK" message in dmesg 32/55932/3
Vladimir Saveliev [Thu, 14 Mar 2024 11:48:28 +0000 (14:48 +0300)]
LU-18105 tests: take care of "run LFSCK" message in dmesg

"logging isn't available, run LFSCKn" message may get hidden due to
console rate limit feature which causes sanity.sh:test_818 to fail.

Set console_ratelimit to 0 for the duration of sanity.sh:test_818
execution.

HPE-bug-id: LUS-11913
Fixes: 44a359caae ("LU-15166 tests: restore osp-syn threads after test_818")
Test-Parameters: testlist=sanity env=ONLY=818,ONLY_REPEAT=20
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: Ibe5c254bebe28f65d37f279802944fff5894f981
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55932
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Elena <elena.gryaznova@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18088 osd: use __vfs_getxattr 17/55917/4
Vladimir Saveliev [Fri, 8 Dec 2023 16:55:57 +0000 (19:55 +0300)]
LU-18088 osd: use __vfs_getxattr

vfs_getxattr() is not suitable for osd. To get security xattr it goes
via:

vfs_getxattr
  xattr_getsecurity
    security_inode_getsecurity
      cap_inode_getsecurity
        dentry = d_find_any_alias(inode)
          if (!dentry)
            return -EINVAL;
and return -EINVAL because osd object inodes have empty alias list.

Use __vfs_getxattr() instead.

Fixes: b9ef5d1e7f7 ("LU-17546 osd: use __vfs_removexattr")
HPE-bug-id: LUS-12018
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I71ed0141ebf5124d4ff0862c24fd719f29d883ae
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55917
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
3 weeks agoLU-18086 obdclass: do not use seeks to store pool order 13/55913/7
Artem Blagodarenko [Thu, 18 Jul 2024 20:27:27 +0000 (21:27 +0100)]
LU-18086 obdclass: do not use seeks to store pool order

Seeks field is used to decide how many elements to free
at shrink. Changing it leads to wrong shrink strategy and
finally to the OOM.

Let's use another means to store pool order.

Test-Parameters: trivial testlist=sanity-compr
Test-Parameters: trivial testlist=sanity-compr
Fixes: 93af01f966 ("LU-16724 ptlrc: ptlrpc: extend sec bulk functionality")
Change-Id: I075d6d139aedea29df03bafae1fac592e671656b
Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55913
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>
3 weeks agoLU-18082 utils: fid2path support for path exceeding PATH_MAX 97/55897/4
Sebastien Buisson [Wed, 31 Jul 2024 14:03:52 +0000 (16:03 +0200)]
LU-18082 utils: fid2path support for path exceeding PATH_MAX

PATH_MAX affects the path length of a single pathname, but it is
possible to exceed this by eg. creating a subdirectory tree, then cd
into it, then create a deep tree below this using a relative pathname.

So fix ll_fid2path and lfs_fid2path to not limit the output buffer to
PATH_MAX.

Add sanity test_154i to exercise this.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ic3a0e3ac1e806e45eb4c72c571f33404c60d0df5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55897
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Stephane Thiell <sthiell@stanford.edu>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-18075 tests: fiemap test for sparse files 83/55883/6
Elena Gryaznova [Sun, 18 Aug 2024 14:08:55 +0000 (17:08 +0300)]
LU-18075 tests: fiemap test for sparse files

New "Check fiemap for sparse files" test shows the
memory corruption without the following fix:
  LU-17110 llite: fix slab corruption with fm_extent_count=0

Test-Parameters: trivial testlist=sanity env=ONLY=44f,ONLY_REPEAT=10,NUMFILES_44f=20
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
HPE-bug-id: LUS-11952,LUS-12040
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I22034c7937366d9ea4b2b3f02fd7085d7ebe7e10
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55883
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17687 utils: Netlink doesn't return for missing MGS device 81/55881/2
James Simmons [Mon, 29 Jul 2024 15:30:56 +0000 (11:30 -0400)]
LU-17687 utils: Netlink doesn't return for missing MGS device

If the MGS is down then yaml_get_device_index() will fail to
contact the Netlink layer on the MGS server. When it fails
the bool done is still set to true which causes it to go into
a loop. The proper solution is to break on emitter failure of
any kind to the end of the function to cleanup the parser
and netlink socket.

Change-Id: Ia25000dd86fd2c5f46f5de24f9a5f391c373fea4
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55881
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17928 build: fix 'or' clause for rpmbuild 77/55877/3
Caleb Carlson [Sun, 11 Aug 2024 02:06:11 +0000 (09:06 +0700)]
LU-17928 build: fix 'or' clause for rpmbuild

This fixes the 'or' clause testing for older distro
versions, which was intended to provide backwards
compatibility for builds on distros that didn't natively
support the rpmbuild 'or' keyword. Instead, it always
evaluated to true, making it so that the DKMS package
was never included as a requirement satisfaction.

This change uses the 'or dkms' Requires, if any of the
distro versions are above a certain level.

Test-Parameters: trivial
HPE-bug-id: LUS-12467
Fixes: ab3b29ec39 ("LU-17928 lnet: add kmod devel package")
Signed-off-by: Caleb Carlson <caleb.carlson@hpe.com>
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I529d30a0dfb0b6e2e2bb55834db4c53506992d37
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55877
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17794 lustre: replace 0-length arrays with flexible arrays (1/3) 74/55874/7
Jian Yu [Tue, 6 Aug 2024 10:26:45 +0000 (03:26 -0700)]
LU-17794 lustre: replace 0-length arrays with flexible arrays (1/3)

This patch replaces 0-length arrays with flexible arrays to
resolve the UBSAN array-index-out-of-bounds runtime warnings.

Most replacement of 0-length arrays with flexible arrays
requires no special handling. Simply removing the “0” in
the array declaration is sufficient.

In order to have a flexible array member in a union or alone
in a struct, it needs to be wrapped in an anonymous struct
with at least 1 named member, but that member can be empty.
This was wrapped in Linux with the DECLARE_FLEX_ARRAY() macro.

Test-Parameters: optional mdtcount=4 mdscount=2 \
  clientdistro=ubuntu2404 testgroup=full-dne-part-1
Test-Parameters: optional mdtcount=4 mdscount=2 \
  clientdistro=ubuntu2404 testgroup=full-dne-part-2
Test-Parameters: optional mdtcount=4 mdscount=2 \
  clientdistro=ubuntu2404 testgroup=full-dne-part-3

Change-Id: I0e23a92382686678951f5d0dc56d91c895af7817
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55874
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: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18067 utils: lfs getdirstripe hangs on FIFO 61/55861/10
Rajeev Mishra [Wed, 24 Jul 2024 21:09:01 +0000 (21:09 +0000)]
LU-18067 utils: lfs getdirstripe hangs on FIFO

The command "lfs getdirstripe -r ." hangs when
executed on a directory containing a FIFO file.

Steps to reproduce-

mkfifo testFile
lfs getdirstripe -r .
A test case, test_56ebb, has been added to sanity.sh
to verify this scenario.

Test-Parameters: trivial
HPE-bug-id: LUS-12266
Signed-off-by: Rajeev Mishra <rajeevm@hpe.com>
Change-Id: I62276e94383755a860b4195868dac554f90f7fe8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55861
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-18059 utils: lfs migrate fails for ost striped file 47/55847/8
Rajeev Mishra [Tue, 23 Jul 2024 20:57:03 +0000 (20:57 +0000)]
LU-18059 utils: lfs migrate fails for ost striped file

The lfs migrate fails for the ost striped file
with following error message
lfs migrate: can't create composite layout from
file /mnt/lustre/d56xh.sanity.src:
Numerical result out of range

test_56ej has been added to sanity.sh to test this
scenario.

Signed-off-by: Rajeev Mishra <rajeevm@hpe.com>
HPE-bug-id: LUS-11815
Test-Parameters: trivial
Change-Id: Idc345c3662fde5db3d323019927b4d3a82b04816
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55847
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 weeks agoLU-18053 osc: add another cond_resched() to osc_lru_shrink() 88/55888/4
Brian Behlendorf [Tue, 30 Jul 2024 15:40:19 +0000 (08:40 -0700)]
LU-18053 osc: add another cond_resched() to osc_lru_shrink()

When discarding pages osc_lru_shrink() eventually calls
delete_from_page_cache() which must aquire a spin lock
on the page cache.  On systems with a large number of
CPUs this can result in spinlock contention and soft
lockups.  Add a call to cond_resched() to yield the CPU
as needed.  This is a follow up to LU-17630.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Change-Id: I1ebf940a9a96c433f527f3e0dd9dc765b2645c97
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55888
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
3 weeks agoLU-18032 llite: disable unaligned AIO 16/55716/5
Patrick Farrell [Fri, 12 Jul 2024 15:33:34 +0000 (11:33 -0400)]
LU-18032 llite: disable unaligned AIO

Parallel copy for unaligned DIO has an unpleasant
interaction with AIO - Since AIO is async, we must do the
copying first.

This shows up as rare failures in 119i, which tests
unaligned AIO.

Handling this correctly for AIO introduces some complexity,
so instead we disable unaligned AIO.  This is a very small
use case and the complexity is not worth the benefit.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I81781da841b83130c9a7b5855abd88ae048f1908
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55716
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>
3 weeks agoLU-17987 ofd: always trust OST last_id 74/55574/4
Lai Siyao [Thu, 30 May 2024 08:19:59 +0000 (04:19 -0400)]
LU-17987 ofd: always trust OST last_id

In normal precreate, the last_id on OST is always trustable because
it's maintained in memory, and it should be MDT that messes up the
last created FID in reconnect. Even if the gap is more than
OST_MAX_PRECREATE, reply the last_id to MDT to avoid leaving OST in
unavailable status.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I838aa0ab15e6adaaa340356e54ab597a43a9fdf4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55574
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>
3 weeks agoLU-17775 lfs: Use fid for lfs_setstripe copy 81/55081/7
Di Wang [Tue, 7 May 2024 03:12:43 +0000 (03:12 +0000)]
LU-17775 lfs: Use fid for lfs_setstripe copy

FID can be used for lfs_setstripe copy.

Signed-off-by: Di Wang <di.d.wang@oracle.com>
Change-Id: Ia3f968b0602f7f8640693189c4deec4260fc2bc9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55081
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 weeks agoLU-12885 mds: add enums for MDS_OPEN flags (2/4) 66/55066/7
Arshad Hussain [Fri, 10 May 2024 08:08:34 +0000 (13:38 +0530)]
LU-12885 mds: add enums for MDS_OPEN flags (2/4)

This patch is second of the series of patch that separates
kernel open flags from MDS open flags

This second step changes och_flags to use MDS_* flags. This
also renames 'struct ll_file_data' variable from 'fd' to 'lfd'.
As 'fd' is generally used to denote kernel fd.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I3b105da5930fde51a57b2cda7aef38cd1e1d774d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55066
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-10499 pcc: keep mtime unchange when attach file into PCC 24/54424/7
Qian Yingjin [Tue, 14 Sep 2021 08:40:03 +0000 (16:40 +0800)]
LU-10499 pcc: keep mtime unchange when attach file into PCC

Modifying the timestamps of the files for the attach will cause
problems for the cache manager, since all files will appear new
at the time they are imported into the cache.
And that may also confuse applications if the file mtime has
changed just because of attach.

In this patch, it keeps the file mtime unchanged when attach it
into PCC.

EX-bug-id: EX-2859
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I26f0c19c7b6cc1af0d62c192931d0042c9614993
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54424
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: jsimmons <jsimmons@infradead.org>
3 weeks agoLU-17613 tests: explicit check for eviction with dmesg parse 99/54299/7
Vladimir Saveliev [Tue, 30 Jul 2024 15:21:43 +0000 (18:21 +0300)]
LU-17613 tests: explicit check for eviction with dmesg parse

client_evicted() used to check for client eviction based on result of
lfs df. When it returned any error but EOPNOTSUPP - that was taken as
"client was evicted".

When glibc's realpath() changed to not call stat()
(see for ref
  stdlib: Sync canonicalize with gnulib [BZ #10635] [BZ #26592] [BZ
  ..
  - Realpath mishandles EOVERFLOW; stat not needed anyway (BZ#24970).
)
'lfs df' started to return EOPNOTSUPP from lfs_df(). client_evicted()
was changed, now any non-zero return is taken as client was evicted.

Check for "This client was evicted" in dmesg output to make sure that
eviction happened.

Add a comment in ptlrpc_import_recovery_state_machine() to make it
clear that this specific error message is used by the test code. Avoid
ratelimiting for the message.

Fixes: a5a9ded43b ("LU-16916 tests: fix client_evicted() not to ignore EOPNOTSUPP")
Test-Parameters: trivial testlist=replay-vbr,recovery-small
HPE-bug-id: LUS-11742
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I10ef99d23d630164bfdf167e54e2f177e9b85598
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54299
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Elena <elena.gryaznova@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17463 osc: add support for unevictable mlock()ed pages 26/53826/16
Qian Yingjin [Fri, 26 Jan 2024 07:49:34 +0000 (02:49 -0500)]
LU-17463 osc: add support for unevictable mlock()ed pages

The page cache shrinker does not distinguish mlock()ed pages from
normal unused pages in page LRU list and would remove it from
cache wrongly.

In this patch, we use a separate unevictable list to manage the
pages marked with PG_mlocked flag.
As there is no direct notification or interface for page mlock()/
munlock() to the filesystem, we need to scan the whole unevitable
list heavily to check whether there are any freeable pages in the
list to remove them later.

Thus we implement two interfaces to scan and shrink unevictable
pages that no longer marked with PG_mlocked and remove them
from cache manually.
- $LCTL set_param llite.*.unevict_cached_mb=clear
  Scan and clear all pages in unevictable lists that no
  longer marked with PG_mlocked on a Lustre client FS.
  Scan the normal LRU list to move the pages marked with
  PG_mlocked into the unevictable list.
- $LCTL set_param osc.*.osc_unevict_cached_mb=clear
  Scan and clear all pages that no longer marked with PG_mlocked
  in the unevictable list corresponding to this OSC obd device.
  Scan the normal LRU list to move the pages marked with
  PG_mlocked into the unevictable list.

The command "echo 3 > /proc/sys/vm/drop_caches" can also be
used to evict the pages unlocked by munlock() system call which
are no longer marked with PG_mlocked.

In our design, the mlocked pages are not accounted into the LRU.
Thus, the total cached pages in a Lustre client FS may exceed
the maximum LRU limit @max_cached_mb on a Lustre client FS.

Add a tunable parameter to control whether the mlocked pages
functionality is enabled:
llite.*.enable_mlock_pages
This will allow disabling this feature if something goes wrong in
the feild.
It is disabled by default.

Add test case sanity/test_600{a,b,c,d}.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I0713ad254999dfc32ed5063ec0d8e042968793a9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53826
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-3720 tests: use actual stripe count in sanity/130b 72/53072/11
Andreas Dilger [Fri, 10 Nov 2023 08:57:37 +0000 (01:57 -0700)]
LU-3720 tests: use actual stripe count in sanity/130b

If the requested number of stripes is not created, then
the test will fail.  Use the actual number of stripes
when checking the filefrag output.

Also clean up code style in other test_130 subtests.

Test-Parameters: trivial testlist=sanity env=ONLY=130
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iec5926a2863c750d89f89a5cbf6bf5df0d3ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53072
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-17272 osc: check cl_dirty_max_pages 37/53037/4
Hongchao Zhang [Wed, 26 Jun 2024 06:56:26 +0000 (14:56 +0800)]
LU-17272 osc: check cl_dirty_max_pages

In osc_queue_sync_pages, the client_obd->cl_dirty_max_pages
should also be checked along with the grant check.

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: I3d22fdcf6d8ea99b48bc1f42e7b686ab4ba0e1f0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53037
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18080 ldiskfs: support NO_CHECKS for Ubunutu and SuSE15 85/55985/2
James Simmons [Fri, 9 Aug 2024 17:01:08 +0000 (11:01 -0600)]
LU-18080 ldiskfs: support NO_CHECKS for Ubunutu and SuSE15

Backport the special NO_CHECKS flag for Ubuntu and SuSE15 that
was missing. Without it you get the build error:

osd_scrub.c:656:42: error: ‘LDISKFS_IGET_NO_CHECKS’ undeclared ...

Also add ext4-filename-encode.patch for Ubuntu 20.04.

Test-Parameters: trivial
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: I1022b0f4a1b5ee818596ca3aece3f886a5721d25
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55985
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17911 obdclass: fix faked flexible arrays in jobid 95/55995/3
Yang Sheng [Mon, 12 Aug 2024 05:04:55 +0000 (13:04 +0800)]
LU-17911 obdclass: fix faked flexible arrays in jobid

To fix the crash caused by issue of faked flexible arrays
in  jobid.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: Iba88582e20dfe38ec060ed9a05ba3d65ee3e31e1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55995
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>
3 weeks agoLU-6142 kgnilnd: SPDX for GNI LND 31/55931/2
Timothy Day [Mon, 5 Aug 2024 03:01:24 +0000 (23:01 -0400)]
LU-6142 kgnilnd: SPDX for GNI LND

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I429de7ecee8bd42d83401b4ede3a00947ba65210
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55931
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-6142 fid: SPDX for FID/FLD code 86/55886/2
Timothy Day [Tue, 30 Jul 2024 03:15:24 +0000 (23:15 -0400)]
LU-6142 fid: SPDX for FID/FLD code

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Iaadd10e60e08fb3f551812289e2c30de12824fd4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55886
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-6142 mdc: SPDX for MetaData Client 85/55885/2
Timothy Day [Tue, 30 Jul 2024 03:09:18 +0000 (23:09 -0400)]
LU-6142 mdc: SPDX for MetaData Client

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ie07b59890c246074eec51052ccf7e1049d99bf81
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55885
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-6142 lnet: Fix style issues for o2iblnd_cb.c 80/55880/3
Arshad Hussain [Mon, 29 Jul 2024 10:54:39 +0000 (06:54 -0400)]
LU-6142 lnet: Fix style issues for o2iblnd_cb.c

This patch fixes issues reported by checkpatch
for files lnet/klnds/o2iblnd/o2iblnd_cb.c

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Id84dbf4a18eedc73d1fc3173fef799c5d5cdf659
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55880
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-6142 lnet: Fix style issues for socklnd_proto.c 26/55826/4
Arshad Hussain [Mon, 22 Jul 2024 04:37:54 +0000 (00:37 -0400)]
LU-6142 lnet: Fix style issues for socklnd_proto.c

This patch fixes issues reported by checkpatch
for files lnet/klnds/socklnd/socklnd_proto.c

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ie1eff17d3287dc5f844f2deba62a6f6ca4a02b4a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55826
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-14853 tests: conf-sanity/32 upgrade 2.14/2.15 images 66/54666/10
Andreas Dilger [Sat, 17 Aug 2024 05:11:01 +0000 (22:11 -0700)]
LU-14853 tests: conf-sanity/32 upgrade 2.14/2.15 images

Add filesystem upgrade images for conf-sanity test_32 for the
2.14.0 and 2.15.0 releases to confirm proper upgrade for the
on-disk filesystem format from these systems.

Add checks for new features added in these releases:
- OST pools, OST Pool Quotas
- fscrypt data encryption and filename encryption

Test-Parameters: trivial mdtcount=4 mdscount=2 env=ONLY=32 testlist=conf-sanity
Test-Parameters: trivial fstype=zfs env=ONLY=32 testlist=conf-sanity
Test-Parameters: trivial mdtcount=4 mdscount=2 testlist=sanity-quota

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: I58c1be54abc0a36b8bd0fd0139627af0a078e0f0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54666
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-6142 mdt: Fix style issues for mdt_lib.c 30/54230/7
Arshad Hussain [Fri, 1 Mar 2024 06:29:46 +0000 (11:59 +0530)]
LU-6142 mdt: Fix style issues for mdt_lib.c

This patch fixes issues reported by checkpatch
for file lustre/mdt/mdt_lib.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I04b1cb3c993f229c83e7f54a13e03ae6a957aa49
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54230
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17525 llite: unaligned DIO zfs detection 95/55895/4
Shaun Tancheff [Sat, 10 Aug 2024 02:12:21 +0000 (09:12 +0700)]
LU-17525 llite: unaligned DIO zfs detection

Update to the ZFS detection logic to be stable. If any
component of the I/O is ZFS treat the entire I/O as ZFS

HPE-bug-id: LUS-12175
Fixes: 07a1272233 ("LU-17525 llite: unaligned DIO interop page alignment")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ie9d5c8af373cec96855f81f5330e174ed71f370a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55895
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>
4 weeks agoLU-18113: ptlrpc: move DEBUG_REQ out of spinlock 48/55948/2
Andriy Skulysh [Tue, 18 Jun 2024 18:18:59 +0000 (21:18 +0300)]
LU-18113: ptlrpc: move DEBUG_REQ out of spinlock

It may help with slow cancel processing:

Stack :
crash_nmi_callback
nmi_handle
default_do_nmi
do_nmi
end_repeat_nmi
number
vsnprintf
libcfs_debug_msg
_debug_req
ptlrpc_server_request_add
ptlrpc_server_handle_req_in
ptlrpc_main
kthread
ret_from_fork
Progs:  1836895 "ldlm_cn00_011"

Change-Id: I778547c676be8192da2ec30ec5deefb789fe8e7b
HPE-bug-id: LUS-12411
Signed-off-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55948
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>
4 weeks agoLU-18112 mdt: check for fid from a client to match format 47/55947/2
Andriy Skulysh [Wed, 24 Jul 2024 17:14:06 +0000 (20:14 +0300)]
LU-18112 mdt: check for fid from a client to match format

Access to /mnt/lustre/.lustre/fid/0x200000 passes sane checks

Change-Id: I748e519b56cce6809285bbe178e89f5872a46188
HPE-bug-id: LUS-12448
Signed-off-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55947
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: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-16707 scripts: make license-status more flexible 28/55928/2
Timothy Day [Sat, 3 Aug 2024 20:02:43 +0000 (16:02 -0400)]
LU-16707 scripts: make license-status more flexible

Accept a path argument to restrict the search to a sub-tree.
By default, use the current directory. Also, fix some shellcheck
errors.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Iaddf0c22f8fed80947b0b511f9a56f6a35e0347b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55928
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 weeks agoLU-17812 coverity: Fixes Boolean operation on a constant 26/55926/4
Rajeev Mishra [Sat, 3 Aug 2024 18:28:58 +0000 (18:28 +0000)]
LU-17812 coverity: Fixes Boolean operation on a constant

This commit fixes the coverity issue introduced by the
previous commit of LU-17812. Below given is the coverity
report.
CID 440624 Integer handling issue constant_expression_result
The expression "ldlm_lock_to_ns(__ext->oe_dlmlock)->
ns_dump_stack_on_error && 1 /* D_ERROR & D_ERROR */" performs a
Boolean operation on a constant

Fixes: 70b9dc57a99d ("LU-17812 ldlm: stack trace log for LDLM error")
Signed-off-by: Rajeev Mishra <rajeevm@hpe.com>
Change-Id: I300831598c54f3f96719938253c7eaacb83f299f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55926
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 weeks agoLU-18081 tests: improve conf-sanity/98 testing 91/55891/10
Andreas Dilger [Tue, 30 Jul 2024 20:54:14 +0000 (14:54 -0600)]
LU-18081 tests: improve conf-sanity/98 testing

conf-sanity test_98 is failing for newer distros like Ubuntu 24.04
and SLES15sp6, which have newer userspace tools.

Print better error messages about what options are being processed
to help debug this issue.  It appears mount is now deduplicating
options passed on the command-line, which invalidates the test case.

Change test_98 to call mount.lustre directly to verify this handling.

Test-Parameters: trivial
Test-Parameters: testlist=conf-sanity env=ONLY=98 clientdistro=ubuntu2404
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I34de0fdbd4ca36228d313b53251b5dbcfc502b07
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55891
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-18016 kfilnd: avoid wrong call to kfilnd_ep_put_key 88/55688/2
Vladimir Saveliev [Wed, 10 Jul 2024 09:26:17 +0000 (12:26 +0300)]
LU-18016 kfilnd: avoid wrong call to kfilnd_ep_put_key

kfilnd_tn_alloc(): do not call kfilnd_ep_put_key() if
kfilnd_ep_get_key() was not called

HPE-bug-id: LUS-12405
Test-Parameters: trivial
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I6dc9f581b5632a9a220cc04f4b5735581b75f40a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55688
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17702 utils: 'lfs quota' MOUNT_POINT optional 83/55683/22
Frederick Dilger [Tue, 9 Jul 2024 22:01:36 +0000 (16:01 -0600)]
LU-17702 utils: 'lfs quota' MOUNT_POINT optional

Specifying the MOUNT_POINT is now optional for 'lfs quota'.
Additionally multiple mount points can now be specified
to print quota information for each one.

If the mount point is not specified, quota information for ALL
mounted filesystems will be printed instead.

Changes were made to fix the quota formatting as some columns were
misaligned. Filesystem is no longer placed on newline if the
name exceeds 16 characters, this should make for better argument
parsing.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I3985855c5ce67be0fb8107c046bd54b802e1f6f1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55683
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17983 mdt: mti_big_lov and mti_big_lmv 51/55551/11
Shaun Tancheff [Fri, 19 Jul 2024 04:00:08 +0000 (11:00 +0700)]
LU-17983 mdt: mti_big_lov and mti_big_lmv

Currently mti_big_lmm can be used for LOV, LMV and as a
generic buffer in mdt_attr_get_pfid() and mdt_attr_get_pfid_name()

The LOV and LMV are not mutually exclusive and should be split
into separate buffers so one does not over write the other.

HPE-bug-id: LUS-11657
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Icc4c5676a24d92a6448e21fe1d66a851a17de46e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55551
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-11077 utils: move get/set/list_param into own file 42/55642/9
Andreas Dilger [Wed, 3 Jul 2024 16:35:44 +0000 (10:35 -0600)]
LU-11077 utils: move get/set/list_param into own file

Move the "lctl get_param/set_param/list_param" handling code into a
separate file so that the functions can be called within the code
elsewhere without the need for all the dependencies.

Remove obsolete "local_cfg" and "set_timeout" sub-commands that
have been obsolete since "set_param" was added.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: If4dc44abb1f5de4a3c24e043ba9a352ef7c0e1ec
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55642
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 weeks agoLU-17753 llite: ll_getattr_dentry(): protect access to times 43/54843/5
Vladimir Saveliev [Mon, 13 May 2024 14:57:27 +0000 (17:57 +0300)]
LU-17753 llite: ll_getattr_dentry(): protect access to times

ll_merge_attr() updates inode's timestamps twice. Racing stat may get
intermediate values of timestamps.

Test to illustrate the issue is added.

ll_merge_attr() makes intermediate inode's timestamp update with
values from MDS under
ll_inode_info->lli_size_mutex. ll_getattr_dentry() should also use the
mutex to not return intermediate timestamps. This applies for regular
files only.

Test-Parameters: testlist=sanity env=ONLY=39u,ONLY_REPEAT=200
HPE-bug-id: LUS-12265
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: Ic94040418da2a5cc5e41458dbf9d4c05244741ff
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54843
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17567 tests: improve sanity.sh:test_27T 13/54113/3
Vladimir Saveliev [Wed, 31 Jul 2024 14:20:17 +0000 (17:20 +0300)]
LU-17567 tests: improve sanity.sh:test_27T

sanity.sh:test_27T is to take care that second of write rpcs generated
by multiop fails with ENOSPC. Otherwise, grant accounting breaks.

Test-Parameters: testlist=sanity env=ONLY="27T 42d"
HPE-bug-id: LUS-11178
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I056145ffc223f943585edbaa70f92ab9d5fdc1f1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54113
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nikitas Angelinas <nikitas.angelinas@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-18083 utils: handle more than one peer NI per peer 44/55944/4
James Simmons [Wed, 7 Aug 2024 13:43:01 +0000 (07:43 -0600)]
LU-18083 utils: handle more than one peer NI per peer

For lnetctl peer list command the loop to parse the returned data
from the kernel ended its loop on the first mapping end event.
This fails since we can have multiple peer ni nids and each one
contains a mapping start and end event. Instead we need to skip
everything until we get an sequence end event which has the
effect of filtering everything but the primary nids which we
want.

Second smaller issue is that yaml_lnet_peer_display() can have
either an emitter or parser error. If it was a emitter error
the code would return back yaml_lnet_peer() would still treat
it as an parse error as well which is incorrect. Make
yaml_lnet_peere_display() return 0 if its a parser error or
-EINVAL if its an emitter error. This way we can handle error
reporting in each case separately.

Test-Parameters: trivial testlist=sanity-lnet
Change-Id: I71372a5b243c5907022a09fb080781d60180dd41
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55944
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-6142 lnet: update files with correct SPDX 30/55930/4
Timothy Day [Sun, 4 Aug 2024 17:43:33 +0000 (13:43 -0400)]
LU-6142 lnet: update files with correct SPDX

Some files were given LGPL-2.0 when they should have been
LGPL-2.1 based on the previous license text. Add the Linux
syscall note to UAPI headers.

Add SPDX to a few missed files in LNET.

Fixes: 0f39311369 ("LU-6142 lnet: SPDX for lnet/utils/")
Fixes: c9a7728476 ("LU-6142 lnet: SPDX for lnet/include/ and misc files")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I6ceadfa182909ed4e3e52f88b4d37249cb30b6ef
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55930
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: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-6142 kfilnd: SPDX for Kfabric LND 29/55929/2
Timothy Day [Sat, 3 Aug 2024 20:30:49 +0000 (16:30 -0400)]
LU-6142 kfilnd: SPDX for Kfabric LND

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id75f33b7a1d3eaa699f6f7056ae7e54fd88d7240
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55929
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-6142 lfsck: SPDX for Lustre FS checker 27/55927/2
Timothy Day [Sat, 3 Aug 2024 19:46:10 +0000 (15:46 -0400)]
LU-6142 lfsck: SPDX for Lustre FS checker

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ie02c2bcc775520e8710880b5e91a545c4a922f60
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55927
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.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>
4 weeks agoLU-6142 ldlm: SPDX for lock manager code 25/55925/2
Timothy Day [Sat, 3 Aug 2024 18:44:12 +0000 (14:44 -0400)]
LU-6142 ldlm: SPDX for lock manager code

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id89b827f2596f4522b5ea7ea5be60a10aa15c083
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55925
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: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-18080 ldiskfs: add NO_CHECKS flags for ext4_iget 96/55896/5
Li Dongyang [Wed, 31 Jul 2024 12:03:32 +0000 (22:03 +1000)]
LU-18080 ldiskfs: add NO_CHECKS flags for ext4_iget

Since v6.4-rc4-1-gb3e6bcb94590, the upstream kernel introduced
a strict checking of EXT4_IGET_EA_INODE and it has to match the
EXT4_EA_INODE_FL from the inode.

This creates a problem for osd scrub as we iterate over the inodes
according to bitmap we have no idea if the inode is an ea_inode or
not.

Add a new flag EXT4_IGET_NO_CHECKS and relax the strict checking
when the flag is used.

Cleanup osd_ldiskfs_iget_special(), the caller of osd_iget() now are
passing in the additional flags to ext4_iget().

Test-Parameters: trivial
Test-Parameters: fstype=ldiskfs serverdistro=el9.4 testlist=conf-sanity env=ONLY=32a
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I43c8da68b06c5592e197dd3b5e3f4f7c842cf7c4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55896
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Shuichi Ihara <sihara@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-6142 lnet: Fix style issues for socklnd_lib.c 24/55824/2
Arshad Hussain [Fri, 19 Jul 2024 09:12:26 +0000 (05:12 -0400)]
LU-6142 lnet: Fix style issues for socklnd_lib.c

This patch fixes issues reported by checkpatch
for files lnet/klnds/socklnd/socklnd_lib.c

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I9c83e632ae52336bd26191a8e053757ede53a25e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55824
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-6142 lnet: Fix style issues for socklnd_cb.c 23/55823/2
Arshad Hussain [Fri, 19 Jul 2024 10:01:23 +0000 (06:01 -0400)]
LU-6142 lnet: Fix style issues for socklnd_cb.c

This patch fixes issues reported by checkpatch
for files lnet/klnds/socklnd/socklnd_cb.c

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I1928c560de316e587606770cf924410f5699ab27
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55823
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-10391 obdclass: truncate large uuids 67/55767/7
Chris Horn [Mon, 15 Jul 2024 18:33:41 +0000 (12:33 -0600)]
LU-10391 obdclass: truncate large uuids

With large NIDs it is now possible for UUIDs, based on NID strings, to
exceed UUID_MAX length. To handle this, these large NID strings are
truncated.

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ic6b9310c9bf8a598e3cc87575c85f43ef4577345
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55767
Reviewed-by: Timothy Day <timday@amazon.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>
4 weeks agoLU-18012 obd: support large NIDs when MGS is down 07/55907/6
James Simmons [Thu, 1 Aug 2024 19:23:39 +0000 (13:23 -0600)]
LU-18012 obd: support large NIDs when MGS is down

When the mgc is initialized it will create an export for the MGS.
Having a MGS export does not mean we can actually reach the
remote MGS. The way to know if the MGS is reachable is to examine
the connect flags after obd_connect() is called. If its zero
then the remote MGS is down. If this is the case since when
starting the mgc we examine the mgsnode= string we can examine
every NID. If one of those NIDs for mgsnode= or the failover
has a large NID address then force support for large NIDs.

Change-Id: I3550df21618f07b69701a9d337d3dfc5f99e49a3
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55907
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 weeks agoLU-6142 llite: Fix style issues for namei.c 42/54142/9
Arshad Hussain [Thu, 22 Feb 2024 08:08:26 +0000 (13:38 +0530)]
LU-6142 llite: Fix style issues for namei.c

This patch fixes issues reported by checkpatch
for file lustre/llite/namei.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ibf2113a598f7c72879e8068c44e38a4ce41e1774
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54142
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-16537 write: fixes to writes at maximal offsets 33/49933/19
Shaun Tancheff [Sun, 28 Jul 2024 04:51:48 +0000 (11:51 +0700)]
LU-16537 write: fixes to writes at maximal offsets

There are issues at maximal offsets.
Sanity tests 44[b-e] illustrate the problems.

osd_ldiskfs_map_inode_pages():
  fix osd-ldiskfs to not hinder write of maximum possible block of a
  file at block number 2^32-1.  It was incorrectly preventing this
  last block to be written.
        Fixes 44b and 44c.

lov_io_rw_iter_init():
  cast loff_t to __u64 so that comparison worked correctly for
  overflowed loff_t (as it is signed).
        Fixes 44d which fails for ZFS.

lsme_unpack():
  Limit maximal size of file to take into account that last stripe of
  an object may be incomplete.
        Fixes 44e.

ll_do_tiny_write():
  Do not allow to go over cl_file_maxbytes.
        Fixes 44e for aarch64 client/LDISKFS servers.

HPE-bug-id: LUS-11475
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I1c19efda38ab3621fa3b08712308a76330d86cff
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49933
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>
5 weeks agoLU-18110 doc: lctl multiple NIDs specification not clear 57/55957/3
Oleg Drokin [Wed, 7 Aug 2024 21:42:53 +0000 (17:42 -0400)]
LU-18110 doc: lctl multiple NIDs specification not clear

The original statement is somewhat confusing. I think
this one is better, but may be there's an even better
option somebody could think of?

Test-Parameters: trivial
Change-Id: I4206269913eaec06fec034374da2be42625086b0
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55957
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18110 doc: improve wording in lctl-snapshot* manpages 56/55956/4
Oleg Drokin [Wed, 7 Aug 2024 21:41:38 +0000 (17:41 -0400)]
LU-18110 doc: improve wording in lctl-snapshot* manpages

There's some consistently strangely spelled umount when the unmount
action is meant (i.e. not part of the command itself) and other
clearing of the language

Test-Parameters: trivial
Change-Id: If20bcad739e3eb1367f2e028ac45d60d2986fc34
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55956
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18110 doc: grammar fixes in llapi changelog and pcc man pages 60/55960/3
Oleg Drokin [Wed, 7 Aug 2024 21:51:51 +0000 (17:51 -0400)]
LU-18110 doc: grammar fixes in llapi changelog and pcc man pages

There are some minor grammar issues there highighted by my latest toy.

Test-Parameters: trivial
Change-Id: Ib37d30acf9bbabb6c71158d0658a18224997a177
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55960
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18110 doc: improve lfs-flushctx manual page 58/55958/3
Oleg Drokin [Wed, 7 Aug 2024 21:44:29 +0000 (17:44 -0400)]
LU-18110 doc: improve lfs-flushctx manual page

There's some pretty strange wording around kerberos/keyring
right now, so let's try to improve it?

Test-Parameters: trivial
Change-Id: Ie905b5b9db54597ad96e46a429fb163f963ff02b
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55958
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18117 obdclass: fix llog_validate_record prototype 64/55964/2
Sebastien Buisson [Thu, 8 Aug 2024 13:52:40 +0000 (15:52 +0200)]
LU-18117 obdclass: fix llog_validate_record prototype

Fix prototype of function llog_validate_record() to make it static
inline, otherwise build fails on some platforms (e.g. ubuntu 2404).

Fixes: 96d8987a36 ("LU-14714 mgc: server to mount without local config")
Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ica8cbb9bffdb2e7abd5284ab0bbd3d026961bae1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55964
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
5 weeks agoNew tag 2.15.65 2.15.65 v2_15_65
Oleg Drokin [Thu, 8 Aug 2024 00:25:17 +0000 (20:25 -0400)]
New tag 2.15.65

Change-Id: Ib7a88c78e3c31481c045c47186da5255b75e7be2
Signed-off-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18110 doc: misspelled hexadecimal in lfs getstripe/getdirstripe 55/55955/3
Oleg Drokin [Wed, 7 Aug 2024 21:36:02 +0000 (17:36 -0400)]
LU-18110 doc: misspelled hexadecimal in lfs getstripe/getdirstripe

Somehow hexadecimal is misspelled very consistently in
lfs getdirstripe and lfs getstripe manual pages as hexademical

Change-Id: Id2b2f96cec70728d06e533c61dea7745d7ccf910
Test-Parameters: trivial
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55955
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
5 weeks agoLU-18110 doc: Fix typos in lustre/doc 50/55950/5
Oleg Drokin [Wed, 7 Aug 2024 05:03:51 +0000 (01:03 -0400)]
LU-18110 doc: Fix typos in lustre/doc

Fixed typos galore, pretty obvious ones went into this commit,
more advanced types will follow separately

Change-Id: Ief6624c6bd297548a04ef65a1312f32b752d7f7a
Test-Parameters: trivial
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55950
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
5 weeks agoLU-18110 doc: llapi_layout_stripe_count_get mistake 49/55949/2
Oleg Drokin [Wed, 7 Aug 2024 04:29:21 +0000 (00:29 -0400)]
LU-18110 doc: llapi_layout_stripe_count_get mistake

The function gets stripe count, not size.

Change-Id: I654b3595d35d09bf16fc82d1f30766eaa3e79d40
Test-Parameters: trivial
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55949
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
5 weeks agoLU-18047 lnet: sanity-lnet test_260 wrong value 10/55910/4
Frank Sehr [Thu, 1 Aug 2024 23:05:20 +0000 (16:05 -0700)]
LU-18047 lnet: sanity-lnet test_260 wrong value

Added retries and delay in case values are not set in time.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: I6caa00e5fd7fb86ae55a593bed897f1dcaee1392
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55910
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
5 weeks agoLU-17679 tests: make stdout unbuffered in sanity/851 04/55904/3
Lei Feng [Thu, 1 Aug 2024 07:34:25 +0000 (15:34 +0800)]
LU-17679 tests: make stdout unbuffered in sanity/851

Make stdout unbuffered in sanity/test_851.
So that the output can be detected ASAP.

Fixes: 7101742b459 ("LU-17490 tests: verify fanotify works for lustre")
Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial
Test-Parameters: testlist=sanity env=ONLY=851,ONLY_REPEAT=1000
Change-Id: I852a73b6bbdcbae7dfe1704183d4cb3c8200be43
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55904
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-17331 tests: fix conf-sanity/30b fake NID generation 90/55890/7
Andreas Dilger [Tue, 30 Jul 2024 19:11:42 +0000 (13:11 -0600)]
LU-17331 tests: fix conf-sanity/30b fake NID generation

It appears that "NID + 20" used by conf-sanity test_30b would
occasionally match the client NID and cause the test to fail.

Ensure the "fake" NID generated for OSS failover is not already
used by the cluster, and it also handles IPv6 NIDs.

Update code style in this subtest to match current standards.

Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Fixes: b91d5d4263 ("b=15253 fix conf-sanity 30b for non-tcp networks")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I119c8123193d2d0947ebbdbac5e5c7fb50d34ca5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55890
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-17131 ldiskfs: Refresh suse15 sp2 and 5.4 series 63/55863/2
Shaun Tancheff [Thu, 25 Jul 2024 12:28:17 +0000 (19:28 +0700)]
LU-17131 ldiskfs: Refresh suse15 sp2 and 5.4 series

Correct the patch attribution sles15sp3/ext4-encdata.patch

Update ext4-filename-encode.patch for trivial context conflict
and correct the patch attribution.

Update the ubuntu 20.04 series to include:
   ext4-ext-merge.patch
   ext4-filename-encode.patch
   ext4-encdata.patch

Refresh linux-5.4/ext4-pdirop.patch and update series:
   ldiskfs-5.4.136-ml.series
   ldiskfs-5.4.21-ml.series

Test-Parameters: trivial
HPE-bug-id: LUS-11967
Fixes: d4aecb71dc ("LU-17131 ldiskfs: Refresh suse15 sp3 series")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Idf4973522c40f8fc287742833e3af3835ebcdad4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55863
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>
5 weeks agoLU-18057 mdt: don't include DOM bit to stripes lock 28/55828/3
Mikhail Pershin [Mon, 22 Jul 2024 08:50:06 +0000 (11:50 +0300)]
LU-18057 mdt: don't include DOM bit to stripes lock

Exclude DOM bit from inodebits mask used to restriping.
That might cause assertions further in inodebits code if
conflicts with GROUP lock. This bit is not needed anyway
but is taken just as part of MDS_INODELOCK_FULL used there

Patch uses mask MDS_RESTRIPE_ELC with excluded DOM bit for
restriping and prohibits further attempts to combine DOM
lock with other ibits mandatory. Note, that is restriction
only for local MDT locks as they are blocking locks.
In all such cases trybits to be used either for DoM bit or
for others

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I2fed05caf60aaa17a0d91ecf7b72df2b4ff95141
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55828
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>
5 weeks agoLU-18054 build: Debian 12 with module-assistant 0.11.11 17/55817/2
Shaun Tancheff [Sat, 20 Jul 2024 04:46:23 +0000 (11:46 +0700)]
LU-18054 build: Debian 12 with module-assistant 0.11.11

Building with module-assistant 0.11.11 fails in module-assistant
prep-deb-files generic.make rule:

   The required compiler '<...gcc-12 make...>' is not installed, \
   won't continue!
   Set RELAX_CC_CHECK variable to skip plausibility checks.

Suppress the auto detection by explicitly setting
CC and RELAX_CC_CHECK when running m-a

HPE-bug-id: LUS-12443
Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Icb2330884b542ba2a1a36b0318a3551c14c8ea09
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55817
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Caleb Carlson <caleb.carlson@hpe.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-16350 ldiskfs: Server support for linux v6.10 29/55729/3
Shaun Tancheff [Tue, 23 Jul 2024 02:09:42 +0000 (09:09 +0700)]
LU-16350 ldiskfs: Server support for linux v6.10

Updated patch series for Linux v6.10:
   ext4-corrupted-inode-block-bitmaps-handling-patches.patch
   ext4-delayed-iput.patch
   ext4-filename-encode.patch
   ext4-max-dir-size.patch
   ext4-mballoc-extra-checks.patch
   ext4-misc.patch
   ext4-prealloc.patch

The same updates applies for Ubuntu 6.10.0 kernel

Test-Parameters: trivial
HPE-bug-id: LUS-11376
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I456ec723f04aaf57cb64965cc9d53fbea23a8c27
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55729
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18034 build: compatibility updates for kernel 6.10 28/55728/3
Shaun Tancheff [Mon, 15 Jul 2024 01:57:04 +0000 (08:57 +0700)]
LU-18034 build: compatibility updates for kernel 6.10

Braces required around trivial conditional statements that devolve
to a single semi-colon (;).

static modifier should be the first modifier used.

Use 'static inline' or 'inline' modifier at the front
of declaration if inline is to be used.

const int func(), const is discarded and should not be used.

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Iff67ff589e3ffde522c3b5bc03b1ec6705c6fc5c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55728
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17057 tests: check OSCs FULL state when setting GSS flvr 28/55628/4
Sebastien Buisson [Tue, 2 Jul 2024 13:12:25 +0000 (15:12 +0200)]
LU-17057 tests: check OSCs FULL state when setting GSS flvr

When setting a GSS flavor, make sure all OSCs are in FULL state, so
that clients refresh their connections with the updated flavor.

Test-Parameters: trivial
Test-Parameters: testgroup=review-dne-selinux-ssk-part-1
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I7c43856e7951f23f2299b25e133fea72400daf94
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55628
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-15737 ofd: don't block destroys 98/55598/5
Alexander Boyko [Sat, 15 Jun 2024 10:04:34 +0000 (06:04 -0400)]
LU-15737 ofd: don't block destroys

ofd_destoy_by_fid could sleep infinite for a GROUP lock
conflict. If all MDT osp_sync_inflight is spend for such destroys,
MDT would not be able to send destroys and setattr. And as a result
OST free space leakage.

This fix makes ldlm_cli_enqueue_local nonblocking for group locks,
and adds MDT repeat part of sync requests with errors.
Also patch adds a debugfs file to check hanged osp jobs.
lctl get_param osp.lustre-OST0000-osc-MDT0000.error_list

Adds recovery-small 160. It reproduces a situation when
MDT sends object destroys and it hangs at OST side,
because of conflicting GROUP lock.

Lustre: ll_ost02_068: service thread pid 51278 was inactive for
204.776 seconds. The thread might be hung...
Call Trace TBD:
ldlm_completion_ast+0x7ac/0x900 [ptlrpc]
ldlm_cli_enqueue_local+0x307/0x880 [ptlrpc]
ofd_destroy_by_fid+0x235/0x4a0 [ofd]
ofd_destroy_hdl+0x263/0xa10 [ofd]
tgt_request_handle+0xcc9/0x1a20 [ptlrpc]
ptlrpc_server_handle_request+0x23f/0xc60 [ptlrpc]
ptlrpc_main+0xc8b/0x15d0 [ptlrpc]

HPE-bug-id: LUS-12350
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I396bf48d3d29f058f65095cbb4dbba11581534cc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55598
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17000 utils: interger overflow fixes 88/55588/6
Shaun Tancheff [Tue, 2 Jul 2024 07:07:46 +0000 (14:07 +0700)]
LU-17000 utils: interger overflow fixes

CoverityID: 426402 ("Logical vs. bitwise operator")
LIBCFS_ALLOC_PRE()
  Add extra parenthesis to clarify && vs & precedence

CoverityID: 429655 ("Overflowed integer argument")
LIBCFS_FREE()
  Use size_t to avoid integer overflow

CoverityID: 429629 ("Overflowed integer argument")
jobid_interpret_string()
  Prevent joblen from becoming negative, truncate if necessary.

CoverityID: 429557 ("Overflowed constant")
ll_stats_pid_write()
   if len is 0 prevent stack corruption via kernbuf

CoverityID: 429646 ("Overflowed integer argument")
llog_pack_buffer()
  ssize_t read(): prevent int overflow if read() returns > INT_MAX

CoverityID: 429630 ("Overflowed integer argument")
readline() in cacheio.c
  ssize_t read(): prevent int overflow if read() returns > INT_MAX

CoverityID: 429624 ("Overflowed integer argument")
osd_read()
  passes loff_t size to osd_ldiskfs_readlink, update
  osd_ldiskfs_readlink to accept size_t length to avoid a
  theoretical overflow

Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ica8a5e1ce58e540016e4bc101763f835eed2c2f7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55588
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17989 tests: Cleanup fake interface usage 65/55465/6
Chris Horn [Mon, 17 Jun 2024 17:58:41 +0000 (11:58 -0600)]
LU-17989 tests: Cleanup fake interface usage

Callers of have_interface() are using it to check that setup_fakeif()
completed successfully. Update setup_fakeif() to perform its own
validation. Both IPv4 and IPv6 addresses should be assigned to the
fake interface, so setup_fakeif() now checks for both of these.

Test cases that use the non-default namespace should call
setup_netns()/cleanup_netns() themselves rather than relying on the
test suite to setup this environment.

Test-Parameters: trivial
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I80451c55b8b7b6919b7d7e94e72265f2e6aa2854
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55465
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-15504 utils: lfs find -ls function 43/55443/11
Maximilian Dilger [Sun, 16 Jun 2024 01:55:46 +0000 (21:55 -0400)]
LU-15504 utils: lfs find -ls function

Added -ls function for lfs find. It is equivalent to using
printf "%i/t%k/t%M/t%n/t%u/t%g/t%s/t%t/t%p/n"

Signed-off-by: Maximilian Dilger <mdilger@whamcloud.com>
Change-Id: If84687915a2f71be81ee8adc5c9402371d635956
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55443
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: Anjus George <georgea@ornl.gov>
5 weeks agoLU-14714 mgc: server to mount without local config 83/55283/8
Mikhail Pershin [Wed, 29 May 2024 18:27:13 +0000 (21:27 +0300)]
LU-14714 mgc: server to mount without local config

Server uses local config copy to mount with but
that is not the case always. Local config can be
damaged or empty and may be not updated from MGS,
e.g. due to -ENOSPC on server upon llog backup or
other errors. That causes empty or partial local
config so server unable to mount with it.

Patch allows a server to mount first from remote config
if local config wasn't copied from MGS. If remote
processing is not possible or failed then local config
is used as last attempt to mount.

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I442a4f20eeb7deb1b40ccc7cabb1fae65804e211
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55283
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17779 lnet: use copy_page() 23/54923/4
Patrick Farrell [Fri, 26 Apr 2024 02:27:26 +0000 (22:27 -0400)]
LU-17779 lnet: use copy_page()

When copying one page to another in kernel memory, the
kernel has an optimized copy_page which can be used instead
of memcpy().

This is relevant in the lnet loopback subsystem, which
copies from the kiov from the client to that on the server.
(Using the same page is nasty for a lot of reasons, so
 copying is best.)

So we can check for the full page to full page copy and
use that.

On my little tiny VM system, this improves maximum write
performance (with the fake write fail_loc enabled) by about
20%, from 4.4 GiB/s to 5.7 GiB/s.

We should also eventually be able to add a fake copy to the
fake read/fake write fail loc, but that's a bit tricky, so
will be left out of this patch.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Iea89447ed03bd4646544883b588873700f6e09a4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54923
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: Chris Horn <chris.horn@hpe.com>
5 weeks agoLU-10499 pcc: add pcc_mode parameter for permission check 22/54422/4
Qian Yingjin [Wed, 1 Sep 2021 13:45:47 +0000 (21:45 +0800)]
LU-10499 pcc: add pcc_mode parameter for permission check

This patch introduced a "llite.*.pcc_mode" parameter for PCC.
By this parameter, administrator can determine what file access
permissions should be allowed to bring files into PCC device for
caching.
This paramter is set with 0 by default.
Add sanity-pcc test_46 to verify it.

In this patch, it also ignores the EEXIST error when found that the
file had already attached into PCC during the manual attach.

EX-bug-id: EX-3741
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I1e006e4f723c1c177ae84c64ad32c6049a57110f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54422
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>
5 weeks agoLU-15837 utils: added lfs find --printf functions 41/55441/20
Maximilian Dilger [Wed, 12 Jun 2024 17:04:31 +0000 (13:04 -0400)]
LU-15837 utils: added lfs find --printf functions

adding functionality for:  %i (inode number)
     %M (symbolic file access mode)
     %g (groupname)
     %u (username)

Test-Parameters: trivial
Signed-off-by: Maximilian Dilger <mdilger@whamcloud.com>
Change-Id: I2a577c1c9869bfcda9aa20f60db65c7dc888204d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55441
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-13814 osc: do not call osc_lru_use for transient 87/52087/22
Patrick Farrell [Fri, 23 Feb 2024 16:22:20 +0000 (11:22 -0500)]
LU-13814 osc: do not call osc_lru_use for transient

Transient pages are never added to the LRU, because they
can't be cached.  osc_lru_use already skips them because
they don't have the flag set, but make it explicit that
this is not called for transient pages.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I2c92ccb52380faefbcba3bfa35508dac2b601bd4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52087
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
5 weeks agoLU-13814 osc: remove "osc_page_transfer_add" wrapper 86/52086/21
Patrick Farrell [Fri, 23 Feb 2024 16:21:49 +0000 (11:21 -0500)]
LU-13814 osc: remove "osc_page_transfer_add" wrapper

osc_page_transfer_add is just a wrapped around osc_lru_use,
let's remove it to be more explicit about what we're
actually doing.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I495a90bee7dc8f8c9d823fa47f9303d2fac2a829
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52086
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
5 weeks agoLU-13814 clio: remove cl_page_prep for transients 85/52085/21
Patrick Farrell [Fri, 23 Feb 2024 16:21:26 +0000 (11:21 -0500)]
LU-13814 clio: remove cl_page_prep for transients

cl_page_prep no longer does anything for transient pages,
finish cleaning that up and make it explicit with asserts.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I3285a69f971530ba0407de128430bb2497900d11
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52085
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
7 weeks agoLU-17151 tests: increase memcg limit on x86_64 68/55568/7
Qian Yingjin [Fri, 28 Jun 2024 02:41:47 +0000 (22:41 -0400)]
LU-17151 tests: increase memcg limit on x86_64

The x86_64 memcg limit of 384MB is quite small, often resulting in
failures on sanity/test_411b in some exterme situations when test
in VM environments.

To avoid the failures, we increase the limit with 1024MiB on both
x86_64 and arm systems.

And we also skip the test if the available OST storage space are
not enough.

Test-Parameters: trivial testlist=sanity env=ONLY=411b,ONLY_REPEAT=100
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I1064a4c2523b8d3e721f9712c17b829a9b1796dc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55568
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>
7 weeks agoLU-18019 tests: Convert hostname to IP list 07/55707/9
Chris Horn [Thu, 11 Jul 2024 18:51:18 +0000 (12:51 -0600)]
LU-18019 tests: Convert hostname to IP list

modify h2name_or_ip to convert the specified hostname into a
comma separated list of NIDs. If FORCE_LARGE_NID is true, and the host
has IPv6 addresses, then only those IPv6 NIDs are listed. If it is
false, and the host has IPv4 addresses, then only those IPv4 NIDs are
listed. Otherwise, we list NIDs based on whichever addresses are
present.

h2name_or_ip() may be called prior to init_test_env, and in this case
FORCE_LARGE_NID will not be initialized. Add FORCE_LARGE_NID to
cfg/local.sh to ensure it is set before h2name_or_ip() is called.

Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I0ef74eef5748d495e6b64f023c07d8eb4a23a5ed
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55707
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-17925 utils: fix 'lfs setstripe -c -1' interop 48/55548/11
Rajeev Mishra [Thu, 27 Jun 2024 03:37:18 +0000 (03:37 +0000)]
LU-17925 utils: fix 'lfs setstripe -c -1' interop

This issue was caused by the -C option was storing -1 as 0xffdf
and -33 was stored as 0xffff, which changed the on-disk file layout
compared to all older versions storing -1 as 0xffff. This resulted
in interop failure of 'lfs setstripe -c/-C' usage.

Instead, store stripe_count as -1 = 0xffff, and -32 = 0xffe0, like
normal unsigned short.  There is no need to distinguish "-c -1"
from "-C -1" in the layout since they both mean the same thing, to
allocate one object per OST.  However, don't allow "-c -2..-32"
since this has no meaning today.  Keep these in reserve in case we
assign some meaning to them in the future.

Restore LLAPI_LAYOUT_WIDE and LOV_ALL_STRIPES definitions, since
these are part of the API and may be used by userspace applications.

Rename LOV_ALL_STRIPES_MIN to LOV_ALL_STRIPES_WIDE since it was
confusing that the "MIN" value created files with the most stripes.

Rename LOV_V1_INSANE_STRIPE_COUNT to LOV_V1_INSANE_STRIPE_INDEX
since it is really the maximum OST index and not a stripe count.

Test-Parameters: testlist=sanity-flr serverversion=2.15 env=SANITY_FLR_EXCEPT="0k 44e 205"
Fixes: 1a6ef725c285 ("LU-16938 utils: setstripe overstripe multiple OST count")
Signed-off-by: Rajeev Mishra <rajeevm@hpe.com>
Change-Id: I3908bd5a70aa35305ef8f278fb0346319055e5b3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55548
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
7 weeks agoLU-17905 kernel: new kernel [SLES15 SP6 6.4.0-150600.23.14.2] 63/55563/14
Jian Yu [Thu, 25 Jul 2024 17:27:34 +0000 (10:27 -0700)]
LU-17905 kernel: new kernel [SLES15 SP6 6.4.0-150600.23.14.2]

This patch makes changes to support new SLES15 SP6 release
with kernel 6.4.0-150600.23.14.2 for Lustre client.

In Lustre test suites, there are some subtests using filefrag
from Lustre-patched e2fsprogs. This patch adds checks in those
subtests to skip them if the Lustre-patched e2fsprogs is not
installed on Lustre client.

Test-Parameters: trivial mdtcount=4 mdscount=2 \
  env=SANITY_EXCEPT="27J 103a 244a" \
  clientdistro=sles15sp6 testlist=sanity

Test-Parameters: optional clientdistro=sles15sp6 testgroup=full-part-1
Test-Parameters: optional clientdistro=sles15sp6 testgroup=full-part-2
Test-Parameters: optional clientdistro=sles15sp6 testgroup=full-part-3

Change-Id: Ib9159d200122595d0a56e3581cfc66d75ddb59f6
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55563
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-15593 tests: fix sanity-flr/44e interop check 45/55845/3
Frederick Dilger [Tue, 23 Jul 2024 18:55:37 +0000 (12:55 -0600)]
LU-15593 tests: fix sanity-flr/44e interop check

sanity-flr.sh test_44e was failing interop testing with 2.15 servers
because the version check was 2.14.52 when the patch didn't land
until v2_15_50-155-ga3f1c4622a. Update the interop check accordingly.

Test-Parameters: trivial testlist=sanity-flr
Test-Parameters: testlist=sanity-flr env=ONLY=44 serverversion=2.15
Fixes: a3f1c4622a ("LU-15593 mdt: Add option to disable use of SOM")
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I432078410003bea260032473729d89c9e174330f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55845
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>
7 weeks agoLU-18056 osp: fix KASAN warning when lu2dt_dev() lwp device 25/55825/2
Timothy Day [Sun, 21 Jul 2024 21:47:29 +0000 (17:47 -0400)]
LU-18056 osp: fix KASAN warning when lu2dt_dev() lwp device

A lwp device isn't really a dt device, so it shouldn't be
marked as such. This causes a KASAN warning when obd_setup()
attempts to access dt device fields using lu2dt_dev():

 BUG: KASAN: slab-out-of-bounds in obd_setup+0x208/0x4b0 [obdclass]

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ib52b0f93c35a7d966314b6375ee963bc59f86abb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55825
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-17685 tests: skip nocompr test for older versions 16/55816/3
Alexandre Ioffe [Fri, 19 Jul 2024 23:43:01 +0000 (16:43 -0700)]
LU-17685 tests: skip nocompr test for older versions

nocompr flag in lfs mirror extend is supported
after MDS version v2_15_61-245-g37e1316050

Fixes: 37e1316050 ("LU-17685 utils: Allow nocompr flag in lfs mirror extend")
Test-Parameters: trivial testlist=sanity-flr env=ONLY="205a 205b"
Test-Parameters: trivial testlist=sanity-flr env=ONLY="205a 205b"
Test-Parameters: trivial testlist=sanity-flr env=ONLY="205a 205b"
Signed-off-by: Alexandre Ioffe <aioffe@ddn.com>
Change-Id: I5c23e549893b9f6dbc016b79d4a6601a8320bf94
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55816
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-18027 lfs: lfs find handling special files 09/55709/15
Caleb Carlson [Tue, 2 Apr 2024 16:29:48 +0000 (10:29 -0600)]
LU-18027 lfs: lfs find handling special files

This replaces fget_projid() with get_projid(),
a newer function that is able to get project ids on
regular files, directories, symbolic links, and
special file types. This adopts the same approach to
getting file attributes that lfs_project.c uses in
project_get_fsxattr() by getting a special file's
attributes by the containing directory.

This patch also replaces the exclusion logic for
the --projid flag, reducing the depth count of if/else
clauses by checking a boolean equivalence statement.

Boolean algebra table for why this works (skip means
we don't print, include means we do):

matches | exclude_projid | matches == exclude_projid |
------------------------------------------------------
   1    |       1        |            1 (skip)       |
   1    |       0        |            0 (include)    |
   0    |       1        |            0 (include)    |
   0    |       0        |            1 (skip)       |

Finally, this patch replaces the INVALID_PROJID = -1
definition with DEFAULT_PROJID = 0. A major reason for
this is that projid is defined as an unsigned, 32-bit
integer, so storing a negative value in it doesn't make
much sense. With this patch we should be able to get
the project id for every file type (special or not),
so we no longer need a case for invalid projid.

.gitignore .vscode/settings.json files.

Add test_56ei in sanity.sh that sets a project id
on some special files and checks that lfs find --printf
picks up the file, and prints the correct project
id.

Updates error messages in test_56rd to not assume
we can't get projid from special file types.

Fix bug where we were only printing file types.

HPE-bug-id: LUS-12195
Signed-off-by: Caleb Carlson <caleb.carlson@hpe.com>
Test-Parameters: testlist=sanity
Change-Id: I8b10044ea62d662d6f9388725c0e93d55a43b431
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55709
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: corey tesdahl <corey.tesdahl@hpe.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Sakib Samar <sakib.samar@hpe.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-18019 tests: Check for large NIDs in load_modules_local 94/55694/6
Chris Horn [Wed, 10 Jul 2024 16:39:52 +0000 (10:39 -0600)]
LU-18019 tests: Check for large NIDs in load_modules_local

Enforce FORCE_LARGE_NID in load_modules_local by calling load_lnet()
with config_on_load=1. This will force large NID configuration (if
large NIDs are assigned to LNet interfaces), but should not alter
the existing behavior when large NIDs are not assigned to LNet
interfaces.

Test-Parameters: trivial
Fixes: c8ca47daac ("LU-16822 tests: Force IPv6 testing in mixed environment")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I66d201c61c59246486f2aa60ab2338bd9e5317b6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55694
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
7 weeks agoLU-13403 utils: mirror-count not required for mirror extend 77/55677/7
Frederick Dilger [Tue, 9 Jul 2024 19:11:20 +0000 (13:11 -0600)]
LU-13403 utils: mirror-count not required for mirror extend

If [--mirror-count|-N] is not specified for 'lfs mirror extend', '-N'
will be added to the option arguments before lfs_setstripe_internal()
is called.

The lustre manual states for 'lfs mirror extend':
    "The mirror_count argument is optional and default to 1 if it is
     not specified."
Which can be interpretend as [--mirror-count|-N] does not need to be
specified rather than the MIRROR_COUNT being optional.

It also makes sense that someone who is using 'lfs mirror extend' in
fact intends to extend the mirror count, so it would make sense to
have a default for mirror-count without it having to be specified.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I01bea6cec71fbf61c617cf27a52d7fb24fd4b06d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55677
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-18005 gss: allow regular users to authenticate on MGS 40/55640/5
Sebastien Buisson [Fri, 5 Jul 2024 14:51:44 +0000 (16:51 +0200)]
LU-18005 gss: allow regular users to authenticate on MGS

It can be useful for regular users to be able to authenticate against
the MGS, for instance to run 'lfs check mgts'.
Just allow this type of authentication request in the code, and take
into account the MGC export when doing 'lfs flushctx', so that any
user key associated with the MGS gets flushed as well.

Add sanity-krb5 test_152 to exercise this capability.

Test-Parameters: trivial
Test-Parameters: testgroup=review-dne-selinux-ssk-part-1
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I4871b4ed61af918644e11d64ef5750a858713323
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55640
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-18002 build: proper MOFED detection with multiple installations 25/55625/4
Aurelien Degremont [Wed, 3 Jul 2024 13:43:36 +0000 (15:43 +0200)]
LU-18002 build: proper MOFED detection with multiple installations

For build step, OFED detection is based on header path detected
from the locally installed packages.

Building with multiple OFED headers installed (for different
kernels by example) is broken since v2_15_63-60-g0e9708016b.

This patch is at least fixing the Ubuntu case, and the EL
case is not changed, what was working is still working, but
the broken case is still broken.

Also simplify the package query a little bit.

Fixes: 0e9708016 ("LU-16819 build: use mofed path based on target kernel")
Signed-off-by: Aurelien Degremont <adegremont@nvidia.com>
Change-Id: Ib15f971ea745d9deded6288e3ed4663bdd385da0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55625
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: ake sandgren <ake.sandgren@hpc2n.umu.se>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-9544 utils: set -P if missing in 'set_param -d' 99/55399/18
Frederick Dilger [Tue, 11 Jun 2024 21:35:35 +0000 (17:35 -0400)]
LU-9544 utils: set -P if missing in 'set_param -d'

The -P option to lctl set_param will now be added if
the -d option (for delete) is specified by itself.

As described in the ticket, if a value is erroneously supplied when
using -P and -d then instead of being deleted, the parameter is
set to the old value with a trailing '='. A non-regression test
has been created to verify that this isn't happening.

wait_update_cond and wait_update were modified to avoid unresolved
errors from throwing an unwanted errnum during the wait. They still
operate with logical equivalence to before.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: If35b2e9db51f7296da25b798205b9f9104830bca
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55399
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>
7 weeks agoLU-10499 pcc: add test for concurrent read from 2 clients 19/54419/10
Qian Yingjin [Tue, 31 Aug 2021 03:45:25 +0000 (11:45 +0800)]
LU-10499 pcc: add test for concurrent read from 2 clients

This patch add a test case with concurrent read access from 2
clients.
The purpose is to verify that the client will not re-attach file
into PCC backend once attached when the file is read access
concurrently from 2 mount points on a client according to the
PCC attach stats.

EX-bug-id: EX-3730
Test-Parameters: trivial
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ibb038bd3a74f43031b6fab4e65565620c416909e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54419
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>