Whamcloud - gitweb
fs/lustre-release.git
3 weeks agoLU-15552 tests: skip bad result in sanity-flr test_0d 23/54623/3
Alexandre Ioffe [Fri, 29 Mar 2024 05:18:55 +0000 (22:18 -0700)]
LU-15552 tests: skip bad result in sanity-flr test_0d

Ignore bad result of sanity-flr test_0d for MDS version older
than v2_14_57-72-gf468093cb6

Test-Parameters: trivial testlist=sanity-flr env=ONLY=0d
Test-Parameters: trivial testlist=sanity-flr env=ONLY=0d clientversion=2.14
Signed-off-by: Alexandre Ioffe <aioffe@ddn.com>
Change-Id: I0df94eea9fd11ca3f74a7df47b77de1de76c4066
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54623
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>
3 weeks agoLU-16500 utils: 'lfs migrate' should select new OSTs 00/54600/4
Andreas Dilger [Thu, 28 Mar 2024 03:18:56 +0000 (21:18 -0600)]
LU-16500 utils: 'lfs migrate' should select new OSTs

When migrating a file using "lfs migrate FILE" without any arguments
to specify a new layout, this should migrate the file to the best
OSTs available at that time based on free space, instead of keeping
the file on the same OSTs (which is almost pointless otherwise).

Reset the starting OST index for all components of the copied file
layout so that this can happen properly.  Previously, only the last
component had the OST index reset, which was only partly helpful.

Add llapi_layout_ost_index_reset() to handle this, since it seems
likely that tools using llapi_layout_from_fd() and friends to copy
an existing layout will want to do the same.  Add the corresponding
man page and reference it from llapi_layout_get_from_fd().

Update sanity test_56xe to check that the starting OST index of each
component is not the same for all components.  This check might not
catch a broken "lfs migrate" every time since even before this patch
the last component would be allocated on a random OST, but will still
fail about once every 1/$OST_COUNT runs.  Conversely, with this patch
it passes hundreds of iterations without a false positive, though a
small chance exists that it will have a false positive on occasion.

Add a "make utils" target to simplify building only user utilities.

Test-Parameters: testlist=sanity env=ONLY=56xe,ONLY_REPEAT=100
Fixes: 0568f4ca25 ("LU-16500 utils: set default ost index for lfs migrate")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie4c68d4b2ff09560a7a13ae464723745cf968d36
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54600
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Stephane Thiell <sthiell@stanford.edu>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17667 tests: Handle more than 1 IP returned by 'ip' cmd 47/54547/2
Arshad Hussain [Sun, 24 Mar 2024 10:27:22 +0000 (06:27 -0400)]
LU-17667 tests: Handle more than 1 IP returned by 'ip' cmd

An interface could have more than one IP address. This may
be not normal and is a corner case. This patch handles case
where 'ip' command returns more than single IP and also adds
new info/debug messages.

Corner Case:
ip -o -4 a s enp0s8 | awk '{print $4}' | sed 's/\/.*//'
192.168.50.188
192.168.1.12

