Whamcloud - gitweb
fs/lustre-release.git
2 months agoLU-18702 kernel: update RHEL 8.10 [4.18.0-553.37.1.el8_10] 06/58006/3
Jian Yu [Fri, 7 Feb 2025 17:24:06 +0000 (09:24 -0800)]
LU-18702 kernel: update RHEL 8.10 [4.18.0-553.37.1.el8_10]

Update RHEL 8.10 kernel to 4.18.0-553.37.1.el8_10.

The patch also provides a fallback series which uses
the former base/ext4-delayed-iput.patch for kernel
before 4.18.0-553.22.1.el8_10.

Test-Parameters: trivial fstype=ldiskfs mdtcount=4 mdscount=2 \
  clientdistro=el8.10 serverdistro=el8.10 testlist=sanity

Test-Parameters: optional fstype=zfs mdtcount=4 mdscount=2 \
  env=SANITY_EXCEPT="66 413" \
  clientdistro=el8.10 serverdistro=el8.10 testlist=sanity

Test-Parameters: optional fstype=ldiskfs mdtcount=4 mdscount=2 \
  clientdistro=el8.10 serverdistro=el8.10 testgroup=full-dne-part-1

Test-Parameters: optional fstype=ldiskfs mdtcount=4 mdscount=2 \
  clientdistro=el8.10 serverdistro=el8.10 testgroup=full-dne-part-2

Test-Parameters: optional fstype=ldiskfs mdtcount=4 mdscount=2 \
  clientdistro=el8.10 serverdistro=el8.10 testgroup=full-dne-part-3

Test-Parameters: optional fstype=zfs mdtcount=4 mdscount=2 \
  clientdistro=el8.10 serverdistro=el8.10 testgroup=full-dne-zfs-part-1

Test-Parameters: optional fstype=zfs mdtcount=4 mdscount=2 \
  clientdistro=el8.10 serverdistro=el8.10 testgroup=full-dne-zfs-part-2

Test-Parameters: optional fstype=zfs mdtcount=4 mdscount=2 \
  clientdistro=el8.10 serverdistro=el8.10 testgroup=full-dne-zfs-part-3

Fixes: 40b69da398a ("LU-18423 kernel: update RHEL 8.10 [4.18.0-553.27.1.el8_10]")
Change-Id: I5cc375a4a3586e1485fa0d9934ea1693f6899a19
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58006
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
2 months agoLU-18153 osd: don't release uninitialized SA 89/57989/4
Alex Zhuravlev [Thu, 6 Feb 2025 13:35:55 +0000 (16:35 +0300)]
LU-18153 osd: don't release uninitialized SA

if osd-zfs's object has no initialized SA, then do not
try to release that.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I210ae1eb9cae0bfb02161efeee2f897d9c37294b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57989
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
2 months agoLU-18683 llite: remove call to client_fid_init() 18/57918/8
Alex Zhuravlev [Wed, 29 Jan 2025 07:16:44 +0000 (10:16 +0300)]
LU-18683 llite: remove call to client_fid_init()

the devices right under llite (lov and lmv) don't use fld client
directly, only osc and mdc do. also, client_obd (as part of
lov/lmv) is not initialized, thus calling client_fid_init()
and client_fid_fini() from llite makes no sense and just cause a
noisy warnings from the kernel.

Fixes: 424b9ccb00 ("LU-18009 obd: remove o_fid_init/o_fid_fini")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ic04b668ba70e63a65a419735cdf9402d80d3f4e1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57918
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
2 months agoLU-9633 llite: Add kernel doc style for lustre/llite/*.c (Part 1) 25/57725/7
Arshad Hussain [Mon, 6 Jan 2025 05:06:26 +0000 (00:06 -0500)]
LU-9633 llite: Add kernel doc style for lustre/llite/*.c (Part 1)

This patch converts existing functional comments
to kernel doc style comments and removes '/**' for
comments which is not meant to be a kernel-doc comment

Tested with:
<kernel src path>/scrips/kernel-doc -v -none <file>

Pass criteria: No errors/warnings reported

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I90643c70bc5ecfbcc90504da1a5b3b3ea67e3381
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57725
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 months agoLU-18599 mdc: assign mod_close_req when RPC is ready 87/57587/2
Alex Zhuravlev [Tue, 24 Dec 2024 15:37:30 +0000 (18:37 +0300)]
LU-18599 mdc: assign mod_close_req when RPC is ready

we shouldn't assign mod_close_req before the corresponding close RPC
is fully populated, otherwise mdc_replay_open() can be accessing RPC
with no rq_reqmsg set.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I78f7ba2b18c7e9c431accce591cd4a921e25f4da
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57587
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Feng Lei <flei@ddn.com>
Reviewed-by: Nikitas Angelinas <nikitas.angelinas@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18580 osc: don't use old mtime from lvb 21/57521/4
Alex Zhuravlev [Thu, 19 Dec 2024 08:20:41 +0000 (11:20 +0300)]
LU-18580 osc: don't use old mtime from lvb

do not use lvb's mtime if it's older than the current one.

Test-Parameters: env=ONLY=39,ONLY_REPEAT=100 testlist=sanityn
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I1da25d7710313d055985a39989326b9b6a52b68c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57521
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18501 tests: sanity.sh test_56oe fix time range 01/57201/3
Frederick Dilger [Sat, 30 Nov 2024 23:12:55 +0000 (16:12 -0700)]
LU-18501 tests: sanity.sh test_56oe fix time range

test_56oe was likely failing due to the test running slow, resulting
in all of the files escaping the time range before they are found
with 'lfs find -ctime -Tupper -ctime +Tlower' so the bounds are now
calculated after all files have been created meaning that even if
there are large gaps between the creation of each file they will
still be within the new bounds.

Just in case the test is really extra slow, this test will be skipped
to avoid having to retest for the 0.01% of the time that it happens.

Test-Parameters: trivial testlist=sanity env=ONLY=56oe,ONLY_REPEAT=100
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: If3f737146f1a1d110873c5dd3a6ece60604e54ac
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57201
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>
2 months agoLU-18624 zfs: disable compression by default 90/57990/5
James Simmons [Sat, 8 Feb 2025 01:51:19 +0000 (20:51 -0500)]
LU-18624 zfs: disable compression by default

By default ZFS is enabling compression which is causing test
failures for us. It should the administrators choice to use
ZFS with compression turned on or off. Change mount.lustre
zfs backend to handle compression=val mount option. By default
we will turn it off.

For the test suite we can use <facet_type>_FS_MKFS_OPTS to
turn on compression for testing.

Disable lots of conf-sanity test which are broken with ZFS 2.X.

Change-Id: I752c883f6f912a340aa346e1dfb8bf7bdef24939
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57990
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
2 months agoLU-18218 llog: repeat declare for remote obj 20/57920/6
Alexander Boyko [Wed, 29 Jan 2025 11:31:13 +0000 (12:31 +0100)]
LU-18218 llog: repeat declare for remote obj

llog_cat_new_log() for remote object is asynchornous,
so flag LOHA_EXIST could be removed when out operation
failed. Repeat llog_cat_new_log() at declare phase
when it is not exist.

Fixes: 8047d75a5b ("LU-18218 llog: catalog lgh_lock refactoring")
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I510711f7e2d442a1de5534f0c35ab9478c4ebe6b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57920
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18445 libcfs: Remove msleep before panic for lbug 10/57010/3
Oleg Drokin [Thu, 14 Nov 2024 06:50:00 +0000 (01:50 -0500)]
LU-18445 libcfs: Remove msleep before panic for lbug

If panic on lbug is set, do not sleep before calling
the panic() as it has very undesirable side effects.
Logs are getting rotated, racing threads continue moving
and get harder to understand what they were doing and
so on.

Test-Parameters: trivial
Fixes: 9f44a48b365 ("LU-17793 libcfs: fix objtool warning in lbug_with_loc()")
Change-Id: Idd49bda78c6441a11d3ea18cb053fd9755552604
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57010
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
2 months agoLU-6142 mdd: Fix style issues for mdd_internal.h 84/56484/3
Arshad Hussain [Sun, 22 Sep 2024 14:43:43 +0000 (10:43 -0400)]
LU-6142 mdd: Fix style issues for mdd_internal.h

This patch fixes issues reported by checkpatch
for both files lustre/mdd/mdd_internal.h

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Id4c6ea7d432517be2c6a35fef593daa63737051a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56484
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-6142 misc: Fix style issues for lustre_import.h 00/56300/6
Arshad Hussain [Sat, 7 Sep 2024 12:56:01 +0000 (08:56 -0400)]
LU-6142 misc: Fix style issues for lustre_import.h

This patch fixes issues reported by checkpatch
for file lustre/include/lustre_import.h

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I1a1e13ed641ac65e723dd501272f7b217c1e685c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56300
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-17419 target: Fix KASAN slab-out-of-bounds in string_nocheck 18/58018/4
Arshad Hussain [Sat, 8 Feb 2025 11:10:01 +0000 (06:10 -0500)]
LU-17419 target: Fix KASAN slab-out-of-bounds in string_nocheck

flexi array mti_nidlist member of 'struct mgs_target_info'
is only valid when 'large_nid' is true. However, on returning
from server_lsi2mti() member mti_nidlist was unconditionally
accessed leading to slab-out-of-bounds because its rows are
not yet allocated.

This patch adds a condition for debug printing to either print
member mti_nids(v4/not large nid) or mti_nidlist for large nids

KASAN slab-out-of-bounds was triggered when running
conf-sanity/19b giving the below stack

==================================================================
[  534.044351] BUG: KASAN: slab-out-of-bounds in string_nocheck+0x1ec/0x290
[  534.045064] Read of size 1 at addr ffff88818625d1c0 by task mount.lustre/5165
[  534.045797]
[  534.045971] CPU: 1 PID: 5165 Comm: mount.lustre Tainted: G    \
W  OE    ---------r-  - 4.18.0-348.23.1.el8_5.x86_64+debug #1
[  534.047172] Hardware name: Red Hat KVM/RHEL-AV, \
BIOS 1.16.0-4.module_el8.9.0+3659+9c8643f3 04/01/2014
[  534.048120] Call Trace:
[  534.048393]  dump_stack+0x8e/0xd0
[  534.048749]  ? string_nocheck+0x1ec/0x290
[  534.049178]  print_address_description.constprop.5+0x1e/0x230
[  534.054812]  string+0xb6/0xc0
[  534.057142]  libcfs_debug_msg+0x152c/0x2290 [libcfs]
[  534.059975]  server_start_targets+0x39d8/0x73e0 [ptlrpc]
[  534.074514]  server_fill_super+0x1352/0x1cc0 [ptlrpc]
[  534.077431]  lustre_fill_super+0x779/0x9f0 [lustre]
[  534.078519]  mount_nodev+0x48/0xe0
[  534.079441]  legacy_get_tree+0x105/0x200
[  534.080294]  vfs_get_tree+0x89/0x330
[  534.081114]  do_mount+0xd40/0x1570
[  534.083922]  ksys_mount+0xb6/0xd0
[  534.084282]  __x64_sys_mount+0xba/0x150
[  534.084704]  do_syscall_64+0xa5/0x430
[  534.085090]  entry_SYSCALL_64_after_hwframe+0x6a/0xdf
----
[  534.092557] Allocated by task 5165:
[  534.092927]  kasan_save_stack+0x19/0x80
[  534.093321]  __kasan_kmalloc.constprop.9+0xc1/0xd0
[  534.093817]  __kmalloc+0x143/0x260
[  534.094257]  server_lsi2mti+0x6d5/0x1600 [ptlrpc]
[  534.094838]  server_start_targets+0x9f5/0x73e0 [ptlrpc]
[  534.095489]  server_fill_super+0x1352/0x1cc0 [ptlrpc]
[  534.096062]  lustre_fill_super+0x779/0x9f0 [lustre]
[  534.096584]  mount_nodev+0x48/0xe0
[  534.096946]  legacy_get_tree+0x105/0x200
[  534.097353]  vfs_get_tree+0x89/0x330
[  534.097729]  do_mount+0xd40/0x1570
[  534.098114]  ksys_mount+0xb6/0xd0
[  534.098482]  __x64_sys_mount+0xba/0x150
[  534.098885]  do_syscall_64+0xa5/0x430
[  534.099269]  entry_SYSCALL_64_after_hwframe+0x6a/0x

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I82eb33abc70cfe918711835b019af8e07c46272d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58018
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18692 build: add -f option to libtoolize 65/57965/3
Jian Yu [Tue, 4 Feb 2025 18:48:41 +0000 (10:48 -0800)]
LU-18692 build: add -f option to libtoolize

If libtool and aclocal.m4 were generated by different
versions of build tools, then building Lustre codes
will hit libtool version mismatch error.

This patch adds -f option to libtoolize in autogen.sh
to replace existing libtool files by default.

Change-Id: I8f4786eccfdf38b3554393d7f9d6f52613a3a3f5
Test-Parameters: trivial
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57965
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-17763 tests: use urandom in sanity/66 87/57987/2
Alex Zhuravlev [Thu, 6 Feb 2025 13:09:14 +0000 (16:09 +0300)]
LU-17763 tests: use urandom in sanity/66

as zfs-2.2.6 compresses data by default and this breaks the test
using /dev/zero as a source.

Test-Parameters: trivial
Test-Parameters: fstype=zfs env=ONLY=66 testlist=sanity
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I6853c693e7cb560ae737025507e5377da82c787b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57987
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-12511 lnet: rework lnd module loading 46/57946/3
James Simmons [Mon, 3 Feb 2025 15:16:56 +0000 (10:16 -0500)]
LU-12511 lnet: rework lnd module loading

The kernel IS_MODULE() only works in the positive, ie no ifndef.
So rework the LND module loading code to handle if modules are
enabled.

Test-Parameters: trivial testlist=sanity-lnet
Change-Id: Ie97b00b6b5c21d6e20acf72f796707630369251e
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57946
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18114 tests: fix the version checks 24/57824/3
Emoly Liu [Mon, 20 Jan 2025 03:17:58 +0000 (11:17 +0800)]
LU-18114 tests: fix the version checks

Fix the version checks for the following patches:
Fixes: fec78d4568 ("LU-18114 lctl: split "lctl net_delay_*" group into subcommands")
Fixes: 79a76faa48 ("LU-18114 lctl: split "lctl net_drop_*" group into subcommands")
Fixes: 77e98c10b3 ("LU-18114 changelog: split "lctl changelog_*" group into subcommands
Fixes: 166c48c1c3 ("LU-18114 snapshot: split "lctl snapshot_*" group into subcommands")
Fixes: 441adeced3 ("LU-18114 barrier: split "lctl barrier_*" group into subcommands")
Fixes: 89b0bcdab5 ("LU-18114 lfsck: split "lctl lfsck_*" group into subcommands")

Test-Parameters: trivial testlist=sanity-lnet serverversion=2.16
Test-Parameters: trivial testlist=sanity env=ONLY="60i 801c" serverversion=2.16
Test-Parameters: trivial fstype=zfs testlist=sanity-lsnapshot serverversion=2.16
Test-Parameters: trivial testlist=sanity-lfsck env=ONLY=12a serverversion=2.16

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I16786e31113a4bd6c8e2e334afa10a795d0b03d9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57824
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
2 months agoLU-12572 tests: wait longer to clean up files 04/57704/2
Andreas Dilger [Fri, 10 Jan 2025 00:16:27 +0000 (17:16 -0700)]
LU-12572 tests: wait longer to clean up files

Occasionally if a VM test node is busy after creating many files,
then it may take slightly longer to clean up at subtest completion.

Wait longer instead of failing the subtest and needing a full rerun.
This affects subtests like sanity-quota/8, sanity-pfl/20b, etc.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-quota env=ONLY=8,ONLY_MINUTES=30
Test-Parameters: testlist=sanity-pfl env=ONLY=20b,ONLY_MINUTES=30
Fixes: c44b2bea1b ("LU-15179 tests: add trap cleanup_quota_test")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0c48a0e45a2423bb79ad886e5246e6a8ff50041e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57704
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18558 scrub: don't release os_ls_fids too early 34/57434/4
Alex Zhuravlev [Sun, 15 Dec 2024 05:28:12 +0000 (08:28 +0300)]
LU-18558 scrub: don't release os_ls_fids too early

a running iterator can use os_ls_fids (in osd_iit_iget()) even with
the scrubber thread completed which should not release os_ls_fids
too early.

Test-Parameters: testlist=sanity-scrub,sanity-lfsck
Test-Parameters: testlist=sanity-scrub,sanity-lfsck
Test-Parameters: testlist=sanity-scrub,sanity-lfsck
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I3c5739f3b475f368235344716cd1b596e7f11bd8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57434
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>
2 months agoLU-9859 libcfs: rework special libcfs string handling 44/57944/4
James Simmons [Wed, 5 Feb 2025 15:13:02 +0000 (10:13 -0500)]
LU-9859 libcfs: rework special libcfs string handling

The header libcfs_string.h contains NID string specific items so
move them to the LNet header lib-types.h. Only functions for
string to or from mask handling is left in libcfs_string.c. We
can merged that into debug.c where it is first used.

Test-Parameters: trivial
Change-Id: I79c56594af065dfd08b8205a05326fa0ebf36d55
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57944
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18251 build: annotate lustre.spec 48/56448/3
Shaun Tancheff [Sat, 21 Sep 2024 06:27:35 +0000 (13:27 +0700)]
LU-18251 build: annotate lustre.spec

Consolidate duplicate branches and use some comments
to clarify nested if/endif pairs.

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ic30b8c0c617c65ffc9096f3cb1e4338c104cf0b2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56448
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Caleb Carlson <caleb.carlson@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
2 months agoLU-16707 scripts: ignore some files in license-status 33/57833/2
Timothy Day [Mon, 20 Jan 2025 21:07:13 +0000 (16:07 -0500)]
LU-16707 scripts: ignore some files in license-status

Many files in-tree don't need a SPDX tag - so lets
ignore them in license-status.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I31a0ae474fce78885e0391544500c2339dae66d7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57833
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>
2 months agoLU-17651 lnet: Fix KASAN use-after-free in lnet_net_remove_cpts 61/57861/7
James Simmons [Fri, 31 Jan 2025 04:42:32 +0000 (23:42 -0500)]
LU-17651 lnet: Fix KASAN use-after-free in lnet_net_remove_cpts

Allocation of net (struct lnet_net) is done under lnet_dyn_add_ni().
When adding and starting net there is a check if the net is unique
or not. If it is not unique (it is a duplicate or already added before)
the net cleanup is done under lnet_startup_lndnet() and -EEXISTS is
return. This breaks the order of allocation. The allocation order
is struct lnet_ni is part of struct lnet_net. Therefore lnet_net
cannot be deallocated before lnet_ni.

This patch removes lnet_net_free() call only when the net is found
to be duplicate. The cleanup of net (lnet_net_free()) is called
from lnet_dyn_add_ni() where it is actually allocated. This is
locally tested and no KASAN error was reported.

Lustre: DEBUG MARKER: lnetctl net add --net tcp --if ens2
LNet: Added LNI 192.168.205.1@tcp [8/256/0/180]
LNet: Accept secure, port 988
Lustre: DEBUG MARKER: lnetctl net add --net tcp --if ens2
==================================================================
BUG: KASAN: use-after-free in lnet_net_remove_cpts.constprop.0+0x774/0x7f0 [lnet]
Read of size 8 at addr ffff888005be7a50 by task lnetctl/79304

CPU: 1 PID: 79304 Comm: lnetctl Kdump: loaded Tainted: G        W  OE     -------  ---  5.14.0rocky93-debug #4
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-1.fc39 04/01/2014
 Call Trace:
 <TASK>
  ? lnet_net_remove_cpts.constprop.0+0x774/0x7f0 [lnet]
  dump_stack_lvl+0x57/0x7d
  print_address_description.constprop.0+0x1f/0x1e0
  ? lnet_net_remove_cpts.constprop.0+0x774/0x7f0 [lnet]
  print_report.cold+0x55/0x240
  kasan_report+0xc8/0x200
  ? lnet_net_remove_cpts.constprop.0+0x774/0x7f0 [lnet]
  lnet_net_remove_cpts.constprop.0+0x774/0x7f0 [lnet]
  lnet_ni_free+0x6a/0x620 [lnet]
  lnet_dyn_add_ni+0x29d/0x370 [lnet]

Test-Parameters: trivial testlist=sanity-lnet
Change-Id: I2c751a1bfeb583b86d9b68241607cf90c69f4277
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57861
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoNew tag 2.16.52 2.16.52 v2_16_52
Oleg Drokin [Thu, 6 Feb 2025 01:33:48 +0000 (20:33 -0500)]
New tag 2.16.52

Change-Id: I570cf3ba8ca39dd583cca7fe152be5532b9d6de5
Signed-off-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18665 kernel: update RHEL 9.5 [5.14.0-503.22.1.el9_5] 75/57875/2
Jian Yu [Thu, 23 Jan 2025 19:58:14 +0000 (11:58 -0800)]
LU-18665 kernel: update RHEL 9.5 [5.14.0-503.22.1.el9_5]

Update RHEL 9.5 kernel to 5.14.0-503.22.1.el9_5.

Test-Parameters: trivial fstype=ldiskfs mdtcount=4 mdscount=2 \
  clientdistro=el9.5 serverdistro=el9.4 testlist=sanity

Test-Parameters: trivial fstype=ldiskfs mdtcount=4 mdscount=2 \
  clientdistro=el9.4 serverdistro=el9.5 testlist=sanity

Test-Parameters: optional fstype=ldiskfs mdtcount=4 mdscount=2 \
  clientdistro=el9.5 serverdistro=el9.5 testgroup=full-dne-part-1

Test-Parameters: optional fstype=ldiskfs mdtcount=4 mdscount=2 \
  clientdistro=el9.5 serverdistro=el9.5 testgroup=full-dne-part-2

Test-Parameters: optional fstype=ldiskfs mdtcount=4 mdscount=2 \
  clientdistro=el9.5 serverdistro=el9.5 testgroup=full-dne-part-3

Test-Parameters: optional fstype=zfs mdtcount=4 mdscount=2 \
  clientdistro=el9.5 serverdistro=el9.5 testgroup=full-dne-zfs-part-1

Test-Parameters: optional fstype=zfs mdtcount=4 mdscount=2 \
  clientdistro=el9.5 serverdistro=el9.5 testgroup=full-dne-zfs-part-2

Test-Parameters: optional fstype=zfs mdtcount=4 mdscount=2 \
  clientdistro=el9.5 serverdistro=el9.5 testgroup=full-dne-zfs-part-3

Change-Id: I04054f65026b59c75d0e51e13c8a2fb6f8cd4fa0
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57875
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18678 build: dkms in-kernel check kernel source 05/57905/2
Shaun Tancheff [Mon, 27 Jan 2025 10:28:24 +0000 (17:28 +0700)]
LU-18678 build: dkms in-kernel check kernel source

From dkms the default $kernel_source_dir will be
  @MODDIR@/$kernelver/build
unless otherwise specified with the --kernelsourcedir option.

Unfortunately the check for kernel headers will fail as only
the generated headers are available from the 'build' symbolic
link on SUSE.

Probe for the 'source' symbolic link if it points to a directory
with 'include/linux' proceed to prefer it when checking for
in-kernel rdma support.

HPE-bug-id: LUS-12710
Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I645acfa9f0cd6308fd5c234dc679c63f94172164
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57905
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Caleb Carlson <caleb.carlson@hpe.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-4315 docs: updating lfs-[m-q] mage page style 90/57890/2
Frederick Dilger [Fri, 24 Jan 2025 23:42:46 +0000 (16:42 -0700)]
LU-4315 docs: updating lfs-[m-q] mage page style

Updating files to match the new code style for Lustre manual pages as
enforced by 'contrib/scripts/checkpatch-man.pl'. This also includes
other changes like removing < > or { } for singular required
arguments and placing [ ] around optional ones as well as making all
arguments CAPITAL and italicized, literal arguments are bolded.

Only using features that appear in groff 1.22.3 as this is the
available version is CentOS 8.

Checked files:
- lfs-mkdir.1
- lfs-path2fid.1
- lfs-pcc.1
- lfs-pcc-attach.1
- lfs-pcc-detach.1
- lfs-pcc-delete.1
- lfs-pcc-state.1
- lfs-project.1

Test-Parameters: trivial
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: Iefaad081f9a4f6627f0c7ac4e9e59c4bc099fa93
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57890
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>
2 months agoLU-18387 kernel: add missing patch for RHEL 9.5 70/57870/2
Li Dongyang [Thu, 23 Jan 2025 00:28:36 +0000 (11:28 +1100)]
LU-18387 kernel: add missing patch for RHEL 9.5

Add virtio_scsi-silence-page-allocation-failure.patch
to 5.14-rhel9.5.series

Change-Id: I40d5b4b6756df26873842402e495db06bf96a995
Test-Parameters: trivial serverdistro=el9.5
Fixes: 56bb6438aa ("LU-18387 kernel: RHEL 9.5 server support")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57870
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 months agoLU-8066 gss: migrate rest of proc files to debugfs 64/57864/4
James Simmons [Wed, 22 Jan 2025 20:53:52 +0000 (15:53 -0500)]
LU-8066 gss: migrate rest of proc files to debugfs

For GSS only part of the proc tree was ported to debugfs. Since
GSS is a root only thing we can safely move the reset to debugfs.

Test-Parameters: trivial
Test-Parameters: testgroup=review-dne-selinux-ssk-part-1
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Test-Parameters: kerberos=true testlist=sanity-krb5
Change-Id: Ic76bd920ed54c5535d71f36ca8e75dd1904394f3
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57864
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18633 gss: carry out creds negotiation as user 52/57752/6
Sebastien Buisson [Tue, 14 Jan 2025 16:20:25 +0000 (17:20 +0100)]
LU-18633 gss: carry out creds negotiation as user

Instead of switching back to root id right after we did credentials
preparation, just do the whole credentials negotiation as the user.
We just need root privileges to proceed to ioctls that exchange data
with kernel space.

sanity-krb5 test_11 is added to exercise this.

Fixes: 6791fbc530 ("LU-18497 gss: carry out creds prepare as user")
Test-Parameters: trivial
Test-Parameters: testgroup=review-dne-selinux-ssk-part-1
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I93dd367abadca077e61c1910638337a2d80996c8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57752
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>
2 months agoLU-18579 utils: lfs_migrate should inherit OST pool 19/57519/11
Andreas Dilger [Thu, 19 Dec 2024 01:58:18 +0000 (18:58 -0700)]
LU-18579 utils: lfs_migrate should inherit OST pool

Fix the lfs_migrate script so that it inherits the OST pool name
from the source file, if it was specified.

Fix the parsing of the existing file layout so that it can properly
handle various YAML formats.

Test-Parameters: trivial
Fixes: 109b5499d3 ("LU-15565 utils: updated lfs getstripe yaml format")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If06d3a682e3807e3856f1f5d2cbbecf31c7fa361
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57519
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 months agoLU-18646 tests: use /dev/urandom to consume space 71/57871/12
Andreas Dilger [Thu, 23 Jan 2025 05:07:26 +0000 (22:07 -0700)]
LU-18646 tests: use /dev/urandom to consume space

It appears newer ZFS is using data compression by default, so reading
from /dev/zero results in files not consuming the expected amount of
space.  Instead, read from /dev/urandom for ZFS to write files in
sanity-quota and ost-pools to ensure they fill the OSTs as expected.

Minor script style cleanups for affected tests.

Test-Parameters: trivial testlist=sanity-quota,ost-pools fstype=zfs
Test-Parameters: testlist=sanity-quota,ost-pools fstype=ldiskfs
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia2340da6e4c6d00123078545fde135a89c2540e5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57871
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: James Simmons <jsimmons@infradead.org>
2 months agoLU-18386 utils: add lfs quota --delimiter option 39/56739/10
Frederick Dilger [Mon, 21 Oct 2024 07:53:57 +0000 (01:53 -0600)]
LU-18386 utils: add lfs quota --delimiter option

Add a new --delimiter option to the lfs quota command, allowing
users to specify a custom delimiter for the output. This enhances
the flexibility of the quota display, making it easier to parse
the output for scripts and other automated tools.
The default delimiter is a space.

$ lfs quota --delimiter="," /mnt/lustre
Disk quotas for usr root (uid 0):
      Filesystem, kbytes, bquota, blimit, bgrace, ..., igrace
     /mnt/lustre,   4360,      0,      0,      -, ...,      -
Disk quotas for grp root (gid 0):
      Filesystem, kbytes, bquota, blimit, bgrace, ..., igrace
     /mnt/lustre,   4360,      0,      0,      -, ...,      -

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I58faffeeeecf07ae8630d3f518306c5dcec39867
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56739
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18079 tests: updating getquota() in sanity-quota 31/56231/13
Frederick Dilger [Thu, 31 Oct 2024 20:30:00 +0000 (14:30 -0600)]
LU-18079 tests: updating getquota() in sanity-quota

Updating getquota() in sanity-quota to use the new column parsing
options rather than parsing the entire output based on argument
offset which could break if the column order or argument number
was changed.

Updated lfs-quota.1 man page to include long options.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I922a9c0c869ba18029d682220a38b2e0e0cdd91d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56231
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>
2 months agoLU-18079 utils: argument parse opts for lfs quota 94/55894/29
Frederick Dilger [Mon, 2 Sep 2024 21:31:20 +0000 (15:31 -0600)]
LU-18079 utils: argument parse opts for lfs quota

Adding new options to only get certain arguments from 'lfs quota'.
This works much like 'lfs getstripe'. Each option will show their
respected argument and can be combined together to show multiple
arguments. They will be shown in the same order that they appear
in the full table for 'lfs quota'.
Added:
    --filesystem|--mount-point
    --blocks|--space|--busage
    --block-softlimit|--bsoftlimit
    --block-hardlimit|--bhardlimit
    --block-grace|--bgrace|--btime
    --inodes|--iusage
    --inode-softlimit|--isoftlimit
    --inode-hardlimit|--ihardlimit
    --inode-grace|--igrace|--itime
each matching a column of the table.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: Iffb9be9a55368a3faad3a8e74ee2f2a6b1ec7301
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55894
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 months agoLU-17848 osd: move fid_is_fs_root() to lustre_fid.h 43/57743/3
Timothy Day [Tue, 14 Jan 2025 04:45:18 +0000 (23:45 -0500)]
LU-17848 osd: move fid_is_fs_root() to lustre_fid.h

Move the duplicate fid_is_fs_root() functions to the
lustre_fid.h header.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I43d914dc28cf653deb0fa48228877c9dae503383
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57743
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
2 months agoLU-18644 socklnd: make link state detection namespace-aware 08/57808/2
Serguei Smirnov [Fri, 17 Jan 2025 02:10:28 +0000 (18:10 -0800)]
LU-18644 socklnd: make link state detection namespace-aware

Check the network namespace of the device in the event against
the namespace associated with the ni and ignore events from
non-matching namespaces

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I589399c0f2f85e5abd50d55079b79c44e30b4401
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57808
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Adam Peace <adam.peace@microsoft.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18641 mdt: remove trivial locking wrapper 98/57798/2
Timothy Day [Thu, 16 Jan 2025 02:32:48 +0000 (21:32 -0500)]
LU-18641 mdt: remove trivial locking wrapper

These wrappers around mot_dom_sem haven't changed in 10
years. It's unlikely they will grow to be more than trivial
wrappers. Remove them.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I594741404cfc820552d917a54f10e89f331e3a71
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57798
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Max Wang <wamax@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18632 debian: add uapi headers to dkms module package 49/57749/4
Aurelien Degremont [Tue, 14 Jan 2025 10:44:04 +0000 (11:44 +0100)]
LU-18632 debian: add uapi headers to dkms module package

Kernel-related header files (uapi) are only packaged in 'lustre-client-modules'
package, and not with dkms. Ensure they are packages for both type of packages.

We need to provide them alongside the kernel module packages to avoid future
conflicts if Lustre is available through the distro linux kernel.

Test-Parameters: trivial
Change-Id: Iab154cf46c121fa6cc8d559ba6ad63ffe19f52a5
Signed-off-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57749
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18626 mdd: allow chgrp with read-only permissions 17/57717/4
Max Wang [Fri, 10 Jan 2025 23:39:09 +0000 (23:39 +0000)]
LU-18626 mdd: allow chgrp with read-only permissions

In patch LU-11303, chgrp was modified to be asynchronous
and updates the quotas. However, this resulted in chgrp
calls failing for file owners with read-only permissions.

This commit relaxes the permission requirements for quota updates
for chgrp calls to allow read-only permissions.

Fixes: 83f5544d8518 ("LU-11303 quota: enforce block quota for chgrp")
Test-Parameters: testlist=pjdfstest
Signed-off-by: Max Wang <wamax@amazon.com>
Change-Id: I6c4b73d1d48cb2ffc4866ab2e03a86a6c723e960
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57717
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>
2 months agoLU-18604 kernel: update SLES15 SP6 [6.4.0-150600.23.30.1] 07/57707/2
Jian Yu [Fri, 10 Jan 2025 01:49:22 +0000 (17:49 -0800)]
LU-18604 kernel: update SLES15 SP6 [6.4.0-150600.23.30.1]

Update SLES15 SP6 kernel to 6.4.0-150600.23.30.1 for Lustre client.

Test-Parameters: trivial mdtcount=4 mdscount=2 \
  clientdistro=sles15sp6 testlist=sanity

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

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

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

Change-Id: Id198ceca160ca4e2e2aba5788ff4bb073501ae73
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57707
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18623 gss: rework memory allocation for wrap 01/57701/2
Sebastien Buisson [Thu, 9 Jan 2025 17:38:44 +0000 (18:38 +0100)]
LU-18623 gss: rework memory allocation for wrap

Make sure buffers used in gss code to carry out
encryption/decryption are correctly allocated.

Test-Parameters: trivial
Test-Parameters: kerberos=true testlist=sanity-krb5 clientarch=x86_64 clientdistro=el9.5 serverarch=x86_64 serverdistro=el9.4
Test-Parameters: kerberos=true testlist=sanity-krb5 clientarch=x86_64 clientdistro=el9.2 serverarch=x86_64 serverdistro=el9.4
Test-Parameters: kerberos=true testlist=sanity-krb5 clientarch=x86_64 clientdistro=el8.10 serverarch=x86_64 serverdistro=el9.4
Test-Parameters: kerberos=true testlist=sanity-krb5 clientarch=x86_64 clientdistro=el8.8 serverarch=x86_64 serverdistro=el9.4
Test-Parameters: kerberos=true testlist=sanity-krb5 clientarch=x86_64 clientdistro=ubuntu2204 serverarch=x86_64 serverdistro=el9.4
Test-Parameters: kerberos=true testlist=sanity-krb5 clientarch=x86_64 clientdistro=ubuntu2404 serverarch=x86_64 serverdistro=el9.4
Test-Parameters: kerberos=true testlist=sanity-krb5 clientarch=aarch64 clientdistro=el9.3 serverarch=x86_64 serverdistro=el9.4
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ia60a5171d34dad2866fd971a8e838b92486d44df
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57701
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>
2 months agoLU-18622 build: remove build/, save kconfig results 99/57699/2
Timothy Day [Tue, 7 Jan 2025 19:02:09 +0000 (19:02 +0000)]
LU-18622 build: remove build/, save kconfig results

Remove that last few files from build/ and save the kernel
configuration test results. This should allow developers to
more easily debug kernel configuration failures.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I8c81123835c6a4804e846ef2ea61d8bf025f4fda
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57699
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>
2 months agoLU-18503 utils: keepalive message from ofd_access_log_reader 91/57691/5
Vitaliy Kuznetsov [Mon, 2 Dec 2024 15:13:20 +0000 (16:13 +0100)]
LU-18503 utils: keepalive message from ofd_access_log_reader

Checks ofd_access_log_reader for keepalive message feature
availability. Start ofd_access_log_reader with keepalive
message option if it is available.
Added tests for ofd_access_log_reader to test keepalive
message feature. Fixed a bug when trace file is opened.
Moved FATAL, ERROR, DEBUG macros to include and used FATAL
macro where possible

Signed-off-by: Alexandre Ioffe <aioffe@ddn.com>
Signed-off-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com>
Change-Id: I0f218e2394c9d0ab6cd425860ba79956a10cbd58
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57691
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>
2 months agoLU-17501 libcfs: fix ncpt check for cpt patterns 59/57659/4
Frederick Dilger [Mon, 6 Jan 2025 20:54:58 +0000 (13:54 -0700)]
LU-17501 libcfs: fix ncpt check for cpt patterns

Coverty Scan found the following:
    *** CID 454272:  Control flow issues  (DEADCODE)
    /lnet/lnet/lib-cpt.c: 1114 in cfs_cpt_table_create_pattern()
    1108         } else if (!ncpt) { /* scan for bracket at start of
partition */
    1109             bracket = str;
    1110             while ((bracket = strchr(bracket, '['))) {
    1111                 bracket++;
    1112                 ncpt++;
    1113             }
       CID 454272:  Control flow issues  (DEADCODE)
       Execution cannot reach the expression "ncpt > num_node_state(N