Before patch:
sanity-lnet.sh line 1174: ((: 188 12: syntax error in expression
(error token is "12")

After patch:
...
IP for enp0s8 found [2]
Interface:IP are
enp0s8:192.168.50.188
enp0s8:192.168.1.12
Using GW_NID:192.168.50.189@tcp
...

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I783a6b67508a4497d18db94b5d2bdab616b4ade5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54547
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: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17431 ost: add ioctl handler for oss 05/54505/7
Sebastien Buisson [Wed, 20 Mar 2024 08:24:30 +0000 (09:24 +0100)]
LU-17431 ost: add ioctl handler for oss

Adding ioctl handler for oss allows managing dynamic nodemaps
on OSS side.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I90f4c6988bed2ba721e366ae088983958d484a2f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54505
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>
3 weeks agoLU-17431 mdt: add ioctl handler for mds 04/54504/7
Sebastien Buisson [Wed, 20 Mar 2024 08:20:52 +0000 (09:20 +0100)]
LU-17431 mdt: add ioctl handler for mds

Adding ioctl handler for mds allows managing dynamic nodemaps
on MDS side.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I6a68a17d3f12c799238a93242bbd385e6eeb1d0b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54504
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>
3 weeks agoLU-17431 ptlrpc: move nodemap related ioctls to ptlrpc 02/54502/6
Sebastien Buisson [Tue, 19 Mar 2024 16:04:20 +0000 (17:04 +0100)]
LU-17431 ptlrpc: move nodemap related ioctls to ptlrpc

Move to ptlrpc the functions designed to handle nodemap specific
ioctls, as they should not be accessible to MGS only.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I7a9651ea8484c540d18d6813ab96dc95a0871245
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54502
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>
3 weeks agoLU-17643 gss: make a local copy of the sptlrpc llog 94/54394/8
Sebastien Buisson [Thu, 14 Mar 2024 17:15:29 +0000 (18:15 +0100)]
LU-17643 gss: make a local copy of the sptlrpc llog

Make a local copy on server side of the sptlrpc llog, so that
the targets that do not manage to connect to the MGS know at least
which security flavor to accept from clients.
This needs to pass the super_block to config_log_find_or_add().

Add sanity-sec test_70 to check that sptlrpc llog on MDS and OSS side
is equivalent to the one from the MGS.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I81f0136746e2df7cca1b34c4a17e4b7135a43c29
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54394
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17504 build: fix array-index-out-of-bounds warning 65/54365/9
Jian Yu [Wed, 3 Apr 2024 07:38:47 +0000 (00:38 -0700)]
LU-17504 build: fix array-index-out-of-bounds warning

On Linux kernel 6.5, due to commit 2d47c6956ab3
("ubsan: Tighten UBSAN_BOUNDS on GCC"), flexible
trailing arrays declared like 'lc_array_sum[1];'
will generate warnings when CONFIG_UBSAN & co. is
enabled:

  UBSAN: array-index-out-of-bounds in lprocfs_status.c:1609:17
  index 1 is out of range for type '__s64 [1]'

Since LPROCFS_STATS_FLAG_IRQ_SAFE flag is only used
in one place - obd_memory() counter, we can just
remove it and change obd_memory over to a regular
percpu_counter. This would both simplify the
lprocfs_counter() code, move over to using more
kernel functionality instead of libcfs, as well as
reduce overhead slightly for the memory accounting code.

Change-Id: Ic461c4b30317bfd2b1e9f5b6be84c4a7fb4e3eb9
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54365
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>
3 weeks agoLU-17624 ssk: support FIPS mode on client 14/54314/8
Sebastien Buisson [Wed, 6 Mar 2024 15:33:25 +0000 (15:33 +0000)]
LU-17624 ssk: support FIPS mode on client

In FIPS mode, only certain crypto methods are allowed. This has an
impact on the DHKE mechanism implemented for SSK, as this relies on
a prime number generated for the client key. More specifically, FIPS
mode imposes that only certain safe, well-known primes be used.

OpenSSL prior to v1.1 just imposes a requirement on the prime length.
OpenSSL v1.1 requires the use of a specific primitive when FIPS mode
is on, to fetch a well-known prime based on a prime NID.
OpenSSL v3 is capable of detecting FIPS mode is enforced, and picks up
a well-known prime instead of generating one.

Because of this, primes used for the DHKE are identical on all clients
in FIPS mode. So urge admins to use a short expiration time on SSK
keys, one day instead of one week, so that security contexts are
re-negotiated more often.

The NIST recommended primes are from see Table 26 in Appendix D of:
https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar3.pdf

Test-Parameters: trivial
Test-Parameters: testgroup=review-dne-selinux-ssk-part-1
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Test-Parameters: testgroup=review-dne-selinux-ssk-part-1 clientdistro=el9.2
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2 clientdistro=el9.2
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I52b1926393e51fba6a9e92a837f86a38516ef6ad
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54314
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-17592 build: compatibility updates for kernel 6.8 29/54229/12
Shaun Tancheff [Sun, 24 Mar 2024 08:33:15 +0000 (15:33 +0700)]
LU-17592 build: compatibility updates for kernel 6.8

Linux commit v4.9-12227-g7b737965b331 introduced
  staging/lustre/libcfs: Convert to hotplug state machine
Linux commit v4.10-rc1-5-g4205e4786d0b
  cpu/hotplug: Provide dynamic range for prepare stage
Linux commit v6.7-rc2-1-g15bece7bec0d
  cpu/hotplug: Remove unused CPU hotplug states

CPUHP_LUSTRE_CFS_DEAD was introduced in 4.9 and removed in 6.8
CPUHP_BP_PREPARE_DYN was introduced in 4.10

With no distro kernels between 4.10 and 4.11 switch to
CPUHP_BP_PREPARE_DYN

Linux commit v6.7-rc1-3-gda549bdd15c2
  dentry: switch the lists of children to hlist
Provide trival wrappers to abstract the changed members

Linux commit v6.7-rc4-79-gaf7628d6ec19
  fs: convert error_remove_page to error_remove_folio
Proved a generic_error_remove_folio() for older kernels.

HPE-bug-id: LUS-12181
Fixes: ce98bfe5f72 ("LU-10499 pcc: add readonly mode for PCC")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ib2e85c2acd3d0934e1c4712dad53b80f0ddb1b08
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54229
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17592 build: kernel 6.8 removed strlcpy() 27/54227/13
Shaun Tancheff [Sun, 24 Mar 2024 06:55:08 +0000 (13:55 +0700)]
LU-17592 build: kernel 6.8 removed strlcpy()

Linux commit v6.7-11707-gd26270061ae6
  string: Remove strlcpy()

strlcpy() is removed, use strscpy() and provide a strscpy()
for kernels that do not have one.

HPE-bug-id: LUS-12181
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ieab872f20e08d17a4842bc944fa38f9867de81f9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54227
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: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17518 gss: do not trust supp groups from client with krb 87/53987/12
Sebastien Buisson [Fri, 9 Feb 2024 15:42:40 +0000 (16:42 +0100)]
LU-17518 gss: do not trust supp groups from client with krb

Thanks to Kerberos, Lustre does not have to trust clients anymore,
but relies on keytabs and tickets, cryptographically validated, to
recognize clients and users.
RPC provided supplementary groups should not be trusted, but checked
thanks to identity upcall and the trusted UID from the ticket.

Add sanity-krb5 test_9 to exercise this.

Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I4113ef654492e76fcd377b2c0cc74e484b27850b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53987
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-16724 ptlrpc: refactor page pools patch 3 63/52663/10
Patrick Farrell [Wed, 27 Mar 2024 21:28:11 +0000 (17:28 -0400)]
LU-16724 ptlrpc: refactor page pools patch 3

This is a combined series that refactors the page pools
code to make it more readable.  It used to be many
separate patches but has been combined in to just three,
and this is the third of three.

LU-16724 ptlrpc: remove PAGES_PER_POOL macro

The page pool code *also* likes to refer to each page of
pointers it uses to track items in it as a "POOL", which is
incredibly confusing.

Start unwinding this by removing the PAGES_PER_POOL macro.

LU-16724 ptlrpc: change "pool" to "page_ptrs"

The page pool code *also* likes to refer to each page of
pointers it uses to track items in it as a "POOL", which is
incredibly confusing.

This patch works on renaming that to page_ptrs, but leaves
some steps for a future patch.

Change-Id-Was: I56ee54c7f39b52d7cceffec9e3decf71bd313ddc

LU-16724 ptlrpc: rename max_pools to max_ptr_pages

Continue removal of referring to page pointers as pools
with another rename.

Change-Id-Was: I14796f670a7f06fbec3b40ec23b4dd2e50f22d46

LU-16724 ptlrpc: rename npools to nptr_pages

Continue removal of 'pool' as a name for a page of pointers
to items in a pool.

Change-Id-Was: I97b320027a0a6b5870d246e1527fa3fbe15fccb5

LU-16724 ptlrpc: rename 'pools' to 'ptr_pages'

This finalizes the removal of the overloading of 'pools'
to also mean pointers of pages to items in each page pool.

Change-Id-Was: I0f4aba95f573f4afdc6f5d92f22fd67391fa6dab

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Ie29434f53eeb945b8d35df7c1212ae3f51a2aafa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52663
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: Artem Blagodarenko <ablagodarenko@ddn.com>
3 weeks agoLU-16724 ptlrpc: refactor page pools patch 2 45/52645/10
Patrick Farrell [Wed, 27 Mar 2024 21:24:18 +0000 (17:24 -0400)]
LU-16724 ptlrpc: refactor page pools patch 2

This is a combined series that refactors the page pools
code to make it more readable.  It used to be many
separate patches but has been combined in to just three,
and this is the second.

LU-16724 ptlrpc: stop passing around pool_index

We pass pool_index around from function to function over
and over, but it's easier to just pass the pool around.

This does require the pool to know its own index, but
that seems better anyway.

LU-16724 ptlrpc: convert to void

Convert functions without meaningful return to void.

Change-Id-Was: I81f0baefd5b77b60ba699fa8749eaa83acadd8dd

LU-16724 ptlrpc: refactor pool growing code

This refactors the pool growing code, combining two
separate instances of it in to a single function.

Change-Id-Was: I175abc7e61d55563e989f87207a8c59da852f5f9

LU-16724 ptlrpc: replace ELEMENT_SIZE

The ELEMENT_SIZE macro is fine, but it takes a pool index
and doesn't handle the pool of order 0.  Change it to a
function.  (This is marginally less efficient in one spot,
since it replaces a shift with a divide, but it should be
just fine.)

Change-Id-Was: I322037e50bbdb8e0274b37f82618b6907b6d2906

LU-16724 ptlrpc: simplify pool arrays

Currently, we do a fancy trick where we have a pool of
order 0, then subsequent pools start at
PPOOL_MIN_CHUNK_BITS (which is actually the minimum
compresison size).

So pool index 1 isn't a pool of order 1 (2 pages), it's a
pool of order PPOOL_MIN_CHUNK_BITS.

All this saves us is the cost of the empty pools below
PPOOL_MIN_CHUNK_BITS, but it makes the code notably harder
to read.

With this change, the order of the pool and the pool index
are the same.  This simplification will be embraced more
in subsequent patches.

Change-Id-Was: I650e05d25727f10b0ca2d556cba17e9c4fccc309

LU-16724 ptlrpc: begin renaming pool_index to order

Replace local variables for pool_index with pool_order.

Other renames will be in a subsequent patch, to keep these
as simple as possible.

Change-Id-Was: If347ff39776f9a75c0f7d9d9981d01e19bc2cbc9

LU-16724 ptlrpc: rename ppp_index to ppp_order

Rename ppp_index to ppp_order.

Other renames will be in a subsequent patch, to keep these
as simple as possible.

Change-Id-Was: I96559e27a67b7cc4e56e06378e5686370438850c

LU-16724 ptlrpc: rename INDEX macros

Rename INDEX macros to ORDER.

Change-Id-Was: Ic1123d25bc855dc7671c9cb587a0d6680662b729

LU-16724 ptlrpc: remove PAGES_POOL macro

PAGES_POOL is just the order 0 pool now, so remove the
special naming, and adjust a few associated functions.

Change-Id-Was: I09e1debeadecbce33c7be43a8859815084623358

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I42dc8b8094212c69b7a29cc3766bd0a10860f7af
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52645
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: Artem Blagodarenko <ablagodarenko@ddn.com>
3 weeks agoLU-17700 lnet: properly calculate ping buffer size 73/54673/5
James Simmons [Fri, 5 Apr 2024 00:01:32 +0000 (20:01 -0400)]
LU-17700 lnet: properly calculate ping buffer size

Originally for lnet_ping() we allocated the ping buffer size by
using lnet_ping_sts_size(). The limitation to that approach is
that if the nid passed into lnet_ping_sts_size() is a smaller
NID like IPv4 the buffer could be too small. Say n_ids is 4
and 3 returned NIDs are IPv4 but one is IPv6 then it can overflow.
The solution is allocate maximum possible NID size. That can be
done with LNET_ANY_NID which fills in all the fields. For
lnet_ping_sts_size() we have to properly handle the size when
using LNET_ANY_NID. If struct lnet_nid ever increasing in the
future this code should still work.

Also cap the maximum size of the ping buffer to avoid o2iblnd
failures from using RDMA which sends data that doesn't support
large NIDs.

Fixes: d137e9823ca ("LU-10003 lnet: use Netlink to support LNet ping commands")
Test-Parameters: trivial testlist=sanity-lnet
Change-Id: I5b61add2b3701cad12074515f45773bbc9fbc583
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54673
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Stephane Thiell <sthiell@stanford.edu>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17696 llite: remove LASSERT from ll_ddelete() 76/54676/2
Jian Yu [Thu, 4 Apr 2024 21:30:19 +0000 (14:30 -0700)]
LU-17696 llite: remove LASSERT from ll_ddelete()

On Linux kernel 6.8, the changes in commit 2f42f1eb9093
("Call retain_dentry() with refcount 0") made d_delete()
instances called for dentries with ->d_lock held and
refcount equal to 0, which caused the following assertion
failure on Lustre client:

(dcache.c:136:ll_ddelete()) ASSERTION( d_count(de) == 1 ) failed

The value of d_count(de) became 0 instead of 1. Since
retain_dentry() was called either with refcount 0 or 1,
we can simply remove the LASSERT(ll_d_count(de) == 1)
from ll_ddelete() to avoid the above failure.

Change-Id: Ic4a39d9328326634190cd0719b4c0637e1bf315c
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54676
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: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-16915 tests: except sanity-sec test_51 51/54751/15
Andreas Dilger [Fri, 12 Apr 2024 01:18:28 +0000 (19:18 -0600)]
LU-16915 tests: except sanity-sec test_51

Skip sanity-sec test_51 since it has started failing recently with
the move to el9.3 servers.

Add common lustre_os_release infrastructure to make such checking
easier in the future.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-sec env=ONLY=51,HONOR_EXCEPT=y serverdistro=el9.3
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Id02223752df4eb3fd3b62b339e8c417eb3e86a12
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54751
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17721 tests: improve sanity-flr/210b 19/54719/3
Alex Zhuravlev [Wed, 10 Apr 2024 11:21:35 +0000 (14:21 +0300)]
LU-17721 tests: improve sanity-flr/210b

do not use total space counters - it's proven to be an unreliable
approach. instead check whether specific object is really removed
(using debugfs).

Test-Parameters: trivial env=ONLY=210b,ONLY_REPEAT=20 testlist=sanity-flr
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I8d7af4ef5404115ce94040960b3cae9c05c9832f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54719
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17675 tests: disable sanity-flr/61a on RHEL9.3 31/54731/2
Alex Zhuravlev [Thu, 11 Apr 2024 07:49:12 +0000 (10:49 +0300)]
LU-17675 tests: disable sanity-flr/61a on RHEL9.3

still failing a lot:
Error: 'f61a.sanity-flr: atime: old '1712732591' != new '1712732585''
Failure Rate: 32.61% of most recent 92 runs, 8 skipped (all branches)

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Id1b97d884f83b743a9ca6e72d21237689b5d19be
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54731
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17269 tests: exclude conf-sanity/41c 44/54744/4
Andreas Dilger [Thu, 11 Apr 2024 18:04:14 +0000 (12:04 -0600)]
LU-17269 tests: exclude conf-sanity/41c

It appears that conf-sanity test_41c has started crashing recently,
likely due to running test sessions with multiple MDTs by default.
Exclude this subtest until it is fixed.

Test-Parameters: trivial testlist=conf-sanity env=ONLY=41c,HONOR_EXCEPT=y
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I3d88459d6c51d37fd3c489541077541d97384910
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54744
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoNew tag 2.15.62 2.15.62 v2_15_62
Oleg Drokin [Mon, 8 Apr 2024 15:44:43 +0000 (11:44 -0400)]
New tag 2.15.62

Change-Id: I10e862a3b3f0bb23288c382d2341a09071157936
Signed-off-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17690 quota: uninitialized var in qmt_lgd_extend_cb() 10/54610/2
Alex Zhuravlev [Thu, 28 Mar 2024 17:32:46 +0000 (20:32 +0300)]
LU-17690 quota: uninitialized var in qmt_lgd_extend_cb()

fix false warning

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I30e530119edd34c2a73487af4cbcc7ee9da46725
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54610
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17683 lnet: ksocknal_startup() leaks iface table 90/54590/6
Alex Zhuravlev [Wed, 27 Mar 2024 17:19:03 +0000 (20:19 +0300)]
LU-17683 lnet: ksocknal_startup() leaks iface table

which is allocated in lnet_inet_enumerate()

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib25402bb82a33c5f4838fc5bd9e9a22c806df89a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54590
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 weeks agoLU-17673 obdclass: properly free opts string 50/54650/2
James Simmons [Tue, 2 Apr 2024 22:24:59 +0000 (18:24 -0400)]
LU-17673 obdclass: properly free opts string

With lmd_parse() rework being based on the llite match_table work
it inherited the same memory leak. Save the opts pointer to be
used bu kfree at the end.

Fixes: 415fa27540 ("LU-9325 obdclass: use match_table for server mount options")
Test-Parameters: trivial
Change-Id: I016f39f1512118486a0dc119ab075a1408b2a709
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54650
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17685 utils: Allow nocompr flag in lfs mirror extend 40/54640/4
Alexandre Ioffe [Sat, 30 Mar 2024 20:55:24 +0000 (13:55 -0700)]
LU-17685 utils: Allow nocompr flag in lfs mirror extend

Extend the set of allowed optional flags in
'lfs mirror extend' command by LCME_FL_NOCOMPR. Allowed syntax:
--flags=prefer
--flags=nocompr
--flags=prefer,nocompr

Test-Parameters: trivial testlist=sanity-flr
Signed-off-by: Alexandre Ioffe <aioffe@ddn.com>
Change-Id: Id1538182eca0142464c19c0c4b1406592e615be1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54640
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-930 ofd: improve orphan cleaning message 39/54639/4
Aurelien Degremont [Sat, 30 Mar 2024 20:32:02 +0000 (21:32 +0100)]
LU-930 ofd: improve orphan cleaning message

Reword the orphan cleaning message, happening
at each MDT connection after OST start to make it less
scary and implies a bit more this is just normal thing
going on.

Test-Parameters: trivial

Change-Id: I7b4d726b1e96fe8d39872df5ed85453c99ccdc6a
Signed-off-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54639
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-8191 selftest: restore BUILD_BUGs 35/54635/4
Timothy Day [Fri, 29 Mar 2024 20:03:30 +0000 (20:03 +0000)]
LU-8191 selftest: restore BUILD_BUGs

It was wrong to remove lnet_selftest_structure_assertion()
since it contained BUILD_BUGs used to ensure different LNet
Selftest versions can interoperate.

Restore the BUILD_BUGs and add a dummy user in LNet Selftest
init. This should prevent analyzers from picking this up as
an unused function.

Fixes: 43cbc93 ("LU-8191 lnet: remove unused, fix non-static functions")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I5e498dc411048f0ae3ca69cc5d24a728a711d6f7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54635
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-17678 quota: fix memleak in qmt_setup_lqe_gd() 75/54575/3
Alex Zhuravlev [Tue, 26 Mar 2024 14:41:18 +0000 (17:41 +0300)]
LU-17678 quota: fix memleak in qmt_setup_lqe_gd()

a race in qmt_setup_lqe_gd() can lead to leaked lqe_glbl_data.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I807aa276fa373cec493cae9d8182b28d996f5a8b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54575
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 weeks agoLU-17673 llite: ll_options() to release the string 54/54554/4
Alex Zhuravlev [Mon, 25 Mar 2024 07:39:51 +0000 (10:39 +0300)]
LU-17673 llite: ll_options() to release the string

the final strsep() sets opts to NULL so kfree() becomes no-op.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I18a0d3556fa2932c217d9e705af9e5b5720a364b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54554
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 weeks agoLU-17261 lov: unlink can handle bogus striping 44/54544/12
Alex Zhuravlev [Sat, 23 Mar 2024 17:13:32 +0000 (20:13 +0300)]
LU-17261 lov: unlink can handle bogus striping

Allow removing a file which has uninitialized OST objects in the
layout, possibly because LFSCK reconnected an orphan object back
into a mirrored file after the mirror had been deleted.

Don't wait and retry to access the bogus OST or MDT index in this
case, because the target will never appear, so waiting is futile.

Test-Parameters: testlist=sanity-flr,sanity-flr,sanity-flr,sanity-flr
Fixes: 94a4663db9 ("LU-17334 lmv: handle object created on newly added MDT")
Fixes: f35f897ec8 ("LU-17334 lov: handle object created on newly added OST")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I90b97c0e2d560d71b2a4c32a47fcfd7ae4e5535d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54544
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 weeks agoLU-17665 lnet: lock primary NID only on lustre-built peer 39/54539/2
Serguei Smirnov [Fri, 22 Mar 2024 22:31:55 +0000 (15:31 -0700)]
LU-17665 lnet: lock primary NID only on lustre-built peer

Primary NID locking is useful when client is connecting to a server
and peer representation of the server is provided to LNet by Lustre
via LNetAddPeer API - as interpreted from the mount command string
or llog.

When the server responds to a client, there's no need to lock
the client's primary NID.

Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Ifd3098b93ad2e490659eb4adbf676cba4cbdc424
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54539
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17379 mgc: try MGS nodes faster 22/54022/9
Mikhail Pershin [Mon, 22 Jan 2024 12:58:23 +0000 (15:58 +0300)]
LU-17379 mgc: try MGS nodes faster

Re-organize import_select_connection to try all NIDs
faster at least at first round.

- check NID LNET discovery status and skip those not
  discovered yet on first round, at next round just
  select the least recently used one
- reset AT timeout to minimal values at first round
- track per-connection total attempts to connect,
  how many were replied, discovery status and output
  this in import stats

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Ib4d043e82bf156cc3e7c9ddeff0055790edcc9ee
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54022
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 weeks agoLU-16724 ptlrpc: refactor page pools patch 1 34/52634/10
Patrick Farrell [Wed, 27 Mar 2024 21:19:07 +0000 (17:19 -0400)]
LU-16724 ptlrpc: refactor page pools patch 1

This is a combined series that refactors the page pools
code to make it more readable.  It used to be many
separate patches but has been combined in to just three,
and this is the first.

LU-16724 ptlrpc: rename 'pool' to 'pool_idx'

'pool' here is the index of the pool, not the pool itself.
Let's give it a name that makes clear it's a number and not
the actual pool.

Also remove an error condition which is asserted on
immediately before.

LU-16724 ptlrpc: rename 'size_bits' to 'order'

The kernel uses 'order' to refer to page allocations of a
certain 'order', meaning 2^order pages.

That's what our 'size bits' is - an allocation of a certain
'order'.

Change-Id-Was: I38b184239814a0f692b644566075c798ed16f816

LU-16724 ptlrpc: rename get_buf to get_pages

The sptlrpc_enc_pool_get_buf function actually gets a fixed
number of pages, which is sort of a buffer, but is better
understood as a set of pages.

Rename the function for getting pages for a ptlrpc desc so
we can give get_buf a more appropriate name.

Change-Id-Was: I9c03b9d638e7df7f09bf5724c5a6896b7d1e7b6c

LU-16724 ptlrpc: improve usage of PAGES_POOL

PAGES_POOL isn't always used when it should be, let's
improve that a bit (and start renaming a function).

Change-Id-Was: Ifed59db63d15d61d15712e6df6b8dbae56f2f5b7

LU-16724 ptlrpc: start removing 'enc' from pool

Pools are no longer encryption page pools, start renaming
them accordingly.  (The 'epp' naming in the struct has been
left for the next patch.)

Change-Id-Was: Iba3c98641e24173d95bf8bcf0df2424bbabf3ef9

LU-16724 ptlrpc: rename 'epp' to 'ppp'

Finish removing 'encryption' from page pool names except
for the module parameter, which is exposed in configuration
and so can't be changed.

Change-Id-Was: I1c14f6cf8cf1a19d89b5a7787aac1b67203866d3

LU-16724 ptlrpc: remove more uses of 'enc'

Remove a few more uses of 'enc' and note some we aren't
changing.

Change-Id-Was: Iaaf6c23ea295b22ded2e8942227ebd5ce4d34e13

LU-16724 ptlrpc: improve use of 'count'

This is a first trivial step towards fixing usage of
'count' in the page pools code.  (And a whitespace fix.)

Change-Id-Was: Ic4f74db74b8cec63572d5fd5b129f861ab0cba7c

LU-16724 ptlrpc: simplify pools_should_grow

This patch is a prelude to replacing "pools_should_grow()"
with a "grow_pool" function.  (The odd plural will be
removed shortly.)

Change-Id-Was: I0accbce2c36fa97684fbee364057b8ff2f9ae12d

LU-16724 ptlrpc: correct use of plural 'pools'

There are a bunch of spots which refer to a single pool by
pool index, but which say 'pools'.  This is very confusing,
and in fact led to me misunderstanding the code at least
once.

Clean that up.

Change-Id-Was: I9eabcfe77a57a82c87b36e3b3e040be91671fbfb

LU-16724 ptlrpc: reduce usage of pool_index

The pool index is used over and over a lot of places where
we should just use it once.

Note the printing functions are deliberately not combined
to maximum length lines for ease of reading.

Change-Id-Was: I7efbf491cf28f6fd16d06f5bbc42d714c908f34c

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I636a4756a033d0b96a4772b8912f61c4b31b9c64
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52634
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: Artem Blagodarenko <ablagodarenko@ddn.com>
4 weeks agoLU-16694 tests: rewrite socket client, server in python 78/52478/2
Timothy Day [Fri, 22 Sep 2023 03:29:41 +0000 (03:29 +0000)]
LU-16694 tests: rewrite socket client, server in python

Rewrite socketclient and socketserver in python,
rather than perl. This should bring us closer
to dropping perl requirements from Lustre packages.

Test-Parameters: trivial testlist=sanity env=ONLY=54a,ONLY_REPEAT=100
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I1c03e13993af147ce7d487b8d66320f4f99eb676
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52478
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-15981 tests: add missing close in cascading_rw 23/47823/3
Vladimir Saveliev [Mon, 1 Apr 2024 12:00:18 +0000 (15:00 +0300)]
LU-15981 tests: add missing close in cascading_rw

ONLY=cascading_rw OSTSIZE=200000 SLOW=yes sh parallel-scale.sh used to
fail due to lack of space.

cascading_rw missed a close before unlink, so disk space got consumed
by open unlinked files.

Add the missing close().

Change-Id: I9a8b3bfb9ff00e604ae0439433599b5050191b8e
HPE-bug-id: LUS-10753
Test-Parameters: testlist=trivial testlist=parallel-scale envdefinitions=ONLY=cascading_rw
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47823
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17680 ldlm: fix ldlm_res_hop_hash() argument 85/54585/5
Andreas Dilger [Wed, 27 Mar 2024 23:08:04 +0000 (17:08 -0600)]
LU-17680 ldlm: fix ldlm_res_hop_hash() argument

Change ldlm_res_hop_hash() to use "bits" instead of "mask" as the
last argument.  Otherwise, this is hashing all of the LDLM resources
down to very few buckets (e.g. "hash & 8" or "hash & 11") instead of
the full bit range (e.g. "hash & ((1 << 8) - 1)".

This is causing significant slowdowns for file creation performance,
in particular sanity test_123ac was running 2x slower when creating
a large number of files because of the bad hashing.

Fixes: ce404bd07c ("LU-17174 misc: fix hash functions")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I823b370bdb7fac4e673d1b479204dd1216931fb6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54585
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
4 weeks agoLU-17675 tests: sanity-flr/61a set atime_diff=1 for statx 47/54647/4
Andreas Dilger [Mon, 1 Apr 2024 22:56:49 +0000 (16:56 -0600)]
LU-17675 tests: sanity-flr/61a set atime_diff=1 for statx

Lower mdd.*.atime_diff=1 for this test so that the MDT inode atime
is updated during the test.  Otherwise, statx() will get only MDT
atime and not OST atime, and the test is not running long enough
for the MDT inode atime to be updated.

Test-Parameters: trivial testlist=sanity env=ONLY=61a,ONLY_REPEAT=100 clientdistro=el9.3
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I6518260d0dcb283faf4bc6a8049cd61abaf6978b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54647
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17674 build: use nop_mnt_idmap in inode_owner_or_capable 72/54572/6
Qian Yingjin [Tue, 26 Mar 2024 08:37:16 +0000 (04:37 -0400)]
LU-17674 build: use nop_mnt_idmap in inode_owner_or_capable

The build on kernel 6.7 reported the following errors:

     if (!inode_owner_or_capable(&init_user_ns, inode))
                                 ^~~~~~~~~~~~~
     note: expected 'struct mnt_idmap *' but argument is of
     type 'struct user_namespace *'

It replaces &init_user_ns with "nop_mnt_idmap" to fix the build
failure on new kernel.

Test-Parameters: trivial
Fixes: ce98bfe5f72 ("LU-10499 pcc: add readonly mode for PCC")
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I758ef5a074bb6449b2d703865010974d5135f241
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54572
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 weeks agoLU-6142 llite: Fix style issues under lustre/llite 38/54138/5
Arshad Hussain [Thu, 22 Feb 2024 09:23:39 +0000 (14:53 +0530)]
LU-6142 llite: Fix style issues under lustre/llite

This patch fixes issues reported by checkpatch
for all files under folder lustre/llite

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I5906f10d4704d844103b3a75f1ed1f4bb0effcd4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54138
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-12452 o2iblnd: allow setting IP ToS value (RoCE) 79/54079/5
Etienne AUJAMES [Sat, 23 Mar 2024 19:41:38 +0000 (15:41 -0400)]
LU-12452 o2iblnd: allow setting IP ToS value (RoCE)

This patch add a new tuning to set the IP "Type of Service" value for
RoCE QoS.

It adds the module parameter "tos":
...
options ko2iblnd tos=106

tos=-1 means "disable": the LND will not try to set the ToS value.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I453d2eb690ea7d1997c6151669e12085e75b629b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54079
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-10391 lnet: update Netlink commands functionality 03/53003/15
James Simmons [Sat, 23 Mar 2024 14:40:46 +0000 (08:40 -0600)]
LU-10391 lnet: update Netlink commands functionality

Update jt_import() for the lnetctl import command to support
all the new Netlink API.

Fix a sending message bug that was due to  multiple calls
to genl_ctrl_resolve_grp() and genl_ctrl_resolve(). We
were using the special netlink socket for these calls.
That special socket has its own callbacks which don't
work with the libnl functions we are calling. Fix this
by creating an internal generic netlink socket for use
with the libnl functions.

Test-Parameters: trivial testlist=sanity-lnet
Change-Id: I1d360cc0375bc56a05ca47d58d8319a0ded0ccf9
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53003
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-13814 clio: remove cp_state usage for DIO pages 74/52074/22
Patrick Farrell [Fri, 23 Feb 2024 16:01:36 +0000 (11:01 -0500)]
LU-13814 clio: remove cp_state usage for DIO pages

DIO pages don't really go through the state transitions of
cached pages, so don't do it for them.  This is a step
towards removing cl_pages for DIO/transient pages.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I5b4cd52ec19c97d0a5b815fcd68958a108a3444a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52074
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 weeks agoLU-16692 tests: remove force_new_seq from some test suites 33/54433/3
Li Dongyang [Fri, 15 Mar 2024 11:39:30 +0000 (22:39 +1100)]
LU-16692 tests: remove force_new_seq from some test suites

force_new_seq was used in some tests to avoid the
situation where the sequence from replay request
could be different than the one osp is at, due to
previous sequence width has been used up.

Now it can be handled so remvoe the force_new_seq
to speed up test runs.
Some force_new_seq are still required to make sure
there are enough objects in the current precreate pool
for the overstriping test cases.

Change-Id: Id1bc6760e721db61c11b1c3d6b2fa82965459728
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54433
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-16692 osp: do not assert on seq got over network 20/54020/15
Li Dongyang [Tue, 13 Feb 2024 04:10:53 +0000 (15:10 +1100)]
LU-16692 osp: do not assert on seq got over network

Replay requests have FIDs already assigned and the
sequence could be different to the osp:
seq rollover happened after the original request,
then something triggers replay, or osp lost the
seq rollover record on storage.

Detect this and avoid the assert in osp_fid_diff(),
we don't update the last id on osp in this case,
otherwise orhpan cleanup could cleanup the objects
in the current osp's sequence.

Also when rollover seq happens in osp, do not
LASSERT() if we didn't get a new seq, most likely
on ofd/ost the previous seq update was lost on storage.
We could return the error code and let precreate
thread try again.

Cleanup lu_fid_diff() which is not used.
In osp_create(), do not call osp_update_last_fid()
again for the regular non-replay case, it's already
done via osp_object_assign_fid()->osp_precreate_get_fid().

Change-Id: I509c00b998933d45865c9540e12a2db7d1b2b8ed
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54020
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17053 libcfs: make a debugfs equivalent for markers 63/54363/7
James Simmons [Mon, 18 Mar 2024 14:53:53 +0000 (08:53 -0600)]
LU-17053 libcfs: make a debugfs equivalent for markers

Most of the ioctl handlding that was LNet related has been moved
from libcfs to LNet. One left over are markers which allow
injection of strings into the lustre debug buffer located in
libcfs_ioctl(). This is the only functionality which exist in
libcfs yet it is only available in lnet module. We can create
an debugfs equivalent that also allows injection of strings
into the Lustre debug buffers with scripts.

Change-Id: I22395b6b19f94de3c95ba8517a14d2ea251fe37a
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54363
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>
5 weeks agoLU-17409 scripts: correct ldev MGS handling 19/53619/3
Olaf P. Faaland [Tue, 9 Jan 2024 05:36:50 +0000 (21:36 -0800)]
LU-17409 scripts: correct ldev MGS handling

ldev was incorrectly parsing the line specifying the hosts that can
run the MGS, when of the form

    gopher1  gopher2  MGS  gopher1/mgs

as it assumed every target specified included a filesystem name,
like 'lustre3-MDT0000'.

This corrects that, assuming that an MGS may not be related to a
specific file system.

When such an input line is found, assume that MGS is used by any file
systems included in the ldev.conf.  When user includes option '-F
<fsname>' as well as '-R MGS', include that MGS, in the targets
reported.

Test-Parameters: trivial
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Change-Id: Ifab5db1dfb094755e29747ec6b90d1566b16c18c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53619
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cameron Harr <charr@llnl.gov>
Reviewed-by: Eric Carbonneau <carbonneau1@llnl.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17666: configure lnet before add net in sanity-sec:31 43/54543/3
Li Xi [Fri, 22 Mar 2024 12:30:57 +0000 (20:30 +0800)]
LU-17666: configure lnet before add net in sanity-sec:31

If "options lnet config_on_load=1" is not configured in
modprobe.d, the lnet will not be configured when trying to
add a network. The command will hit problem.

/usr/sbin/lnetctl net add --if eth1 --net tcp999
add:
    - net:
          errno: -22
          descr: "cannot add network: Invalid argument"

Test-Parameters: trivial testlist=sanity-sec env=ONLY=31

Change-Id: If65b7cb372d4f04a10ea066d62f3ae43029fcf65
Signed-off-by: Li Xi <lixi@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54543
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17000 utils: Pass statx parameter as reference 43/54443/5
Arshad Hussain [Mon, 18 Mar 2024 08:56:12 +0000 (14:26 +0530)]
LU-17000 utils: Pass statx parameter as reference

In printf_format_file_attributes() parameter 'struct statx'
was passed as value. Since copying large value is inefficient.
This function changes passing 'struct statx' to be passed as
reference.

Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=65
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=65
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=65
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=65
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=65
Fixes: f0ab3ac6d6 ("LU-16760 utils: support 'lfs find --attrs' and '-printf %La'")
CoverityID: 399698 ("Big parameter passed by value")
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ic20feff84d7043000ebaa1eaec98d54c73fc1a7e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54443
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17640 test: wait osts up after restart 80/54380/2
Hongchao Zhang [Sat, 9 Mar 2024 14:35:41 +0000 (22:35 +0800)]
LU-17640 test: wait osts up after restart

In test_18e of sanity-lfsck, the OSTs could not be ready on all MDTs
and the LFSCK status will be incorrect because the LFSCK notify can
not be sent to all OSTs.

Change-Id: If1ed5d920d5c8b99d42f59f92a1e245a9e2a8267
Test-Parameters: trivial testlist=sanity-lfsck,sanity-lfsck,sanity-lfsck,sanity-lfsck,sanity-lfsck
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54380
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17634 hsm: serialize HSM restore for a file on a client 66/54366/6
Qian Yingjin [Wed, 13 Mar 2024 01:33:19 +0000 (21:33 -0400)]
LU-17634 hsm: serialize HSM restore for a file on a client

For a file in HSM released, exists, archived status, start tens of
processes to read it in parallel on a client, and one read process
may report "No data available" error.

After analyzed the error, we found the following bug in HSM code:
Reading a released file already granted LAYOUT lock on a client:
P1:
->vvp_io_init()
->lov_io_init_released(): io->ci_restore_needed = 1;
->vvp_io_fini()
  ->ll_layout_restore()
    ->mdc_ioc_hsm_request()
      ->mdc_hsm_request_lock_to_cancel()
        ->ldlm_cancel_resource_local()
          remove LAYOUT lock from resource into cancel list
          NOT yet cancel the LAYOUT lock on the client via ELC...

P2:
->vvp_io_init()
->lov_io_init_released(): io->ci_restore_needed = 1;
->vvp_io_fini()
  ->ll_layout_restore()
    ->mdc_ioc_hsm_request()
      ->mdc_hsm_request_lock_to_cancel()
      SKIP: No any conflict LAYOUT lock on resource lock list as P1
      has already move it (if any) into its cancel list
    ->mdt_hsm_request()
      ->cdt_restore_handle_add()
        ->cdt_restore_handle_find()
        ->list_add_tail(): add @crh to restore handle list
        NOT yet obtain EX LAYOUT lock to cancel cached LAYOUT
        locks on client side...

P3:
->ll_file_read_iter()
->ll_do_fast_read(): => return -ENODATA;
->vvp_io_init()
->lov_io_init_released(): io->ci_restore_needed = 1;
->vvp_io_fini()
  ->ll_layout_restore()
    ->mdc_ioc_hsm_request()
      ->mdc_hsm_request_lock_to_cancel()
      SKIP as P1 has already move the conflict LAYOUT lock
      (if any) into its cancel list
    ->mdt_hsm_request()
      ->cdt_restore_handle_add()
        ->cdt_restore_handle_find()
        SKIP as found a restore handle with same FID in the
        the restore handle list added by P2.
  ->ll_layout_refresh()
  ->io->ci_need_restart = vio->vui_layout_gen != gen;
  ->LAYOUT gen does not have any change as the LAYOUT lock on
    the client is not revoken yet, will not restart I/O...
->return -ENODATA; =>from fast read

We can fix this bug by serializing the HSM restore operation on a
client by using the @lli->lli_layout_mutex simply.

Add sanity-hsm/test_12{t, u} to verfiy it.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Idc2a8c1818386c64798d7e28500c20c80ff369f1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54366
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17056 tests: force osc import reconnect in sanity-sec 30b 49/54349/9
Sebastien Buisson [Mon, 28 Aug 2023 08:09:53 +0000 (10:09 +0200)]
LU-17056 tests: force osc import reconnect in sanity-sec 30b

In sanity-sec test_30b, force reconnect of idle osc imports
so that security flavor is correctly updated.
In case of failure, dump more information about state of the imports
and the srpc connections.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-sec env=ONLY=30b,ONLY_REPEAT=50,SHARED_KEY=true mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2
Test-Parameters: testlist=sanity-sec env=ONLY=30b,ONLY_REPEAT=50,SHARED_KEY=true mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2
Test-Parameters: testlist=sanity-sec env=ONLY=30b,ONLY_REPEAT=50,SHARED_KEY=true mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2
Test-Parameters: testlist=sanity-sec env=ONLY=30b,ONLY_REPEAT=50,SHARED_KEY=true mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2
Test-Parameters: testlist=sanity-sec env=ONLY=30b,ONLY_REPEAT=50,SHARED_KEY=true mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2
Test-Parameters: testlist=sanity-sec env=ONLY=30b,ONLY_REPEAT=50,SHARED_KEY=true mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Iaecc7321b12e61a266e97d3640a3288f0e7ec9dd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54349
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>
5 weeks agoLU-17448 lod: don't skip uninited components 02/54302/3
Alex Zhuravlev [Wed, 6 Mar 2024 18:00:51 +0000 (21:00 +0300)]
LU-17448 lod: don't skip uninited components

don't skip uninitialized component during declaration as we need
to declare potential records to llogs if the component is created
in this transaction later.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia1cbfaae9b28e40fd68fa125d748ec0b5319f512
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54302
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-17599 ldiskfs: restore ldiskfs patch attribution 47/54247/4
Shaun Tancheff [Fri, 8 Mar 2024 11:18:11 +0000 (18:18 +0700)]
LU-17599 ldiskfs: restore ldiskfs patch attribution

Over time various ports of ldiskfs patches to newer kernel
releases and distribution kernels have lost or confused the
original history and author of many patches.  It is also
helpful to have a summary for the reason behind each patch.

Thanks-to: Andreas Dilger <adilger@whamcloud.com>
for digging through the history of these patches.

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ibf9dd8c9583816251836bd396acd4543116ccc1e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54247
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-17606 build: remove el8.[0-3] kernel patch series 25/54325/2
Andreas Dilger [Fri, 8 Mar 2024 02:22:00 +0000 (19:22 -0700)]
LU-17606 build: remove el8.[0-3] kernel patch series

Remove el8.[0123] kernel patch series.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie6f12d868fd92299fecfa9277947b7d8883ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54325
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17606 build: remove el7.[678] kernel patch series 24/54324/4
Andreas Dilger [Fri, 8 Mar 2024 02:06:36 +0000 (19:06 -0700)]
LU-17606 build: remove el7.[678] kernel patch series

Remove the kernel patches for el7.[678] along with another
obsolete configure check in the ldiskfs tree.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie5ea5dd96fb7a9e7315e9a80117dad5de63ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54324
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17557 osd: only accounting inodes are special 91/54091/8
Alex Zhuravlev [Mon, 19 Feb 2024 08:18:45 +0000 (11:18 +0300)]
LU-17557 osd: only accounting inodes are special

don't treat all inodes special (system) because 5.14 turns filesystem
read-only when we try to access an non-existing inode with
LDISKFS_IGET_SPECIAL flag.

Fixes: 2c0b2b7540 ("LU-13166 osd-ldiskfs: fix to allow to get system inode")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I0c05adaf7b94e04c094cb069e8271bf478010b8c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54091
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-17556 llite: removed dead branches 90/54090/3
Shaun Tancheff [Mon, 19 Feb 2024 07:53:07 +0000 (14:53 +0700)]
LU-17556 llite: removed dead branches

A few cases disabled branches:
   if (0 && ...

Code disabled for many years should be removed.

Fixes: 39f63cf54c6 ("LU-4476 kernel: support process namespace containers")
Fixes: 99727c7a1a4 ("LU-4017 quota: add setting/getting project id function")
Fixes: c3e10ade1ee ("Moved IAM code from ldiskfs to OSD.")
Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I8f7ba09881d66845acea9fdf24f499fb7b5366fa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54090
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17546 osd: use __vfs_removexattr 72/54072/12
Alex Zhuravlev [Fri, 16 Feb 2024 05:31:41 +0000 (08:31 +0300)]
LU-17546 osd: use __vfs_removexattr

as otherwise vfs_removexattr() taking inode's lock confict with
osd_execute_truncate() while we don't really need inode's lock
because another per-object lock has been already taken.

Fixes: dcd5607ce0 ("LU-13430 vfs: add ll_vfs_getxattr/ll_vfs_setxattr compat macro")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I43c1c60d2a9f911b6395e1b7546507074a90b1cf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54072
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-17499 llite: inode lock in ll_migrate() 41/54041/9
Alex Zhuravlev [Thu, 15 Feb 2024 16:24:12 +0000 (19:24 +0300)]
LU-17499 llite: inode lock in ll_migrate()

should be taken after data version check as this is the
correct locking order used in another paths like lseek.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I0bafb8db215a2ea004928ff36049d8f053507c6f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54041
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-17497 obdclass: check upcall incorrect values 78/53878/8
Sebastien Buisson [Thu, 1 Feb 2024 15:52:22 +0000 (16:52 +0100)]
LU-17497 obdclass: check upcall incorrect values

Identity upcall is set via lctl set_param mdt.*.identity_upcall=xxx,
and rsi upcall is set via lctl set_param sptlrpc.gss.rsi_upcall=xxx.
Possible values are a valid path to an executable, and also NONE to
disable identity upcall.
Add an upcall cache function that checks the user provided string, to
make sure we do not store an invalid value. And print a message to
stdout to explain the accepted values.

Add sanity-sec test_69 to exercise this.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Iaf59e72aa1612f5579db175d8999dcf0053308ed
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53878
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>
5 weeks agoLU-16741 ptlrpc: ptlrpc: rename ptlrpc_req_finished 48/53648/7
Patrick Farrell [Thu, 11 Jan 2024 10:51:11 +0000 (16:21 +0530)]
LU-16741 ptlrpc: ptlrpc: rename ptlrpc_req_finished

First series of patchs thats renames ptlrpc_req_finished
to ptlrpc_req_put

Change it as part of a general refactor of the ptlrpc
request put/freeing code.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I3f897b74debe383c4efb25c9a0becc1c27faa3d9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53648
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: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17344 lfsck: check the validity of the res_id 65/53565/2
Hongchao Zhang [Mon, 11 Dec 2023 19:54:19 +0000 (03:54 +0800)]
LU-17344 lfsck: check the validity of the res_id

During processing the object destroying request in LFSCK,
the incoming FID could generate invalid ldlm_res_id even if
the dt_object is loaded successfully by this FID, this patch
adds checks for the validity of the generated res_id and
return error instead of triggering the panic.

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ibc5d16c3c7781fd92c44e48960c3746be81739d5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53565
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-16972 tests: createmany sets xattr 27/51827/6
Li Dongyang [Tue, 1 Aug 2023 04:16:36 +0000 (14:16 +1000)]
LU-16972 tests: createmany sets xattr

Add -x option to make createmany set an xattr named
user.createmany when open+create the files.
The xattr content is unique to avoid sharing on the
backend filesystem.
This could be useful for testing EA blocks and ea_inode
feature.

Test-Parameters: trivial
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: Ic2effe1f8cc60065dfda649d4ce003d7f10a135c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51827
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-9325 obdclass: use match_table for server mount options 09/51209/11
James Simmons [Mon, 4 Mar 2024 20:31:43 +0000 (15:31 -0500)]
LU-9325 obdclass: use match_table for server mount options

We can greatly simplify lmd_parse() by using the match_table
API of the Linux kernel.

Change-Id: I0bc48da25553d9eb18c3cc188536d7dacd09cbd6
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51209
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-9859 lnet: move expr parsing from libcfs 45/50845/10
Mr NeilBrown [Sat, 9 Mar 2024 14:30:35 +0000 (09:30 -0500)]
LU-9859 lnet: move expr parsing from libcfs

The expr parsing is used for lnet and lnet-related data, so move it
into lnet/lnet.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I4e65358babf6f522df6d7e9b3622c2b3e517bb7d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50845
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
5 weeks agoLU-15840 lov: return st_blocks=1 for HSM released files 91/47291/4
Qian Yingjin [Wed, 11 May 2022 08:21:12 +0000 (16:21 +0800)]
LU-15840 lov: return st_blocks=1 for HSM released files

The MDT will return st_blocks=1 for a HSM released file.
In the call ->coo_attr_get in LOV layer, the client should also
return st_blocks=1 for a HSM released file.

Otherwise, the client may get 0 block count. It is very easy to
reproduce this problem via the following commands for a archived
file:
# $LFS hsm_restore $file
# $LFS hsm_release $file
# $LFS hsm_release $file
After release a file twice, the reported block count via stat()
call will become 0.

Change-Id: Id1841147e40a7df0ca615e887f324cff8e613f11
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47291
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: Etienne AUJAMES <eaujames@ddn.com>
5 weeks agoLU-15714 pcc: reserve layout intent flags for PCCRO 81/46981/10
Qian Yingjin [Sat, 2 Apr 2022 09:26:29 +0000 (05:26 -0400)]
LU-15714 pcc: reserve layout intent flags for PCCRO

Add wirecheck checks for PCCRO data structures
struct lu_pcc_attach,  lu_pcc_detach, lu_pcc_state

Test-Parameters: trivial
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: If8a414103ab13155aa483179247c81908b6ced69
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46981
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-6142 lnet: SPDX for lnet/lnet/ 52/54252/3
Timothy Day [Sat, 2 Mar 2024 22:15:24 +0000 (22:15 +0000)]
LU-6142 lnet: SPDX for lnet/lnet/

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I8ef4aaabdd0a0b89a60a9187756b451c67a43492
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54252
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-6142 misc: SPDX for lustre-iokit 80/54180/2
Timothy Day [Sun, 25 Feb 2024 19:39:04 +0000 (19:39 +0000)]
LU-6142 misc: SPDX for lustre-iokit

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I70f0c1387bcfe2dbe862a292ccb0f549e4e80d31
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54180
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-6142 lnet: SPDX for lnet/util/lnetconfig/ 72/54172/3
Timothy Day [Sun, 25 Feb 2024 02:39:17 +0000 (02:39 +0000)]
LU-6142 lnet: SPDX for lnet/util/lnetconfig/

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I25c57a0db2554f551bda0b9b5f6c03893ff83646
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54172
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-12452 socklnd: allow setting IP ToS value 80/54080/5
Etienne AUJAMES [Sat, 23 Mar 2024 19:43:38 +0000 (15:43 -0400)]
LU-12452 socklnd: allow setting IP ToS value

This patch add a new tuning to set the IP "Type of Service" value for
TCP QoS.

It adds the module parameter "tos":
...
options ksocklnd tos=106

tos=-1 means "disable": the LND will not try to set the ToS value.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I15d3d1dfb645cc778763713c5018f66bea8567c6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54080
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17496 lnet: retry cleanup during shutdown 76/53876/4
Shaun Tancheff [Thu, 1 Feb 2024 08:20:14 +0000 (15:20 +0700)]
LU-17496 lnet: retry cleanup during shutdown

LNet can work a little harder to cleanup during teardown to
avoid an assert on module removal.

Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ic19c7774fa354b55bbfe21e8d87171dd024748c4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53876
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17602 mdd: use correct fid in mdd_rename 60/54260/6
Alex Zhuravlev [Mon, 4 Mar 2024 04:32:04 +0000 (07:32 +0300)]
LU-17602 mdd: use correct fid in mdd_rename

mdd_rename() can re-insert target name back as a part of error
handling. use correct fid for that, not own target directory fid.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I0662fa005459416b070157a2d049fcf5ed08ae91
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54260
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-17525 tests: sanity/133a interop version checking 66/54466/5
Shaun Tancheff [Thu, 21 Mar 2024 04:43:43 +0000 (11:43 +0700)]
LU-17525 tests: sanity/133a interop version checking

sanity/133a with 2.15.4 and master fails with:
   Error: 'The open counter on mds1 is 1, not 2'

Add a version check for at least 2.15.62 to exclude the extra
checks when the MDS does not have v2_15_61-63-g055f939979

Test-Parameters: testlist=sanity env=ONLY=133a clientarch=aarch64 clientdistro=el8.8
Test-Parameters: testlist=sanity env=ONLY=133a serverversion=2.15.4 serverdistro=el8.8
Test-Parameters: testlist=sanity env=ONLY=133a clientarch=aarch64 clientdistro=el8.8 serverversion=2.15.4 serverdistro=el8.8
Fixes: 055f939979 ("LU-17481 mdt: count all opens in mdt.*.md_stats")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ibb6eca7a5dcf295b419f7025a0167d70babe0f1f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54466
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
5 weeks agoLU-17675 tests: skip sanity-flr/61a for el9.3 12/54612/2
Andreas Dilger [Thu, 28 Mar 2024 22:05:24 +0000 (16:05 -0600)]
LU-17675 tests: skip sanity-flr/61a for el9.3

The atime update appears to be broken in this kernel, skip the test
for now.

Test-Parameters: trivial testlist=sanity env=ONLY=61 clientdistro=el9.3
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I2e27e2fbaa9a6a9e11049c4629b10998b3824c12
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54612
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-17392 build: compatibility updates for kernel 6.7 21/53621/17
Shaun Tancheff [Thu, 29 Feb 2024 20:55:58 +0000 (03:55 +0700)]
LU-17392 build: compatibility updates for kernel 6.7

Linux commit v6.6-rc4-53-gc42d50aefd17
  mm: shrinker: add infrastructure for dynamically allocating
      shrinker

Users of struct shrinker must dynamically allocate shrinker objects
to avoid run-time warnings.

Provide a wrapper for older kernels to alloc+register shinkers
and unregister+free.

Use get_group_info() and put_group_info() wrappers instead of
open coding the reference counting on group_info.usage

Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ie07bdb7fe3eb6060bd84f95f860f1b53d120a605
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53621
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
6 weeks agoLU-17243 build: compatibility updates for kernel 6.6 08/52908/20
Shaun Tancheff [Thu, 29 Feb 2024 20:33:54 +0000 (03:33 +0700)]
LU-17243 build: compatibility updates for kernel 6.6

linux kernel v5.19-rc1-4-gc4f135d64382
  workqueue: Wrap flush_workqueue() using a macro
linux kernel v6.5-rc1-7-g20bdedafd2f6
  workqueue: Warn attempt to flush system-wide workqueues.
If __flush_workqueue(system_wq) is not available fall back to
flush_scheduled_work()

linux kernel v6.5-rc1-92-g13bc24457850
  fs: rename i_ctime field to __i_ctime
Use accessors for ctime. Provide replacements for older
kernels.

linux kernel v6.5-rc1-95-g0d72b92883c6
  fs: pass the request_mask to generic_fillattr
Provide request_mask argument where needed.

Linux commit v6.5-rc2-20-g2ddd3cac1fa9
  nsproxy: Convert nsproxy.count to refcount_t
Provide a wrapper for inc/dec of nsproxy.count

linux kernel v6.5-rc4-110-gcf95e337cb63
  mm: delete mmap_write_trylock() and vma_try_start_write()
Use down_write_trylock directly mmap_write_trylock

In preparation for kernel 6.7 the remaining inode time
accessors will be preferred:

linux kernel v6.6-rc5-86-g12cd44023651
  fs: rename inode i_atime and i_mtime fields
Use accessors for atime and mtime. Provide replacements for
older kernels.

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ide6c2e3e8db532449850b145c2d61b972d21f649
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52908
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
6 weeks agoLU-17081 build: Prefer folio_batch to pagevec 59/52259/25
Shaun Tancheff [Tue, 5 Mar 2024 03:15:54 +0000 (10:15 +0700)]
LU-17081 build: Prefer folio_batch to pagevec

Linux commit v5.16-rc4-36-g10331795fb79
  pagevec: Add folio_batch

Linux commit v6.2-rc4-254-g811561288397
  mm: pagevec: add folio_batch_reinit()

Linux commit v6.4-rc4-438-g1e0877d58b1e
  mm: remove struct pagevec

Use folio_batch and provide wrappers for older kernels to use
pagevec handling, conditionally provide a folio_batch_reinit

Add macros to ease adding pages to folio_batch(es) as well
as unwinding batches of struct folio where struct page is
needed.

HPE-bug-id: LUS-11811
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ie70e4851df00a73f194aaa6631678b54b5d128a1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52259
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
6 weeks agoLU-6142 osd-zfs: Fix style issues for osd_quota.c 65/54265/2
Arshad Hussain [Mon, 4 Mar 2024 06:44:59 +0000 (01:44 -0500)]
LU-6142 osd-zfs: Fix style issues for osd_quota.c

This patch fixes issues reported by checkpatch
for file lustre/osd-zfs/osd_quota.c

Test-Parameters: trivial fstype=zfs
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Idb21a3004fb6cb711b2b6a48b4bba735f28ecb31
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54265
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-6142 osd-zfs: Fix style issues for osd_scrub.c 61/54261/5
Arshad Hussain [Mon, 4 Mar 2024 05:44:43 +0000 (11:14 +0530)]
LU-6142 osd-zfs: Fix style issues for osd_scrub.c

This patch fixes issues reported by checkpatch
for file lustre/osd-zfs/osd_scrub.c

Test-Parameters: trivial fstype=zfs
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I5b14e20f07e43b36cf974fa358c49661a569ef8b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54261
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-6142 osd: Fix style issues for osd_oi.c 55/54255/6
Arshad Hussain [Sun, 3 Mar 2024 17:38:57 +0000 (23:08 +0530)]
LU-6142 osd: Fix style issues for osd_oi.c

This patch fixes issues reported by checkpatch
for file lustre/osd-zfs/osd_oi.c

Test-Parameters: trivial fstype=zfs
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I5a1292790007f921c206803dec5230ebda16ebf9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54255
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-6142 osd: Fix style issues for osd_index.c 31/54231/2
Arshad Hussain [Fri, 1 Mar 2024 08:54:21 +0000 (14:24 +0530)]
LU-6142 osd: Fix style issues for osd_index.c

This patch fixes issues reported by checkpatch
for file lustre/osd-zfs/osd_index.c

Test-Parameters: trivial fstype=zfs
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: If2fa688443dd2d7528b6c2551f4f6cd21e39e8b3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54231
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-6142 mdd: Fix style issues for mdd_orphans.c 26/54226/4
Arshad Hussain [Fri, 1 Mar 2024 03:49:15 +0000 (09:19 +0530)]
LU-6142 mdd: Fix style issues for mdd_orphans.c

This patch fixes issues reported by checkpatch
for file lustre/mdd/mdd_orphans.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I4edbce9d25093afe5a6ab5293e9872b8f3681ae7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54226
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
6 weeks agoLU-6142 lfsck: Fix style issues for lfsck_lib.c 15/54215/2
Arshad Hussain [Thu, 29 Feb 2024 01:47:26 +0000 (07:17 +0530)]
LU-6142 lfsck: Fix style issues for lfsck_lib.c

This patch fixes issues reported by checkpatch
for file lustre/lfsck/lfsck_lib.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I10e8d63c36221ffddc2258b54c86d2f64092c0ce
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54215
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-6142 lfsck: Fix style issues for lfsck_layout.c 74/54174/2
Arshad Hussain [Sun, 25 Feb 2024 04:15:09 +0000 (09:45 +0530)]
LU-6142 lfsck: Fix style issues for lfsck_layout.c

This patch fixes issues reported by checkpatch
for file lustre/lfsck/lfsck_layout.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I5d6f8156f4552ef8b89248a7a349eb43b74d7b9f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54174
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-6142 selftest: SPDX for lnet/selftest/ 71/54171/2
Timothy Day [Sun, 25 Feb 2024 02:20:30 +0000 (02:20 +0000)]
LU-6142 selftest: SPDX for lnet/selftest/

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I131a74e146c02e601c2474f648550b1bedf37a28
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54171
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-6142 llite: Fix style issues for llite_mmap.c 43/54143/2
Arshad Hussain [Thu, 22 Feb 2024 07:56:22 +0000 (13:26 +0530)]
LU-6142 llite: Fix style issues for llite_mmap.c

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I9ead23aea0b13f91427a208feac3390d241f1b07
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54143
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-6142 osd: Fix style issues for lov_cl_internal.h 24/54124/2
Arshad Hussain [Wed, 21 Feb 2024 11:38:00 +0000 (17:08 +0530)]
LU-6142 osd: Fix style issues for lov_cl_internal.h

This patch fixes issues reported by checkpatch
for file lustre/lov/lov_cl_internal.h

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I8a2a8266745cf75e819698ea794d27edf32fa8c2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54124
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-17572 lov: remove noise from lov_init_sub() 25/54125/3
Alex Zhuravlev [Wed, 21 Feb 2024 11:47:32 +0000 (14:47 +0300)]
LU-17572 lov: remove noise from lov_init_sub()

lov_init_sub() generates too many messages in applications like racer.
let's make it a bit less noisy.

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I00ae75597b550c29122d8fb9d34d4e0d24c38dd5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54125
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
6 weeks agoLU-17632 o2iblnd: graceful handling of CM_EVENT_CONNECT_ERROR 53/54353/2
Serguei Smirnov [Mon, 11 Mar 2024 17:59:29 +0000 (10:59 -0700)]
LU-17632 o2iblnd: graceful handling of CM_EVENT_CONNECT_ERROR

There were examples in the field with RoCE setups which demonstrate
that RDMA_CM_EVENT_CONNECT_ERROR may be received when conn state
is neither IBLND_CONN_ACTIVE_CONNECT nor IBLND_CONN_PASSIVE_WAIT.
Handle this in a more gracious manner: report the event as unexpected
and allow the flow to continue.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I58b2482207cfd821f6eac142bdefc8f5bc50f8b4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54353
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-14869 test: improve sanity-flr/200a 45/54345/2
Bobi Jam [Mon, 11 Mar 2024 02:47:25 +0000 (10:47 +0800)]
LU-14869 test: improve sanity-flr/200a

Make sure "flock -x" successfully returned before running mirror
resync so that it won't get into running read holding shared flock.

Test-Parameters: trivial testlist=sanity-flr env=ONLY=200a,ONLY_REPEAT=10
Test-Parameters: trivial testlist=sanity-flr env=ONLY=200a,ONLY_REPEAT=10
Test-Parameters: trivial testlist=sanity-flr env=ONLY=200a,ONLY_REPEAT=10
Test-Parameters: trivial testlist=sanity-flr env=ONLY=200a,ONLY_REPEAT=10
Test-Parameters: trivial testlist=sanity-flr env=ONLY=200a,ONLY_REPEAT=10
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I6383af5d5761980d24af19efd4a4ac899f369a7d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54345
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-17621 lnet: fix conns_per_peer bounds check 26/54326/4
Arshad Hussain [Fri, 8 Mar 2024 03:28:43 +0000 (08:58 +0530)]
LU-17621 lnet: fix conns_per_peer bounds check

Logical opreator '||' would always result in 'TRUE',
allowing any arbitrary conns_per_peer value to be set.
Change Logical operator from '||' to '&&' to correctly
compare that the value is within range.

Test-Parameters: trivial testlist=sanity-lnet
Fixes: 9b05e872482e ("LU-10391 lnet: support updating LNet local NI settings")
CoverityID: 415060 ("Logically dead code")
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ibcaf18060cae1fc62fe41ee6237abaad1fd2de7f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54326
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
6 weeks agoLU-17623 libcfs: save msg_fn pointer to avoid race 20/54320/2
Andreas Dilger [Thu, 7 Mar 2024 22:00:31 +0000 (15:00 -0700)]
LU-17623 libcfs: save msg_fn pointer to avoid race

Save msgdata->msg_fn pointer at the start of libcfs_debug_msg() to
avoid a race condition if another thread calls CDEBUG_WITH_LOC()
at the same time and has a different calling function name.  The
msg_file pointer was already being saved.  Otherwise it is possible
to fail the __LASSERT(debug_buf == string_buf) check if formatted
string length changes between prep and write passes.

Use existing header.ph_mask and .ph_line instead of duplicating them.

Test-Parameters: testlist=sanity-scrub env=ONLY=4d,ONLY_REPEAT=25
Fixes: 1a9bd41846 ("LU-14518 libcfs: print CFS_FAIL_CHECK() location")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I3fd30cc9eed2ec8dabd795e9622fe1908a3ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54320
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-17612 gss: always try to unlink key in error 16/54316/4
Sebastien Buisson [Thu, 7 Mar 2024 15:30:59 +0000 (16:30 +0100)]
LU-17612 gss: always try to unlink key in error

In case of error in context negotiation carried out in userspace,
always try to unlink key to avoid leaking it.

Test-Parameters: trivial
Test-Parameters: kerberos=true testlist=sanity-krb5
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ic771f1e4f1b6474caaa89f63c3b02678e163d3d3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54316
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-17057 tests: Fix "...endpoint shutdown" under sanity-sec 11/54311/2
Sebastien Buisson [Thu, 7 Mar 2024 08:28:53 +0000 (13:58 +0530)]
LU-17057 tests: Fix "...endpoint shutdown" under sanity-sec

This patch fixes test_0 failing with "Cannot send after
transport endpoint shutdown" by introducing wait_ssk()
in sec_setup() to deterministicly applied SSK flavor.

Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=0
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=0
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=0
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=0
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=0
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=0
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=0
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=0
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=0
Test-Parameters: trivial mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=sanity-sec env=SHARED_KEY=true,ONLY=0
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ia14021ab82913507df02dbb5a12c8596663f15d9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54311
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>
6 weeks agoLU-17612 sec: return keyring errors to userspace 96/54296/3
Aurelien Degremont [Tue, 5 Mar 2024 08:29:23 +0000 (09:29 +0100)]
LU-17612 sec: return keyring errors to userspace

In current code, Linux keyring errors, when using GSS Kerberos,
are all masked under a generic ECONNREFUSED error. That makes
it hard to understand the root cause of the problem
for the I/O caller.

Update the code to propagate errors from request_key() up to
the application.

struct ptlrpc_cli_ctx * gss_sec_lookup_ctx_kr(...) is modified
to now returns a NULL pointer or -errval. This is tested by callers
and propagated. NULL values are still converted to ECONNREFUSED.

Test-Parameters: trivial
Test-Parameters: kerberos=true testlist=sanity-krb5
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Change-Id: I13792f141a961036bc9f7629a4a2db692e245c41
Signed-off-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54296
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
6 weeks agoLU-930 ptlrpc: remove spurious error messages 85/54285/2
Andreas Dilger [Tue, 5 Mar 2024 22:01:14 +0000 (15:01 -0700)]
LU-930 ptlrpc: remove spurious error messages

Stop errors being printed when a disconnect RPC times out, since
this error is ignored anyway, and adds no value to be printed.

Remove -61 = -ENODATA error from seq_server_init() since this is an
"expected" event for a new target and the error code is not useful.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0f695409617061d46a1b910108cda05f863ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54285
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-17609 sec: nodemap readonly_mount for remount 82/54282/3
Sebastien Buisson [Tue, 5 Mar 2024 13:43:02 +0000 (14:43 +0100)]
LU-17609 sec: nodemap readonly_mount for remount

The readonly_mount property on nodemaps forces read-only mount from
clients. Clients trying rw remount (via mount -o remount,rw) should
also be forced to read-only.

Also improve sanity-sec test_61 to exercise client remount.

Fixes: e7ce67de92 ("LU-15451 sec: read-only nodemap flag")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I61f8141001d2ff9e832e5c93d8f5997479af98a6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54282
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-17317 sec: fix sanity-sec test_28 80/54280/2
Sebastien Buisson [Mon, 4 Mar 2024 09:41:08 +0000 (10:41 +0100)]
LU-17317 sec: fix sanity-sec test_28

Improve sanity-sec test_28 to verify that srpc_contexts is valid
YAML output.
Also remove the ctx information from the output, as printing out a
kernel pointer is not ideal.

Fixes: f6687bafcb ("LU-17317 sec: add srpc_serverctx proc file")
Test-Parameters: trivial
Test-Parameters: kerberos=true testlist=sanity-krb5
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ie48dc61adfd5017a2313981f27407c9d3b69dd71
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54280
Reviewed-by: Aurelien Degremont <adegremont@nvidia.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>
6 weeks agoLU-17606 ldiskfs: remove old el8.[123] patches/series 72/54272/3
Jian Yu [Tue, 5 Mar 2024 00:17:06 +0000 (16:17 -0800)]
LU-17606 ldiskfs: remove old el8.[123] patches/series

Remove the old ldiskfs el8.[123] patch series files, and the resulting
patch files that are no longer referenced by any patch series file:

    ./contrib/scripts/clearpatches.sh -d ldiskfs/kernel_patches

Test-Parameters: trivial
Change-Id: I0de7302e9de06ad557e9b35d7eea1b9c4084ecae
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54272
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>