_ONLINE)" inside this statement: "if ((!ncpt && !exclude) || ...".
    1114             if ((!ncpt && !exclude) ||
    1115                 (node && ncpt > num_online_nodes()) ||
    1116                 (!node && ncpt > num_online_cpus())) {
    1117                 CERROR("Invalid pattern '%s', or too many
partitions %dn",
    1118                 pattern_dup, ncpt);
    1119                 rc = -EINVAL;

The issue was that these checks were inside of the "else if (!ncpt)"
conditional block when they should have been outside.

CoverityID: 454272 ("Control flow issues")

Fixes: 111f5836ec ("LU-17501 libcfs: allow CPT exclude list for cores")
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I4befcbdc5d8e63a3783ba09416a61a7c80135635
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57659
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 months agoLU-18591 sec: remove support for idmap.conf 51/57651/3
Sebastien Buisson [Mon, 6 Jan 2025 16:12:56 +0000 (17:12 +0100)]
LU-18591 sec: remove support for idmap.conf

Patch "LU-16630 sec: improve Kerberos cross-realm trust remapping"
added a warning message that idmap.conf is deprecated.
With this patch, we go one step further and remove support for
idmap.conf. This means l_idmap is also removed.
Cross-realm trust remapping should be carried out via a mechanism
provided by Kerberos, such as auth_to_local or equivalent.

Test-Parameters: trivial
Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I0ab2f3a12d47f55756094043b0ec2b19d8634de1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57651
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>
2 months agoLU-18611 lfsck: stop returns after thread stopped 39/57639/4
Lai Siyao [Fri, 3 Jan 2025 07:41:47 +0000 (02:41 -0500)]
LU-18611 lfsck: stop returns after thread stopped

'lctl lfsck_stop' should wait for lfsck thread stopped before return,
and 'lctl lfsck_stop -A' should notify other nodes to stop lfsck even
if master node has stopped. This can guarantee subsequent lfsck_start
won't fail on strange errors.

Remove li_stopping flag, which doesn't make much sense.

Change wait_event_idle() to wait_event_interruptible() in
lfsck_start/stop so that the commands can be killed if it's stuck.

Update sanity-lfsck 44 to reflect above change.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I8eeb35cf2fa8a72a19f11378c4c7fd0e5a1b5961
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57639
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18605 tests: give time to start in sanityn/31s 06/57606/3
Alex Zhuravlev [Tue, 31 Dec 2024 06:10:16 +0000 (09:10 +0300)]
LU-18605 tests: give time to start in sanityn/31s

give tail command some time to start otherwise it can race with
mv command few lines ago and if mv wins then the test fail with:
sanityn.sh: line 1218: cd: /mnt/lustre/d31s.sanityn: No such file
tail: cannot open 'f31s.sanityn' for reading: No such file
tail: no files remaining
 sanityn test_31s: @@@@@@ FAIL: fail to stop 21777

Test-Parameters: trivial
Fixes: 32582842ca ("LU-17583 llite: getattr/open should not revalidate dentry")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ibff49cf12bebc4799eb0eefe2a4e45bfa459f660
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57606
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 months agoLU-10375 ptlrpc: fix error handling after tx creation 83/57583/3
Alex Zhuravlev [Tue, 24 Dec 2024 08:15:47 +0000 (11:15 +0300)]
LU-10375 ptlrpc: fix error handling after tx creation

we don't need to stop a transaction if it wasn't created
(i.e. if dt_trans_create() returned an error).

Fixes: 928714ddda ("LU-5092 nodemap: save id maps to targets in new index file")

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I04a707ab068ff1278c891cd1c7646ec37cac0055
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57583
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
2 months agoLU-18594 tests: add vmstat and recovery status info 73/57573/2
Elena Gryaznova [Mon, 23 Dec 2024 10:51:33 +0000 (13:51 +0300)]
LU-18594 tests: add vmstat and recovery status info

Patch adds:
   -- the ability to collect vmstat and recovery status
      info. Set VMSTAT_DELAY=value starts vmstat with delay=value,
      set RECOVERY_STATUS_DELAY=value runs:
          lctl get_param *.*.recovery_status
      every "value" seconds on victim server nodes and their pairs;

   -- the precmd and postcmd return code check and stops if the
      commands failed;

   -- minor cleanup:
      a little bit verbose ha_sleep()
      the turnable tmp directory.

Test-Parameters: trivial
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-12232
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I4087c73f58bf58b163f164e28b267a536569268a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57573
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18581 sec: add hsm_ops rbac role 26/57526/6
Sebastien Buisson [Thu, 19 Dec 2024 14:08:11 +0000 (15:08 +0100)]
LU-18581 sec: add hsm_ops rbac role

The purpose of the new hsm_ops rbac role is to control whether
clients can carry out HSM actions. When set, clients can call any
HSM primitive. When not set, clients get -EACCES when they try one of
the following:
- archive
- restore
- remove
- release
- set
- clear
- ct_register
- ct_unregister

sanity-hsm test_411 is added to exercise the new hsm_ops rbac role.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I234f4e8e37ec359ac9f790e29bf0b91725f2ef16
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57526
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18421 utils: Do not inherit stripe size from DOM component 01/57501/5
Rajeev Mishra [Wed, 18 Dec 2024 05:16:11 +0000 (05:16 +0000)]
LU-18421 utils: Do not inherit stripe size from DOM component

When a DOM file is created with multiple components,
the size of the first component is inherited by the
other components if their sizes are not explicitly specified.

This fix ensures that the size of subsequent components is
set to the default size when no size is provided.

New test added in
sanity-dom.sh:
Added test 8 to validate the creation of a default
stripe size when no stripe size is explicitly specified.

Modified test--
sanity-pfl.sh:
modified 21b test so that stripe size is 1MB
as test assumes 1MB size while doing find

Test-Parameters: testlist=sanity-dom
HPE-bug-id: LUS-12585
Signed-off-by: Rajeev Mishra <rajeevm@hpe.com>
Change-Id: I3388c289084769a96d8b87ae3a8268e5eb19a67e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57501
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-930 misc: update .mailmap again 06/57406/2
Andreas Dilger [Thu, 12 Dec 2024 20:59:29 +0000 (13:59 -0700)]
LU-930 misc: update .mailmap again

Correct some more mailmap entries.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iadfabbf67f12add4977969f83fc80c93955cac28
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57406
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Peter Jones <pjones@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-16561: find: support width in -printf directive 95/57395/4
Courrier Guillaume [Fri, 6 Dec 2024 15:39:07 +0000 (16:39 +0100)]
LU-16561: find: support width in -printf directive

The width supported can be positive or negative. A negative width will align
elements on the left while positive values will align elements on the right.

We also support the 0 prefix. The man page of printf(3) indicates that the
prefix 0 should use '0' instead of spaces for padding. However, GNU-find does
not use 0 padding for all the types of values. Only '%d', '%m' and '%S' use 0
padding. This patch replicates this behavior. For instance:

$ find /mnt/lustre -printf "%13p: '%024i' '%05m'\n"
  /mnt/lustre: '      144115188193296385' '00755'
/mnt/lustre/f: '      144115205272502273' '00644'

Change-Id: I954788513cc6b43c413a3688d51c1bf1efd7d9db
Signed-off-by: Courrier Guillaume <guillaume.courrier@cea.fr>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57395
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: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18536 statahead: dec inuse count when waiting entry timeout 82/57382/2
Qian Yingjin [Tue, 3 Dec 2024 20:30:13 +0000 (04:30 +0800)]
LU-18536 statahead: dec inuse count when waiting entry timeout

It should dec inuse entry count when waiting for entry state
timout:
->revalidate_statahead_dentry()
  ->!sa_ready(entry)
    ->wait_event_idle_timeout(sai->sai_waitq, sa_ready(entry),
      cfs_time_seconds(30));
    if (rc == 0) { /* Timeout */
/*
 * entry may not be ready, so it may be used by
 * inflight statahead RPC, don't free it.
 */
entry = NULL;
GOTO(out, rc = -EAGAIN);
    }

Otherwise, it may casue the statahead thread waiting endless for
the inuse count becomes zero.

Fixes: d22c78fde8d (LU-14361 statahead: wait inuse entry finished during cleanup)
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I5a6cba998362e5580924711d2ac059f7fe3de261
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57382
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>
2 months agoLU-18518 ldiskfs: fix htree_lock array-index-out-of-bounds 27/57327/2
Jian Yu [Fri, 6 Dec 2024 17:50:58 +0000 (09:50 -0800)]
LU-18518 ldiskfs: fix htree_lock array-index-out-of-bounds

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

Test-Parameters: mdtcount=4 mdscount=2 \
  clientdistro=ubuntu2404 testlist=sanity

Change-Id: I30b624a09f3f918ddaac105fb06db9fd4c693799
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57327
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Shuichi Ihara <sihara@ddn.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>
2 months agoLU-12597 tests: remove comma_list for MDTs part 3 26/57326/4
Andreas Dilger [Wed, 9 Oct 2024 21:48:06 +0000 (15:48 -0600)]
LU-12597 tests: remove comma_list for MDTs part 3

Most places that use $(mdts_nodes) also call $(comma_list ...) at the
same time.  Rather than returning a space-separated list of nodes from
those functions, instead return a comma-separated list suitable for
use by do_nodes() and similar functions calling pdsh internally.

This avoids the repeated calls to comma_list() and makes the tests
easier to read.  Also, since comma_list() internally deduplicates the
node list, it isn't necessary to do that in the callers.  A few tests
need to convert comma-separated osts_nodes into space-separated nodes.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I33509872350987564ca560ad93fdaba0443ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57326
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-12597 tests: remove comma_list for MDTs part 2 25/57325/3
Andreas Dilger [Wed, 9 Oct 2024 21:46:59 +0000 (15:46 -0600)]
LU-12597 tests: remove comma_list for MDTs part 2

Most places that use $(mdts_nodes) also call $(comma_list ...) at the
same time.  Rather than returning a space-separated list of nodes from
those functions, instead return a comma-separated list suitable for
use by do_nodes() and similar functions calling pdsh internally.

This avoids the repeated calls to comma_list() and makes the tests
easier to read.  Also, since comma_list() internally deduplicates the
node list, it isn't necessary to do that in the callers.  A few tests
need to convert comma-separated osts_nodes into space-separated nodes.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I32509872350987564ca560ad93fdaba0443ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57325
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-12597 tests: remove comma_list for MDTs part 1 83/57183/3
Andreas Dilger [Sat, 9 Mar 2024 21:49:55 +0000 (14:49 -0700)]
LU-12597 tests: remove comma_list for MDTs part 1

Most places that use $(mdts_nodes) also call $(comma_list ...) at the
same time.  Rather than returning a space-separated list of nodes from
those functions, instead return a comma-separated list suitable for
use by do_nodes() and similar functions calling pdsh internally.

This avoids the repeated calls to comma_list() and makes the tests
easier to read.  Also, since comma_list() internally deduplicates the
node list, it isn't necessary to do that in the callers.  A few tests
need to convert comma-separated osts_nodes into space-separated nodes.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I31509872350987564ca560ad93fdaba0443ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57183
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-12597 tests: return comma-separated mdts_nodes() 94/57194/4
Andreas Dilger [Thu, 28 Nov 2024 21:25:30 +0000 (14:25 -0700)]
LU-12597 tests: return comma-separated mdts_nodes()

Start to return comma-separated MDTs list from mdts_nodes(),
to avoid the redundant calling of comma_list() for each user.

Fix the few places that do not call comma_list() on mdts_nodes()
output afterward, or treat the output as a space-separated list.

Later patches will clean up all of the callers of mdts_nodes,
but there are too many places it is used to do in a single patch.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iddd3278321e7552dc2afd5fbb9f48033af3ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57194
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18432 llite: hybrid i/o statistics 33/56933/2
Shaun Tancheff [Fri, 8 Nov 2024 09:28:14 +0000 (16:28 +0700)]
LU-18432 llite: hybrid i/o statistics

Include separate hybrid i/o read and write bytes stats:
  hybrid_read_bytes
  hybrid_write_bytes

HPE-bug-id: LUS-12594
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I6678dd52f998cc9d24c75686c8f97eb8b6b56ebf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56933
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-14520 ldlm: replace mdl_mode_t with ldlm_mode 61/56761/7
Andreas Dilger [Tue, 22 Oct 2024 23:36:53 +0000 (17:36 -0600)]
LU-14520 ldlm: replace mdl_mode_t with ldlm_mode

The mdl_mode_t doesn't really provide any value, since it is just a
copy of enum ldlm_mode, so it is more clear to just use ldlm_mode
directly.  Remove mdl_mode_t and conversions to/from ldlm_mode.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0153fc67f582e51d8a2001054fa58bfae9f2255a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56761
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-14520 ldlm: rename LCK_MAXMODE/LDLM_MAX_TYPE 60/56760/9
Andreas Dilger [Tue, 22 Oct 2024 23:28:01 +0000 (17:28 -0600)]
LU-14520 ldlm: rename LCK_MAXMODE/LDLM_MAX_TYPE

Rename the "MAX" definitions for the ldlm_type and ldlm_mode enums,
since they do not actually represent the "maximum" value of the enum.
They are also better named following the enum, while we are at it.

    LCK_MINMODE -> LCK_MODE_MIN
    LCK_MAXMODE -> LCK_MODE_END
    LDLM_MIN_TYPE -> LDLM_TYPE_MIN
    LDLM_MAX_TYPE -> LDLM_TYPE_END

Add spelling.txt rules to notify in-flight patches of this change, but
include backward compatibility macros since they are in lustre_idl.h.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia709775ffc60092883971853470195678b2b9b08
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56760
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-12885 mds: add enums for MDS_OPEN flags (3/4) 34/56534/12
Arshad Hussain [Thu, 5 Sep 2024 03:26:42 +0000 (23:26 -0400)]
LU-12885 mds: add enums for MDS_OPEN flags (3/4)

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

This third step completes all of the MDS-side changes

This patch also changes/adds kernel-style doc instead
of old doxygen style wherever required

Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I209ce38b49f9ee3c39b2ed8d16d231291cf5cdd1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56534
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>
2 months agoLU-18240 sec: enforce per-nodemap project quota for root 36/56436/11
Sebastien Buisson [Fri, 20 Sep 2024 06:41:32 +0000 (08:41 +0200)]
LU-18240 sec: enforce per-nodemap project quota for root

Add a new 'ignore_root_prjquota' rbac role on nodemaps, enabled by
default. When not present, project quota for root is enforced for
clients part of this nodemap.

The tricky part is to find a way to pass this nodemap-related
information to the quota enforcement code. On the data path, this is
put in the transaction handle in a field 'th_ignore_root_proj_quota'
when ofd_trans_create() is called. Then the OSD layer is able to put
it in a field 'lqi_ignore_root_proj_quota' of struct lquota_id_info,
so that it can be checked by the QSD handler.
On the metadata path, it needs one more intermediate step as the MDD
layer does not have access to the client export to retrieve the
nodemap. So a new field 'uc_rbac_ignore_root_prjquota' is added to
struct lu_ucred. It is set in ucred_set_rbac_roles(), and used in
mdd_trans_create() to put the value in the transaction handle.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I71292fb76cbc6476b8ead83bf7a686fd1b03611e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56436
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-15420 llite: use op_data to store context states 53/56353/10
James Simmons [Mon, 2 Dec 2024 16:40:03 +0000 (09:40 -0700)]
LU-15420 llite: use op_data to store context states

The function ll_lookup_it() uses pointers to both secctx
and encctx states since that data can either come from the
server or is created locally on the client. Here we move
the code to use the pointer already in the struct md_op_data.
The reason for this change is that the fscrypt API needs
this information when setting a encrypted context.

Change-Id: Ia46ef093beb08a960fda6493326c92fd905b02f9
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56353
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: Timothy Day <timday@amazon.com>
2 months agoLU-18114 lfs: split "lfs hsm_*" group into subcommands 28/56328/7
Emoly Liu [Fri, 3 Jan 2025 03:31:56 +0000 (11:31 +0800)]
LU-18114 lfs: split "lfs hsm_*" group into subcommands

Split "lfs hsm_*" command group into subcommands, e.g.
"lfs hsm_archive" to "lfs hsm archive".
Also, sanity-hsm.sh test_223b is modified to verify this patch.

Test-Parameters: testlist=sanity-hsm env=ONLY=223b
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Iea58b424fc2e75dca109c54dcd6278c05e172693
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56328
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Feng Lei <flei@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 months agoLU-18148 doc: add lctl-llog_remove man page 26/56226/4
Emoly Liu [Mon, 2 Sep 2024 03:04:50 +0000 (11:04 +0800)]
LU-18148 doc: add lctl-llog_remove man page

Add lctl-llog_remove man page.

Test-Parameters: trivial
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: Ia0ec89b94a16047987977b4fe1e6b7ddc8d1a14d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56226
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>
2 months agoLU-18174 osd-ldiskfs: do not miss readdir's actor failure 68/56168/5
Vladimir Saveliev [Thu, 9 Jan 2025 14:58:15 +0000 (17:58 +0300)]
LU-18174 osd-ldiskfs: do not miss readdir's actor failure

lfsck falls into endless loop in osd_check_lmv() if osd_iget2()
returns error:
lfsck_master_engine
 lfsck_master_oit_engine
  lfsck_object_find_bottom
   lfsck_object_find_by_dev
    lu_object_find_at
     lu_object_start
      osd_object_init
       osd_fid_lookup
        osd_check_lmv      << this endlessly calls iterate_dir
         iterate_dir
          ldiskfs_readdir
           ldiskfs_dx_readdir
            call_filldir
             dir_emit
              osd_stripe_dir_filldir
               osd_iget
                osd_iget2   << this returns error

Use struct osd_check_lmv_buf to inform osd_check_lmv() about an error
in readdir callback.

Test to illustrate the issus is added.

Test-Parameters: trivial testlist=sanity-lfsck env=ONLY=43
HPE-bug-id: LUS-12365
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I57a4b739c9ad5a8c09bdad05752714830d584595
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56168
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-4315 doc: updating lfs-[mirr] man page style 02/56102/14
Frederick Dilger [Thu, 15 Aug 2024 21:21:04 +0000 (15:21 -0600)]
LU-4315 doc: updating lfs-[mirr] man page style

Updating files to match the new code style for Lustre manual pages as
enforced by 'contrib/scripts/checkpatch-man.pl'.

This also includes other changes like removing < > or { } for singular
required arguments and placing [ ] around optional ones as well as
making all arguments CAPITAL and italicized, literal arguments are
bolded. Lines over 80 characters should be split at the natural line
end rather than the word that goes over the limit as fewer lines will
need to be modified when making changes if each sentence is on it's
own line.

Only using features that appear in groff 1.22.3 as this is the
available version is CentOS 8.

Checked files:
- lfs-migrate.1
- lfs_migrate.1
- lfs-mirror-copy.1
- lfs-mirror-create.1
- lfs-mirror-delete.1
- lfs-mirror-extend.1
- lfs-mirror-read.1
- lfs-mirror-resync.1
- lfs-mirror-split.1
- lfs-mirror-verify.1
- lfs-mirror-write.1

Test-Parameters: trivial
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I79cb0cdd33242cf39536f29d954ae0631559e7e3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56102
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>
2 months agoLU-18136 ldlm: delete LDLM_LOCK_* macros from header 14/56014/5
Timothy Day [Tue, 13 Aug 2024 02:27:33 +0000 (22:27 -0400)]
LU-18136 ldlm: delete LDLM_LOCK_* macros from header

These macros are simply duplicates of the corresponding
ldlm_lock_* functions. Now that no code uses these,
remove them.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I72f562c4d9567e744e8dea7ae9fd836715c4f3eb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56014
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-14442 utils: --tunable opt for list/get_param 23/55723/18
Frederick Dilger [Wed, 10 Jul 2024 04:02:18 +0000 (22:02 -0600)]
LU-14442 utils: --tunable opt for list/get_param

Added new [--tunable|-t] option for 'lctl {list|get}_param' that
will only print tunable parameters. Specifically it excludes all
params that contain any of the following strings:

console|debug_|fail_|force|import|nis|panic_|sepol|stats|target_obd

This is used for debugging system performance as it creates an easy
way to collect all of the Lustre tuning parameters for each run.
This can be combined with --no-links and --readable to remove a great
deal of unwanted information being printed.

LIST_PATHNAME was removed as it only added more to maintain while
the purpose of that option can be achieved in a single line.

Test-Parameters:trivial
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I847884af2fc16611f34e3e44a3f3990d39d7f39b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55723
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-14442 utils: [-r|-w] options for get/list_param 65/55665/18
Frederick Dilger [Mon, 8 Jul 2024 20:29:29 +0000 (14:29 -0600)]
LU-14442 utils: [-r|-w] options for get/list_param

New [--readable|-r] and [--writable|-w] options have been added for
get_param and list_param that will only print parameters with the
specified permissions.
This is useful to find tunable parameters, or avoid write-only
parameters or statistics.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I00fca8f354733c9ee6d75c60e39121c12068a2a4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55665
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-11077 utils: mount with client-only params 14/55414/48
Frederick Dilger [Wed, 12 Jun 2024 20:43:08 +0000 (16:43 -0400)]
LU-11077 utils: mount with client-only params

Client-specific parameters can be added manually
to either '/etc/lustre/mount.client.params' or
'/etc/lustre/mount.FSNAME.params' to be set upon
the next client mount.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: Ided377fabaa294572c046a4a358c57c7b6cd3ca1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55414
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: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
2 months agoLU-17431 nodemap: introduce func to init nodemap properties 42/54742/9
Sebastien Buisson [Fri, 29 Mar 2024 15:50:19 +0000 (16:50 +0100)]
LU-17431 nodemap: introduce func to init nodemap properties

Introduce a specific function to initialize nodemap properties when
a new nodemap is created.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-sec mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ib2764e6b8a1cf035a6a8a723226859e35078989e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54742
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>
2 months agoLU-17431 nodemap: introduce helper funcs for range handling 35/54735/9
Sebastien Buisson [Tue, 26 Mar 2024 16:11:10 +0000 (17:11 +0100)]
LU-17431 nodemap: introduce helper funcs for range handling

Introduce helper functions for NID range handling on nodemaps,
to make it possible to use recursively for NID4 ranges:
__range_insert
__range_find
__range_search
__range_delete

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I1ec0dff1c38111621678a0e79e00c7789bcc5b8b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54735
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>
2 months agoLU-17431 nodemap: allow modifying properties of a dynamic nm 13/54513/19
Sebastien Buisson [Thu, 21 Mar 2024 09:13:43 +0000 (10:13 +0100)]
LU-17431 nodemap: allow modifying properties of a dynamic nm

Modify properties of a dynamic nodemap, by sending the appropriate
ioctl to the MDS or OSS device.
On kernel side, we need to allow handling a nodemap even if the
nodemap config file is not accessible (i.e. we are not on the
MGS). This dynamic nodemap is not stored on disk.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I7253e51ecb8869c2d2ac268926c1c907005ec4a7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54513
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-17431 nodemap: allow handling an id map for a dynamic nm 09/54509/19
Sebastien Buisson [Wed, 20 Mar 2024 15:50:54 +0000 (16:50 +0100)]
LU-17431 nodemap: allow handling an id map for a dynamic nm

Adding or deleting an id map for a dynamic nodemap, by sending the
appropriate ioctl to the MDS or OSS device.
On kernel side, we need to allow handling an idmap for a nodemap even
if the nodemap config file is not accessible (i.e. we are not on the
MGS). This dynamic nodemap is not stored on disk.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I055cf1d67b72a6bca5140814c4346ac578f2f31d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54509
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: Marc Vef <mvef@whamcloud.com>
2 months agoLU-14291 build: reduce obdclass code built for client 75/23775/16
James Simmons [Tue, 7 Jan 2025 21:40:11 +0000 (16:40 -0500)]
LU-14291 build: reduce obdclass code built for client

Several source files are built for the stand alone
lustre client that is never used. Lets not build
that code anymore.

Test-Parameters: trivial
Change-Id: I0af2cdd0c8aab450aced4c14251a02659143b036
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/23775
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: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-6142 libcfs: SPDX for libcfs module 34/57834/2
Timothy Day [Mon, 20 Jan 2025 21:29:31 +0000 (16:29 -0500)]
LU-6142 libcfs: SPDX for libcfs module

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ie860bb4d3aaa074f4414b149daa387c118db4003
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57834
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>
2 months agoLU-6142 ptlrpc: SPDX for Portal RPC 31/57831/2
Timothy Day [Mon, 20 Jan 2025 17:11:30 +0000 (12:11 -0500)]
LU-6142 ptlrpc: SPDX for Portal RPC

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id45db81b27d681636e4ce952add8d8516a659b9e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57831
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 months agoLU-6142 obd: Fix style issues for obd_support.h (3a/3) 19/57819/6
Arshad Hussain [Fri, 10 Jan 2025 10:54:54 +0000 (05:54 -0500)]
LU-6142 obd: Fix style issues for obd_support.h (3a/3)

This patch fixes issues reported by checkpatch
for both files lustre/include/obd_support.h

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ifc05695da0f8e91624cab4f8ec78902736aabbac
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57819
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: Timothy Day <timday@amazon.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
2 months agoLU-6142 obd: Fix style issues for obd_support.h (2c/3) 28/57828/3
Arshad Hussain [Mon, 20 Jan 2025 09:03:39 +0000 (04:03 -0500)]
LU-6142 obd: Fix style issues for obd_support.h (2c/3)

This patch fixes issues reported by checkpatch
for both files lustre/include/obd_support.h

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ide0981cc20fb982405b7bf325525cc445441f264
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57828
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: Timothy Day <timday@amazon.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
2 months agoLU-6142 obd: Fix style issues for obd_support.h (2b/3) 21/57821/5
Arshad Hussain [Fri, 10 Jan 2025 10:44:31 +0000 (05:44 -0500)]
LU-6142 obd: Fix style issues for obd_support.h (2b/3)

This patch fixes issues reported by checkpatch
for both files lustre/include/obd_support.h

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ieb6d95350819b6aa93963f5069db7b7879a0e7b8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57821
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: Timothy Day <timday@amazon.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
2 months agoLU-6142 obd: Fix style issues for obd_support.h (2a/3) 20/57820/3
Arshad Hussain [Fri, 10 Jan 2025 10:44:31 +0000 (05:44 -0500)]
LU-6142 obd: Fix style issues for obd_support.h (2a/3)

This patch fixes issues reported by checkpatch
for both files lustre/include/obd_support.h

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ia13a9c6f66e29450f35e5654a89b4d493d9bd6fb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57820
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: Timothy Day <timday@amazon.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
2 months agoLU-6142 mdt: SPDX for MetaData Target 97/57797/2
Timothy Day [Thu, 16 Jan 2025 02:24:09 +0000 (21:24 -0500)]
LU-6142 mdt: SPDX for MetaData Target

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ib116dfc5143297a13426881d8ee91df7275b8c8c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57797
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>
2 months agoLU-6142 llite: SPDX for Lustre Lite 96/57796/2
Timothy Day [Thu, 16 Jan 2025 02:07:07 +0000 (21:07 -0500)]
LU-6142 llite: SPDX for Lustre Lite

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I31ce3f671ef897794f35f51438f236a19b46cf5a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57796
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>
2 months agoLU-6142 echo: SPDX for OBD Echo 95/57795/2
Timothy Day [Thu, 16 Jan 2025 01:47:39 +0000 (20:47 -0500)]
LU-6142 echo: SPDX for OBD Echo

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I7a7a55638eb32e605257fc4954eadfc8d84ae00d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57795
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>
2 months agoLU-6142 ofd: SPDX for OBD Filter Device 94/57794/3
Timothy Day [Thu, 16 Jan 2025 01:36:24 +0000 (20:36 -0500)]
LU-6142 ofd: SPDX for OBD Filter Device

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id084f69b2623c09150403105af2484e23f583c25
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57794
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 months agoLU-18609 ldlm: use of logical '&&' with constant operand 13/57613/3
Bobi Jam [Thu, 2 Jan 2025 10:31:57 +0000 (18:31 +0800)]
LU-18609 ldlm: use of logical '&&' with constant operand

CoverityID: 454269 (CONSTANT_EXPRESSION_RESULT)
Transform bitwise operator result into a boolean value for boolean
operation.

Fixes: 5517eab06e ("LU-1876 hsm: layout lock implementation on server side")
Fixes: 70b9dc57a9 ("LU-17812 ldlm: stack trace log for LDLM error")
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I6a6c22a0d1178da99a5253cb03020b5cc2372a31
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57613
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: Timothy Day <timday@amazon.com>
2 months agoLU-18214 tests: modify test_5{a,b,c,d} for parallel 60/57060/5
Yang Sheng [Mon, 18 Nov 2024 19:56:47 +0000 (03:56 +0800)]
LU-18214 tests: modify test_5{a,b,c,d} for parallel

In order to measure the lock performance under contention
case. Modify the test_5x to run on multi clients.

Test-Parameters: trivial testlist=performance-sanity env=ONLY=5
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I75b723504d569253ca3e54ad363faeceb5d49e5c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57060
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>
2 months agoLU-6142 obd: Fix style issues for obd_support.h (1/3) 82/56482/3
Arshad Hussain [Fri, 10 Jan 2025 09:53:40 +0000 (04:53 -0500)]
LU-6142 obd: Fix style issues for obd_support.h (1/3)

This patch fixes issues reported by checkpatch
for both files lustre/include/obd_support.h

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Iaaef572c2a6d9afd28f9076422a58bffc221fb1b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56482
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-6142 mdc: Fix style issues for mdc_reint.c 79/56479/4
Arshad Hussain [Sun, 22 Sep 2024 14:13:48 +0000 (10:13 -0400)]
LU-6142 mdc: Fix style issues for mdc_reint.c

This patch fixes issues reported by checkpatch
for both files lustre/mdc/mdc_reint.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I0538662af8a5c24e76bb6569871895060859cca3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56479
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
2 months agoLU-5896 wirecheck: add swap layout structs to wirecheck 73/54473/8
Courrier Guillaume [Tue, 19 Mar 2024 10:52:43 +0000 (11:52 +0100)]
LU-5896 wirecheck: add swap layout structs to wirecheck

For the support of blocking migrations, the MDS_SWAP_LAYOUTS RPC needs
to be updated. Wire checks were missing for some structs related to this
RPC. This patch introduces those checks to make sure that the new RPC
layout will not introduce layout changes in the structures.

Signed-off-by: Courrier Guillaume <guillaume.courrier@cea.fr>
Change-Id: I77b19bf6a4cf03bdcb4995bd83cb00ab52195cfe
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54473
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 months agoLU-18498 hsm: don't lock llog at cdt 97/57197/8
Alexander Boyko [Mon, 4 Nov 2024 06:59:30 +0000 (07:59 +0100)]
LU-18498 hsm: don't lock llog at cdt

llog does not need outside locking. Only HSM data
should be protected inside callbacks. Howevere most of
it only read data. cdt_last_cookie is converted to
atomic64_t. Also fix adds synchronization between
hsm_cancel_all_actions() and mdt_coordinator(), cancels
wait ongoing work.
To be safe between llog processing vs record modification,
dt_write_lock() is added to a modification llog_osd part.

Test-Parameters: testlist=sanity-hsm,sanity-pcc
HPE-bug-id: LUS-12557
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I67eb98dcd57d4db6916c80c17b566577e7efddf0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57197
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-17848 osd: deduplicate OSD locking 48/55148/11
Timothy Day [Sat, 18 May 2024 17:41:09 +0000 (17:41 +0000)]
LU-17848 osd: deduplicate OSD locking

The two OSDs currently handle locking identically using a rw
semaphore. Future OSDs will likely handle locking in the same
way, considering the need for sleeping; it doesn't make sense to
use internal filesystem locking to handle osd_object lifetimes.
Plus, these locks are only used by upper layers of Lustre - never
internally in the OSD.

Create generic dt semaphore and wrap locking into generic dt_*
functions.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I14df606ee99b94b9b2a610928e8ae5b9b2d8c718
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55148
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
2 months agoLU-18539 libcfs: introduce OBD_FREE_RCU() 87/57387/2
Alex Zhuravlev [Thu, 12 Dec 2024 06:06:01 +0000 (09:06 +0300)]
LU-18539 libcfs: introduce OBD_FREE_RCU()

which can be used instead of direct call to kfree_rcu(), does
internal counting for memory leak detector and let us use
regular OBD_ALLOC().

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I7dfbfb0856440632ef56fbd1ab76e4b5b90b81e9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57387
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18596 ldlm: avoid LBUG in ll_lock_cancel_bits 77/57577/3
Sergey Cheremencev [Fri, 13 Dec 2024 04:42:33 +0000 (07:42 +0300)]
LU-18596 ldlm: avoid LBUG in ll_lock_cancel_bits

Check that resource and appropriate inode FIDs are
equivalent under ldlm_lock and resource locks in
ll_inode_resrouce_from_lock. While it was in
ll_lock_cancel_bits it might cause following panic:

 ll_lock_cancel_bits()) ### data mismatch with object
 ll_lock_cancel_bits()) LBUG

Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: Ifb75b0ed32062f24c67503548cf2e321ebbc9759
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57577
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
2 months agoLU-8066 osc: migrate simple procfs files to sysfs 58/57458/3
James Simmons [Wed, 18 Dec 2024 15:08:36 +0000 (10:08 -0500)]
LU-8066 osc: migrate simple procfs files to sysfs

Move the remaining two simple procfs files for the osc layer
to sysfs.

Test-Parameters: trivial
Change-Id: Iafcc507cab9309f809f850d356c350c2b969241e
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57458
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-8066 sysfs: fixup max_dirty_mb 57/57457/2
James Simmons [Thu, 12 Dec 2024 15:16:09 +0000 (08:16 -0700)]
LU-8066 sysfs: fixup max_dirty_mb

Migrate the mdc version of max_dirty_mb to sysfs since its a
simple value visible to non-root users. For the osc version
update the function with sysfs_memparse().

Change-Id: I1329e7a0848101a1754836832e5c3b76d4db76cc
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57457
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>