Whamcloud - gitweb
fs/lustre-release.git
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>
2 months agoLU-18554 llite: improve *_env_thread_* names 27/57427/4
Patrick Farrell [Fri, 13 Dec 2024 18:17:47 +0000 (13:17 -0500)]
LU-18554 llite: improve *_env_thread_* names

There are a number of {vvp, osc}_env_thread_{struct}
helpers, all of which clear the struct (memset( 0 ))
before returning the pointer.

These names are confusing, improve them so I can stop
making the mistake of assuming they just help get the struct
from the env.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I0bdd8857d8ff076aac0872f8355317f800bfcaa5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57427
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18170 obdclass: replace round_up(*_inllenX*) with ALIGN 54/57354/2
Etienne AUJAMES [Tue, 10 Dec 2024 11:11:50 +0000 (12:11 +0100)]
LU-18170 obdclass: replace round_up(*_inllenX*) with ALIGN

This patch fixes the following Coverity error:

2648      bufs = ioc_data->ioc_inllen4 +
2649      round_up(ioc_data->ioc_inllen1, 8) +
   CID 451715:  Integer handling issues  (INTEGER_OVERFLOW)
   Expression "ioc_data->ioc_inllen2 - 1U", which is equal to
4294967295,
   where "ioc_data->ioc_inllen2" is known to be equal to 0, underflows
   the type that receives it, an unsigned integer 32 bits wide.
2650      round_up(ioc_data->ioc_inllen2, 8) +
2651      round_up(ioc_data->ioc_inllen3, 8);

ioc_inllenX are unsigned so round_up() macro can underflow if the
value is set to 0.

#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)

So this patch replaces round_up() with ALIGN() to align ioctl buffer
sizes to 8 bytes.

Fixes: 5ad117fc6f ("LU-18170 obdclass: fix llog_print_cb()")
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I47e42f581aa76b71c23c7cfec42b9f2589f23f2b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57354
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-17995 libcfs: implement libcfs_subsystem_debug 36/57336/3
Timothy Day [Sun, 8 Dec 2024 06:46:41 +0000 (01:46 -0500)]
LU-17995 libcfs: implement libcfs_subsystem_debug

Allow printk to be enabled based on subsystem. This mirrors
the existing infrastructure for printing debug messages
to console.

Also, include file and function names in debug messages
printed to the console.

These changes remove the need for the custom debugging in
the in-memory OSD.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ifaca7f6d4f1b7b5fb42e7147b5a9dff0b34f643a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57336
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18508 obdclass: llog test to set lpi_rc 74/57274/4
Alex Zhuravlev [Wed, 4 Dec 2024 07:08:49 +0000 (10:08 +0300)]
LU-18508 obdclass: llog test to set lpi_rc

llog_test_process_thread() should set lpi_rc before signalling own
completion, otherwise the caller can find uninitialized lpi_rc.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Id49f10bb0454da2bdf047a2c83e4c0462b826018
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57274
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
2 months agoLU-17276 flock: fix for lock split 05/57105/13
Yang Sheng [Fri, 22 Nov 2024 01:52:58 +0000 (09:52 +0800)]
LU-17276 flock: fix for lock split

Fix the logic in lock split case. Also add test
case to verify it works well.

Fixes: ea012dfb2a (LU-17276 ldlm: use interval tree for searching in flock)
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I9599592eba217ce79956c45c0bbb58a7f5e805d0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57105
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-13118 llite: add kobject to struct config_llog_instance 50/56850/5
James Simmons [Mon, 9 Dec 2024 17:02:47 +0000 (12:02 -0500)]
LU-13118 llite: add kobject to struct config_llog_instance

For the case of PARAM_LLITE in class_process_config() special
handling was implemented to locate the super block which
containes the struct kobject needed to send an uevent. This
special handling depends on naming containing an internal
kernel address which is also used to build the sysfs tree.
To fix this ASLR violation we need to move away from using
this internal address but it will break our special
handling. The solution is to add kobject of llite to the
struct config_llog_instance that can be used by the
class_process_config() so the special handling can go away.
Plus the change allows the removal of lsi_kobj.

Change-Id: Idf1e5a87e9d7b1b6448877d8bc21baf7f823dfeb
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56850
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-16796 quota: Change struct lquota_entry to use kref 54/56454/8
Arshad Hussain [Fri, 11 Oct 2024 05:36:55 +0000 (01:36 -0400)]
LU-16796 quota: Change struct lquota_entry to use kref

This patch changes struct lquota_entry to use
kref instead of atomic_t

Test-Parameters: trivial testlist=sanity-quota
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I27cb5373872887c3327a4d6dedccd15b02c7a4c9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56454
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18076 lfs: get client UUID by "lfs getname -u" 37/56437/7
Emoly Liu [Thu, 10 Oct 2024 14:43:28 +0000 (22:43 +0800)]
LU-18076 lfs: get client UUID by "lfs getname -u"

This patch is to get client UUID from the mountpoint by command
"lfs getname -u" directly. Functions llapi_file_get_type_uuid()
and llapi_file_fget_type_uuid() are added, and the man page
lfs-getname.1 is updated as well.
Also, function get_client_uuid() in test-framework.sh is modified
to verify this patch.

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I8f7db964adf209e19c29a240608881b38e068ded
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56437
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-16796 ptlrpc: Change struct nrs_tbf_rule to use kref 93/56193/6
Arshad Hussain [Thu, 29 Aug 2024 05:45:22 +0000 (01:45 -0400)]
LU-16796 ptlrpc: Change struct nrs_tbf_rule to use kref

This patch changes struct nrs_tbf_rule to use
kref instead of atomic_t

Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ia716655f98046787c51d2f581f2c88979a50b25b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56193
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-10499 pcc: tunable GID to pin/unpin files 63/54463/5
Qian Yingjin [Thu, 21 Apr 2022 02:13:13 +0000 (22:13 -0400)]
LU-10499 pcc: tunable GID to pin/unpin files

In this patch, we adds a tunable "mdt.*.enable_pin_gid" that
controls the GID to pin/unpin files.
Default should be gid=0, so it is limited to root, gid=-1 so any
user can pin/unpin, or gid=<gid> to allow a specific GID (e.g.
wheel).
We add a virtual "lustre.pin" xattr to set/get the xattr for
non-root users, if mdt.*.enable_pin_gid is set correctly.
Add test case sanity-pcc test_204b to verify it.

EX-bug-id: EX-5047
Change-Id: I1be92f365cfe8dea278559b2c34fcee8e42d1c4d
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54463
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: Feng Lei <flei@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
2 months agoLU-10499 pcc: avoid to specify attach ID for every pin 61/54461/5
Qian Yingjin [Thu, 21 Apr 2022 08:23:16 +0000 (04:23 -0400)]
LU-10499 pcc: avoid to specify attach ID for every pin

In this patch, it avoids the need to specify "-i <attach_id>" for
every pin/unpin operation as in the very common case there is only
a single cache for that client.
If attach ID is not specified, it will select the first dataset
on the client as PCC backend.

Add the test case: sanity-pcc test_204b.

EX-bug-id: EX-5128
Change-Id: I04e2b3d9ca360ae40f3723d7cd9bd78b22602123
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54461
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: Feng Lei <flei@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
2 months agoLU-18595 osd-ldiskfs: use local fake file for iteration 74/57574/5
Alexander Boyko [Mon, 23 Dec 2024 11:03:54 +0000 (12:03 +0100)]
LU-18595 osd-ldiskfs: use local fake file for iteration

LU-13783 introduced the alloc_file_pseudo() for directory iteration.
It leads to many file descriptors for a kernel and a special
logic to drop it LU-16973.

One of the reason of alloc_file_pseudo() was a security_alloc() call.
However we could initialize iteration like kernel and skip
security checks for a pseudo files.

HPE-bug-id: LUS-12253
Fixes: b0f150eba4c2 ("LU-13783 osd-ldiskfs: use alloc_file_pseudo to create fake files")
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I67d95d84913520b088578923841065e5b1d8b6df
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57574
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 months agoLU-18229 ldlm: BL_AST|CANCELLING lock still can be batched 89/56389/4
Vitaly Fertman [Tue, 17 Sep 2024 18:07:18 +0000 (21:07 +0300)]
LU-18229 ldlm: BL_AST|CANCELLING lock still can be batched

The current code makes BL_AST locks which are also CANCELLING to be
cancelled individually (one lh per RPC), because they are already in
the l_bl_list. This still could be optimised.

A small cleanup in mdc_rename(): ldlm_cli_cancel_list() is already
called by mdc_prep_elc_req()->ldlm_prep_elc_req(), aligned with other
mdc_prep_elc_req() calls.

HPE-bug-id: LUS-12470
Fixes: b65374d9 ("LU-16285 ldlm: send the cancel RPC asap")
Signed-off-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Change-Id: I218d38bc56a885845c48a3c982840b35b132f213
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56389
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18109 tests: skip sanity-sec test_27ab for old MDS 55/57555/4
Andreas Dilger [Fri, 20 Dec 2024 08:50:55 +0000 (01:50 -0700)]
LU-18109 tests: skip sanity-sec test_27ab for old MDS

The nodemap offset functionality was only added for MDS versions
after 2.16.0-170, so should be skipped for older versions.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-sec env=ONLY=27ab serverversion=2.15
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie0ac0e419b9bb94dee24fc12e135081a6eb7440c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57555
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-17000 contrib: update coverity-run script 07/57607/3
Timothy Day [Mon, 30 Dec 2024 21:44:39 +0000 (16:44 -0500)]
LU-17000 contrib: update coverity-run script

Update coverity-run script to allow for builds on any
arbitrary RHEL8 host with ssh access. This removes the
strict dependency on Vagrant/libvirt.

Also, update the branch to master-next for Coverity builds
rather than master.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ic0a36ed2b090b5a839d3725fb7299c2ff93da525
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57607
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>
3 months agoLU-18587 utils: allow large NID lists in mount tools 60/57560/10
Mikhail Pershin [Thu, 19 Dec 2024 22:00:20 +0000 (01:00 +0300)]
LU-18587 utils: allow large NID lists in mount tools

While ldd_params are 4096 bytes long a NID lists in params
"failnode" and "mgsnode" are limited by 1024 bytes only.

Patch removes that limitation and allows as many NIDs as
can fit into ldd_params 4k total size

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I8f3867e0f31c75e6261434d4aef48eaf4e8f4507
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57560
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18584 tests: fix OSTSIZE for conf-sanity/106 52/57552/2
Li Dongyang [Fri, 20 Dec 2024 06:39:11 +0000 (17:39 +1100)]
LU-18584 tests: fix OSTSIZE for conf-sanity/106

We try to make sure OST has enough objects for
conf-sanitty/106 but the default bytes to inode
ratio is 16k, not 8k.

Test-Parameters: trivial
Test-Parameters: testlist=conf-sanity env=ONLY=106
Test-Parameters: testlist=conf-sanity env=ONLY=106
Test-Parameters: testlist=conf-sanity env=ONLY=106
Test-Parameters: testlist=conf-sanity env=ONLY=106
Test-Parameters: testlist=conf-sanity env=ONLY=106
Test-Parameters: testlist=conf-sanity env=ONLY=106
Fixes: 334d780617 ("LU-10733 tests: increase conf-sanity/106 OST size")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I40fdf909efb5d55741b327708b4a3bb089a53eba
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57552
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 months agoLU-18582 tests: fix conf-sanity/82b random OST idx 31/57531/3
Sergey Cheremencev [Thu, 19 Dec 2024 15:26:24 +0000 (18:26 +0300)]
LU-18582 tests: fix conf-sanity/82b random OST idx

Sometimes (RANDOM * 2) % 65532 gives the
same results in a small selection. This
caused smaller number OSTs than requested
and resulted in a following failure:

 wait_update pool_list lustre.test_82b failed

Test-Parameters: trivial testlist=conf-sanity env=ONLY=82b
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: Iebaf2fedd52803eb918b4ee9c8111537930a6e38
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57531
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18560 utils: Fix ldiskfs_write_dd Coverity warnings 49/57449/2
Marc Vef [Sun, 15 Dec 2024 20:15:49 +0000 (21:15 +0100)]
LU-18560 utils: Fix ldiskfs_write_dd Coverity warnings

Coverity has reported issues with the "ldiskfs_write_ldd()" function.
In particular OVERRUN, INTEGER_OVERFLOW, NO_EFFECT, and
ARRAY_VS_SINGLETON warnings.

This patch fixes these warnings.

Fixes: 7687e22af35d ("LU-9936 utils: Improve ldiskfs_write_dd() writing mount data")
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: Id1379d9c6d53e697ff2ee12570b4569c4bce5e73
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57449
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18540 lnet: Fix lnetctl ping timeout parsing 05/57405/2
Chris Horn [Thu, 12 Dec 2024 18:56:17 +0000 (11:56 -0700)]
LU-18540 lnet: Fix lnetctl ping timeout parsing

The src_nid argument to yaml_lnet_ping() is never null, so we need to
check it with nid_addr_is_set() to determine whether the source key
should be added to the ping command yaml.

sanity-lnet/256 is updated to verify that all ping commands complete
successfully. This verifies that lnetctl ping --timeout works
correctly.

Test-Parameters: trivial testlist=sanity-lnet
Fixes: 5ddc054540 ("LU-17629 utils: support hostname with lustre_lnet_parse_nid_range()")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Id6617b38edc68e49800ae37982390e17bc95e141
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57405
Reviewed-by: James Simmons <jsimmons@infradead.org>
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>
3 months agoLU-8066 obdecho: remove last user of lprocfs_uuid_seq_show 00/57400/3
James Simmons [Thu, 12 Dec 2024 16:20:46 +0000 (09:20 -0700)]
LU-8066 obdecho: remove last user of lprocfs_uuid_seq_show

The function lprocfs_obd_setup() will by default create a set
of sysfs files. One of those files is uuid. With this being
the case obdecho is creating two uuid files, one in sysfs and
the other in debugfs. We don't need the debugfs version so
remove it. With this change we can remove the last uuid
debugfs / procfs version. Also procfs setup for obdecho is
no longer needed.

Change-Id: I741b8f98ebac83da95255cb6c26b70f9fbce3ef7
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57400
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-16446 utils: fix issues with llapi_get_lmm_from_path() 91/57391/3
Frederick Dilger [Thu, 12 Dec 2024 08:11:10 +0000 (01:11 -0700)]
LU-16446 utils: fix issues with llapi_get_lmm_from_path()

size_t was being used for lmmlen when it should have been ssize_t
so that it can hold a negative return value.
comp_v1 was returned by llapi_get_lmm_from_path() but not freed.
lmmbuf was allocated in llapi_get_lmm_from_path() but leaked on error.
file p was opened in llapi_get_lmm_from_path() but leaked on error.

Test-Parameters: trivial
CoverityID: 451724 ("Unsigned compared against 0")
CoverityID: 451710 ("Resource leak")
CoverityID: 451707 ("Resource leak")
Fixes: a796b10fa2 ("LU-16446 utils: specify total count for mirror extend")
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I729d2c2abb8789a82d61858b034dcadf733a4197
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57391
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 months agoLU-18129 tests: wait longer for tcp connections to establish 50/57350/9
Serguei Smirnov [Mon, 9 Dec 2024 21:43:27 +0000 (13:43 -0800)]
LU-18129 tests: wait longer for tcp connections to establish

In sanity-lnet test_230, increase the wait time for the
requested number of connections to establish before checking:
this is important for high conns_per_peer values.
To the same case, added setting of conns_per_peer at "net add".

Test-Parameters: trivial
Test-Parameters: testlist=sanity-lnet env=ONLY=230,ONLY_REPEAT=100 clientdistro=ubuntu2404
Test-Parameters: testlist=sanity-lnet env=ONLY=230,ONLY_REPEAT=100 clientdistro=ubuntu2404
Test-Parameters: testlist=sanity-lnet env=ONLY=230,ONLY_REPEAT=100 clientdistro=ubuntu2404
Test-Parameters: testlist=sanity-lnet env=ONLY=230,ONLY_REPEAT=100 clientdistro=ubuntu2404
Test-Parameters: testlist=sanity-lnet env=ONLY=230,ONLY_REPEAT=100 clientdistro=ubuntu2404
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I1137251afddf54c4b5dd2bb9426d3e6cbf459748
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57350
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Caleb Carlson <caleb.carlson@hpe.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 months agoLU-18476 tests: fix version check in replay-single.sh/202 53/57253/6
Emoly Liu [Wed, 4 Dec 2024 01:01:43 +0000 (09:01 +0800)]
LU-18476 tests: fix version check in replay-single.sh/202

Separate ddn version from community versino to fix version
check for interop testing in replay-single.sh test_202.

Test-Parameters: trivial testlist=replay-single env=ONLY=202 \
 serverbuildno=4587 serverjob=lustre-master serverdistro=el8.10
Test-Parameters: trivial testlist=replay-single env=ONLY=202 \
 serverbuildno=94 serverjob=lustre-b2_15 serverdistro=el8.10
Test-Parameters: trivial testlist=replay-single env=ONLY=202 \
 serverbuildno=616 serverjob=lustre-b_es5_2 serverdistro=el7.9

Fixes: c66a7dea85 ("LU-18435 lod: recover layout generation from replay")
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I7a13804380477ad24d08ad97db3e2ef701f444c9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57253
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 months agoLU-18453 quota: show default quota in lfs quota -a 53/57053/7
Hongchao Zhang [Sun, 24 Nov 2024 10:01:46 +0000 (18:01 +0800)]
LU-18453 quota: show default quota in lfs quota -a

When getting all quota info by "lfs quota -a", the default quota
should also be printed if some specific quota ID is using it.

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ib6cb42fe6ec62df0c2239c7098eabaf012f02b2e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57053
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18353 utils: prohibit set inode limit to PQ 34/56634/4
Sergey Cheremencev [Wed, 9 Oct 2024 22:19:23 +0000 (01:19 +0300)]
LU-18353 utils: prohibit set inode limit to PQ

Prohibit to set inode limit for Pool Quotas.
Without the fix it sent a request at MDT and
failed with following errors:

  lfs setquota: Cannot find pool 'ddn_ssd'
  lfs setquota: quotactl failed: No such file or directory

With the patch it fails with more suitable message
and returns ENOENT directly from utils without extra
request at MDT:

  lt-lfs setquota: inode limits are not supported with Pool Quotas
  setquota failed: Invalid argument

Test-Parameters: trivial testlist=sanity-quota
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: If3fae3cee49138b47605bc603e896955f9b73851
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56634
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18155 misc: use LASSERT/F instead of if () LBUG() 15/56115/5
Timothy Day [Thu, 22 Aug 2024 01:20:45 +0000 (21:20 -0400)]
LU-18155 misc: use LASSERT/F instead of if () LBUG()

We should use a proper LASSERT statement rather than
more verbose if/LBUG blocks.

The patch has been generated with the coccinelle script below.
I manually inverted the logic in the asserts.

@@
expression L;
expression list F;
@@

- if (L) {
(
- CDEBUG(F);
|
- CWARN(F);
|
- CERROR(F);
|
- CEMERG(F);
|
- CNETERR(F);
|
- LCONSOLE(F);
|
- LCONSOLE_INFO(F);
|
- LCONSOLE_WARN(F);
|
- LCONSOLE_ERROR(F);
|
- LCONSOLE_EMERG(F);
)
- LBUG();
- }
+ LASSERTF(L, F);

@@
expression L;
@@

-if (L) LBUG();
+LASSERT(L);

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ie0b5b8872004f446253ac7c613c41e07af6b168a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56115
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-17631 tests: move refresh_krb5_tgt() to test-framework.sh 47/54347/2
Sebastien Buisson [Mon, 11 Mar 2024 08:27:15 +0000 (09:27 +0100)]
LU-17631 tests: move refresh_krb5_tgt() to test-framework.sh

refresh_krb5_tgt() is used in multiple test scripts, so move it to
test-framework.sh.

Test-Parameters: trivial kerberos=true testlist=sanity-krb5
Fixes: 478df60923 ("LU-17050 tests: test Kerberos env in sanity-krb5")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I26c5aaf653d332666a08e315425e1befe8cad2b2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54347
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-17588 tests: test_block_soft: set max_diry_mb=1 08/54208/6
Sergey Cheremencev [Wed, 28 Feb 2024 19:19:47 +0000 (22:19 +0300)]
LU-17588 tests: test_block_soft: set max_diry_mb=1

Set max_dirty_mb to 1 during the test in test_block_soft.
This affects 3a, 3b and 3c. Sometimes all written data
could be stored in a cache because tests 3a 3b and 3c
write quite small amount of data - from 4 to 6 MB.
If there was no BRW at OST side, tests would fail with:

  Grace timeout was not set or quota not exceeded

In debug logs from sanity-quota_1g failure have been found
that BRW size at OST sometimes could be 4MB despite of
osc*.*.max_diry_mb set to 1MB. This could be the reason of
failure because the file in 1g has overstriping and one of
OSTs might not reply EDQUOT to the moment of last write.
Set oflag=sync to avoid that.

Test-Parameters: trivial testlist=sanity-quota env=ONLY=3,ONLY_REPEAT=100
Fixes: de352465eb ("LU-17046 tests: fix write success in 1g")
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: I0f430051b3f9f37a0c628ea33e108f9bd42838ed
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54208
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>
3 months agoLU-16904 tests: use 2-component layout in sanity-compr 51/53651/9
Wei Liu [Thu, 11 Jan 2024 20:07:24 +0000 (12:07 -0800)]
LU-16904 tests: use 2-component layout in sanity-compr

Set system with 2-component PFL layout (1 stripe each) to see if
only using a PFL layout is causing any test-script issues.

Allow compr_STRIPEPARAMS/fs_STRIPEPARAMS to change layout instead
of COMPR_EXTRA_LAYOUT for consistency with other test scripts.

Fix issue in setstripe_getstripe funtion to only print layout of given
dir/file

Test-Parameters: trivial testlist=sanity-compr
Test-Parameters: testlist=sanity-compr env=compr_STRIPEPARAMS="-E 64k -c 1 -E eof"
Test-Parameters: testlist=sanity-compr env=compr_STRIPEPARAMS="-E 64k -c 1 -E eof -c 2"
Test-Parameters: testlist=sanity-compr env=compr_STRIPEPARAMS="-E 64k -c 1 -E 1M -c 2 -E eof -c 4 -S 4M"
Signed-off-by: Wei Liu <sarah@whamcloud.com>
Change-Id: I8fa60c104bc69876be8805edbaab1574207d6cc2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53651
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
3 months agoLU-17253 tools: extract lustre logs from cores 47/52947/5
Alexey Lyashkov [Mon, 23 Dec 2024 17:24:40 +0000 (12:24 -0500)]
LU-17253 tools: extract lustre logs from cores

Crash extension to extract lustre logs from crash dumps.

Test-Parameters: trivial
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Change-Id: I20afb41b1cc90923fe68ccb06618ffacc1a8221c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52947
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-8585 tests: update sanity test for subdir mount 66/33666/15
James Simmons [Fri, 20 Dec 2024 18:36:00 +0000 (13:36 -0500)]
LU-8585 tests: update sanity test for subdir mount

Update the sanity test cases to pass when FILESET is set,
instead of skipping them.

Test-Parameters: trivial testlist=sanity
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: Ie5eb429b80dbb89d3ee96515d503c57d107faa57
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/33666
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 months agoLU-8585 test: fix sanity/200 looping breakage 76/57576/5
James Simmons [Mon, 23 Dec 2024 20:17:47 +0000 (15:17 -0500)]
LU-8585 test: fix sanity/200 looping breakage

Create test files in $tdir instead of another directory name
so that run_one_logged() will cleanup the test files after
each iteration when run in a loop.

Change-Id: I9bf8a74990a3ebe65b8d42a55d52a03072b02728
Test-Parameters: trivial testlist=sanity env=ONLY=200,ONLY_REPEAT=250
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57576
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-6142 ptlrpc: Fix style issues for recover.c 83/56483/2
Arshad Hussain [Thu, 19 Sep 2024 09:05:56 +0000 (05:05 -0400)]
LU-6142 ptlrpc: Fix style issues for recover.c

This patch fixes issues reported by checkpatch
for both files lustre/ptlrpc/recover.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ibfeb59ed4cfe01675c43934ffad898e03d130c2f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56483
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: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-6142 mdt: Fix style issues for mdt_internal.h 81/56481/3
Arshad Hussain [Sun, 22 Sep 2024 14:22:52 +0000 (10:22 -0400)]
LU-6142 mdt: Fix style issues for mdt_internal.h

This patch fixes issues reported by checkpatch
for both files lustre/mdt/mdt_internal.h

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I727c59e7b69b57260c1b8b9aacc71e8c3025e0b9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56481
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-15555 tests: fix conf_sanity 110 and 111 70/46570/25
Elena Gryaznova [Fri, 31 May 2024 14:10:55 +0000 (17:10 +0300)]
LU-15555 tests: fix conf_sanity 110 and 111

The large_dir option is in the kernel now. This broke conf_sanity
110 and 111. Block size is not set to 1024 and created names
are not enougth to fill two htree levels.

This patch fixes conf_sanity 110 and 111.

Fixes: 8048e216c1 ("LU-1365 tests: LARGEDIR and 3-level htree for local ldiskfs")
Test-Parameters: trivial testlist=conf-sanity mdssizegb=20 env=SLOW=yes,ONLY="110 111",ONLY_REPEAT=10
Change-Id: I4b5c7b68e1afe7f04a3b1d85c11f505ac43cda54
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-10730
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46570
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18360 zfs-osd: za_name flexible array 56/56656/7
Shaun Tancheff [Fri, 1 Nov 2024 02:39:13 +0000 (10:39 +0800)]
LU-18360 zfs-osd: za_name flexible array

zfs-2.3 commit 3cf2bfa57008af7f0690f73491d7f9b4ac4ed65a
  Allocate zap_attribute_t from kmem instead of stack

za_name maximum size increased to ZAP_MAXNAMELEN_NEW

Ensure zap_attribute_t.za_name space is available and
zap_attribute_t.za_name_len now needs to be initialized
to the allocated space of MAXNAMELEN.

Also mkfs should disable longname support as it would break
MAX_NAME interop.

HPE-bug-id: LUS-12561
Test-Parameters: fstype=zfs
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I6c48c66a42a36ea6816b37ffce7e17f45eed3dbf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56656
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
3 months agoLU-18387 kernel: RHEL 9.5 server support 37/57237/10
Jian Yu [Tue, 10 Dec 2024 20:16:57 +0000 (12:16 -0800)]
LU-18387 kernel: RHEL 9.5 server support

This patch makes changes to support RHEL 9.5 release
with kernel 5.14.0-503.15.1.el9_5 for Lustre server.

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=zfs mdtcount=4 mdscount=2 \
  env=SANITY_EXCEPT="27u 66 120g 398b 413a 413b" \
  clientdistro=el9.5 serverdistro=el9.4 testlist=sanity

Test-Parameters: optional fstype=zfs mdtcount=4 mdscount=2 \
  env=SANITY_EXCEPT="66 413a 413b" \
  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: I08dec00ba898e65453f2157a44616fa20c8a3603
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57237
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18526 ldiskfs: restore el9.4 before [5.14.0-427.42.1.el9_4] 52/57352/3
Shaun Tancheff [Mon, 30 Dec 2024 19:34:36 +0000 (11:34 -0800)]
LU-18526 ldiskfs: restore el9.4 before [5.14.0-427.42.1.el9_4]

5.14.0-427.42.1 includes a ext4 fix for which a common version of
rhel9.4/ext4-delayed-iput.patch is not possible.

Instead we have to provide a fallback series which uses the former
rhel9.1/ext4-delayed-iput.patch

Test-Parameters: trivial clientdistro=el9.4 serverdistro=el9.4
Fixes: 0027b134c4d ("LU-18414 kernel: update RHEL 9.4 [5.14.0-427.42.1.el9_4]")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I00d875678c0546e7363274634eae9b1d57a059cd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57352
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoNew tag 2.16.51 2.16.51 v2_16_51
Oleg Drokin [Fri, 3 Jan 2025 17:42:32 +0000 (12:42 -0500)]
New tag 2.16.51

Change-Id: Ibdf71bdeeb440d5c01236e71b7a144dcfcbdf40e
Signed-off-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18576 obdclass: do not update llog's timestamp each time 10/57510/4
Alex Zhuravlev [Wed, 18 Dec 2024 12:24:14 +0000 (15:24 +0300)]
LU-18576 obdclass: do not update llog's timestamp each time

updating llog's timestamp on every record doesn't makes sense as
we save seconds and introduces performance penalty (upto 15% in
microbenchmark). it should be enough to update it every second.

the results, in msec per record inserted:

32K records into a plain llog:
mtime update: yes no
1 thread 2421 2137
4 threads 1941 1687

120K records into a catalog:
mtime update yes no
1 thread 3007 2765
4 threads 2012 1744

Fixes: e33d196b93 ("LU-17309 llog: set timestamp on llog objects at creation time")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I0178ba7071ce39668550b4faa5e1e86397c8a89d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57510
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: kg.xu <squalfof@gmail.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 months agoLU-18571 nodemap: fix coverity issues in range_create() 88/57488/3
Sebastien Buisson [Mon, 16 Dec 2024 20:04:56 +0000 (21:04 +0100)]
LU-18571 nodemap: fix coverity issues in range_create()

Fix issues found by Coverity in range_create():

CoverityID: 451797 ("Null pointer dereferences")
  Dereferencing a pointer that might be "NULL" "c" when calling
  "strscpy".

CoverityID: 451795 ("Integer handling issues")
  "netmask > 999" is always false regardless of the values of its
  operands. This occurs as the logical operand of "if."

Fixes: 8f6988be44 ("LU-14288 nodemap: Use nidmasks for IPv6 NIDs")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I1a6f85f2c9a3591ddd82ed634e9a87902b2b7d0a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57488
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: Oleg Drokin <green@whamcloud.com>
3 months agoLU-17000 libcfs: quiet Coverity LIBCFS_ALLOC warning 08/57408/2
Andreas Dilger [Thu, 12 Dec 2024 23:14:36 +0000 (16:14 -0700)]
LU-17000 libcfs: quiet Coverity LIBCFS_ALLOC warning

Coverity has a frequent but harmeless warning in LIBCFS_ALLOC_PRE():

    logical_vs_bitwise: The expression
        cptab->ctb_nparts * 4UL /* sizeof (*part->cpt_distance) */ <=
(8192UL /* 2 << 12 */) && 1
  /* ((gfp_t)(0x200000U | 0x400000U) | (gfp_t)64U) &
     (((gfp_t)32U | (gfp_t)524288U) | (gfp_t)4194304U) */
    is suspicious because it performs a Boolean operation on a
    constant other than 0 or 1.

Fix by comparing GFP mask to zero, rather than the whole expression.

There are many similar CIDs, only listing a couple for reference.

Add a Git commit-msg hook check for CoverityID: in commit messages,
and test cases for the same.

Test-Parameters: trivial
CoverityID: 397137 ("Logical vs. bitwise operator")
CoverityID: 397837 ("Logical vs. bitwise operator")
Fixes: 3a92c850b0 ("LU-56 libcfs: NUMA allocator and code cleanup")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4691d9611f752b8a58f3ed1d5e0830b24da39648
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57408
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: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18533 build: fix the common.postinst nonexistence issue 92/57392/2
Jian Yu [Thu, 12 Dec 2024 07:51:30 +0000 (23:51 -0800)]
LU-18533 build: fix the common.postinst nonexistence issue

Since dkms v3.1.3, the common.postinst script was not installed
anymore with the install-redhat target, which caused the following
failure while installing lustre-client-dkms package:

  WARNING: /usr/lib/dkms/common.postinst does not exist.
  ERROR: DKMS version is too old and lustre-client was not
  built with legacy DKMS support.
  You must either rebuild lustre-client with legacy postinst
  support or upgrade DKMS to a more current version.

This patch fixes the above issue by using dkms add, build,
and install commands directly instead of the common.postinst script.

Test-Parameters: trivial
Test-Parameters: optional testgroup=full-dkms

Change-Id: If8a61e33d1ef37388e6de7836c00c3e425c2bdc0
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57392
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18086 sec: fix warning message for insufficient memory 68/57368/3
Sebastien Buisson [Wed, 11 Dec 2024 10:21:00 +0000 (11:21 +0100)]
LU-18086 sec: fix warning message for insufficient memory

If even the very first pool cannot be allocated, then pool_order is 0.
So fix warning message in this case, as reported by Coverity:

CoverityID: 451725 ("Integer handling issues")
   In expression "0x1000UL << pool_order - 1", shifting by a negative
   amount has undefined behavior.  The shift amount, "pool_order - 1",
   is -1.

Fixes: 1a6ae4b3eb ("LU-18086 sec: do not allocate empty pools")
Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I45a8cf45cae3a8ed07b170d852ec5e1d096da656
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57368
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 months agoLU-17679 tests: Disable sanity/851 59/57359/2
Arshad Hussain [Wed, 11 Dec 2024 05:09:13 +0000 (00:09 -0500)]
LU-17679 tests: Disable sanity/851

Disable sanity/851 it is fanotify(monitoring API)
and can be disabled until proper solution.

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I78d45e44035c534fbab8138e031a1a843180cc88
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57359
Reviewed-by: Feng Lei <flei@ddn.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 months agoLU-15420 sec: fix native fscrypt builds 44/57344/2
James Simmons [Mon, 9 Dec 2024 16:08:59 +0000 (11:08 -0500)]
LU-15420 sec: fix native fscrypt builds

The recent changes in libcfs prevents native fscrypt from
building. Replace llcrypt.h with lustre_crypto.h in linux-prim.c
which will build under all conditions. We really only need
llcrypt_[init|exit] for this code. The new symlink fix for
fscrypt also breaks when building native fscrypt. Now 5.9 or
less kernels will build natively and it pass all testing.

Test-Parameters: trivial
Fixes: 209607fd79 ("LU-18096 enc: ll_get_symlink overlay function")
Change-Id: I8230364604992150da5bbfb27a3407e99e212ba6
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57344
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18523 tests: wait statahead thread quit during cleanup 37/57337/2
Qian Yingjin [Mon, 2 Dec 2024 06:10:04 +0000 (14:10 +0800)]
LU-18523 tests: wait statahead thread quit during cleanup

The list pattern statahead can optimize the stat() workload as
follows:
- opendir() will authorize the statahead
- readdir() to get the name and inode number for the dentries
- do stat() on the dentries one by one
- closedir() will deauthorize the statahead
After closedir() is called, the statahead thread will quit.

However, this is not same for fname pattern statahead which
workload is calling stat() on the files in Alphabetic sorting
order of the file name and does not include by opendir/closedir()
call pair.
For a fname pattern statahead, the statahead thread will wait for
a certain time period (30s by default) and it is not quit until
the user is no longer using the directory (traverse and stat) for
this long time.

Thus after fname statahead pattern is enabled by default, we must
wait for stat-ahead thread quit during cleanup. Otherwise, it will
faile sanity/test_65j as follow:
"cln..There are ll_sa thread not exit!"

Test-Parameters: trivial
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I510073c38167fd07fc6343dc14a509754bd1eace
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57337
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18518 ldiskfs: fix LC_SRC_NFS_FILLDIR_USE_CTX check 33/57333/3
Sohei Koyama [Sun, 8 Dec 2024 13:59:39 +0000 (22:59 +0900)]
LU-18518 ldiskfs: fix LC_SRC_NFS_FILLDIR_USE_CTX check

When compiled with clang, these checks always failed, resulting
in lustre device mount being stuck.

Signed-off-by: Sohei Koyama <skoyama@ddn.com>
Change-Id: I7bac750700b791046050964bdcd59c2f05d7d986
Test-Parameters: trivial
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57333
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18129 tests: except sanity-lnet/230 due to failures 14/57314/2
Jian Yu [Thu, 5 Dec 2024 21:15:30 +0000 (13:15 -0800)]
LU-18129 tests: except sanity-lnet/230 due to failures

This patch skips sanity-lnet/230 temporarily until the
issue can be fixed.

Test-Parameters: trivial testlist=sanity-lnet

Change-Id: I9f8d337f1a331583733f6ea48288df1ca4767aa9
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57314
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-11648 mgs: Create white list for CONFIGS directory files 71/57271/3
Artem Blagodarenko [Tue, 3 Dec 2024 10:52:04 +0000 (05:52 -0500)]
LU-11648 mgs: Create white list for CONFIGS directory files

Not all files that are stored in CONFIGS directory should
be processed. For example there are ".bak" files which
created during change_nids operation and used to store
non-modified copy. Currently blacklist is used to process
CONFIGS directory (".bak"s are excluded), but using
whitelist looks more robust.

These files(patterns) should be in the white list:

*-client
*-MDT????
*-OST????
mountdata
nodemap
params
sptlrpc

Test-Parameters: testlist=conf-sanity
Change-Id: I34871fa11d50941450233053446c6c41a1f83048
Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57271
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18504 llite: fix whole-file readahead RPC limit 49/57249/3
Li Dongyang [Tue, 3 Dec 2024 04:46:45 +0000 (15:46 +1100)]
LU-18504 llite: fix whole-file readahead RPC limit

We try to increase whole-file readahead to match RPC size,
by using the connect data from sbi->ll_dt_exp.
But that's not the right location, the lov layer
could not touch/change the ocd_brw_size in connect data,
it stays 64M as the largest possible RPC size,
which could be too large for whole-file readahead.

Introduce a new key KEY_MAX_PAGES_PER_RPC in lov_get_info,
to iterate every osc obd to get max pages per rpc replied
from OST.

After obd_connect in client_common_fill_super, there
are chances that the connect rpc reply hasn't been
processed so the optimal ocd_brw_size replied from server
hasn't been updated yet, delay checking max pages per
rpc to give us a better chance to get the replies from OST.

Bump up SBI_DEFAULT_READAHEAD_WHOLE_MAX to 4M, which is
the same to DT_DEF_BRW_SIZE from osd for now.

Fixes: 627d0133d9 ("LU-7990 llite: increase whole-file readahead to RPC size")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I172bf81ac803971d5f0d50fe00ae4fdfb0d26485
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57249
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-12597 tests: remove comma_list for OSTs part 4 32/57132/4
Andreas Dilger [Wed, 9 Oct 2024 22:43:00 +0000 (16:43 -0600)]
LU-12597 tests: remove comma_list for OSTs part 4

Most places that use $(osts_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
Change-Id: I04509872350987564ca560ad93fdaba0433ebbe5
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57132
Reviewed-by: Timothy Day <timday@amazon.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>
3 months agoLU-18462 nodemap: sanity checks for nodemap_activate 72/57072/6
Sebastien Buisson [Tue, 19 Nov 2024 15:51:25 +0000 (16:51 +0100)]
LU-18462 nodemap: sanity checks for nodemap_activate

Input parameter of 'lctl nodemap_activate' should be checked to return
an error in case of invalid input value. Allowed values are, case
insensitive:
- to activate: 1, on, true, t, yes, y
- to deactivate: 0, off, false, f, no, n
We do not use kstrtobool() to parse the input parameter, as it is too
permissive and looks mostly at the first character only.

Test-Parameters: trivial testlist=sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ifc8528f76af0ff75bfef1febe85dc688af06321d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57072
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>
3 months agoLU-18430 llite: disable readahead on file with random fadvise 12/56912/6
Qian Yingjin [Thu, 7 Nov 2024 03:40:38 +0000 (11:40 +0800)]
LU-18430 llite: disable readahead on file with random fadvise

If a file is advised with random access pattern via posix_fadvise
with POSIX_FADV_RANDOM mode, the client should not trigger
read-ahead on this file.

Add posix_fadvise option 'i' for "multiop".
Add "forceread_pages" stats into llite.*.read_ahead_stats to
account the force read (random) pages.
Add the test case sanity/test_853 to verify it.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ie02ace55985c92abffb871184f847400e9da03ad
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56912
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 months agoLU-12597 tests: remove comma_list for OSTs part 3 09/56909/5
Andreas Dilger [Sat, 9 Mar 2024 21:47:33 +0000 (14:47 -0700)]
LU-12597 tests: remove comma_list for OSTs part 3

Most places that use $(osts_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: I32509872350987564ca560ad93fdaba0433ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56909
Reviewed-by: Timothy Day <timday@amazon.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>
3 months agoLU-12597 tests: remove comma_list for OSTs part 2 85/56885/4
Andreas Dilger [Sat, 9 Mar 2024 21:41:41 +0000 (14:41 -0700)]
LU-12597 tests: remove comma_list for OSTs part 2

Most places that use $(osts_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: I02509872350987564ca560ad93fdaba0423ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56885
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>
3 months agoLU-12597 tests: remove comma_list for OSTs part 1 44/56844/2
Andreas Dilger [Sat, 9 Mar 2024 21:38:35 +0000 (14:38 -0700)]
LU-12597 tests: remove comma_list for OSTs part 1

Most places that use $(osts_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: I01509872350987564ca560ad93fdaba0413ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56844
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>
3 months agoLU-18510 llite: free op_data upon error only when alloc inside 91/57291/3
Qian Yingjin [Sat, 30 Nov 2024 06:48:31 +0000 (14:48 +0800)]
LU-18510 llite: free op_data upon error only when alloc inside

In ll_prep_md_op_data() for preparing md_op_data, it should free
@op_data upon ll_setup_filename() failure only when @op_data is
allocated inside.

Otherwise, it will double free @op_data for the pass-in case and
may cause sanity-sec/63 crash as follows:
ll_prep_md_op_data()) lustre: failed to setup filename: rc = -126
RIP: 0010:set_freepointer.part.57+0x0/0x10
kfree+0x238/0x250
ll_prep_md_op_data+0x2af/0x870 [lustre]
sa_prep_data+0xde/0x350 [lustre]
sa_statahead+0x3b9/0xd20 [lustre]
ll_statahead_thread+0x151f/0x2210 [lustre]

Fixes: 4d38566a004 (LU-13717 sec: filename encryption)
Test-Parameters: testlist=sanity-sec env=ONLY=63,ONLY_REPEAT=250
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ia46635e5bab17e21f4c411e7497e8f70711eb4e4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57291
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18225 kernel: silent page allocation failure in virtio_scsi 44/56644/2
Li Dongyang [Thu, 10 Oct 2024 09:54:25 +0000 (20:54 +1100)]
LU-18225 kernel: silent page allocation failure in virtio_scsi

virtio_scsi uses GFP_ATOMIC to allocate memory, with large
requests sometimes the allocation fails.
We don't need to throw up the allocation error and dump stack
for this as virtio_scsi will return SCSI_MLQUEUE_HOST_BUSY
which translates to BLK_STS_RESOURCE and that will be
handled by upper layers.

Change-Id: I7117711d05794d57ab294f3bc6746de1979afc22
Test-Parameters: trivial
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56644
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Ronnie Sahlberg <rsahlberg@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-12597 tests: clean up comma_list in test-framework 36/56636/4
Andreas Dilger [Sat, 9 Mar 2024 21:56:45 +0000 (14:56 -0700)]
LU-12597 tests: clean up comma_list in test-framework

Start cleaning up callers of comma_list() in test-framework where it
is no longer needed since osts_nodes() and tgts_nodes() already
return a comma-separated list of nodes.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Icae1342f69af4393cc1ece8f92318c6fa03ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56636
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>
3 months agoLU-17501 libcfs: adding X for cpu pattern 17/56617/15
Frederick Dilger [Thu, 3 Oct 2024 22:57:04 +0000 (16:57 -0600)]
LU-17501 libcfs: adding X for cpu pattern

Added 'X' pattern to cpu_pattern such that "X[1]" will remove cpu 1
regardless of what partition it is in.

Using "N X" will set the default NUMA node layout before excluding.
Using "X" without 'N' will set the layout based on npartitions.

This is similarily true for 'C', use 'N' for NUMA layout and not for
an npartitions based layout.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I6276f78ecab401ed106b75ab798e5f805ef19f93
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56617
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18252 llite: do not unplug the queue on each page 49/56449/6
Alex Zhuravlev [Sat, 21 Sep 2024 11:07:22 +0000 (14:07 +0300)]
LU-18252 llite: do not unplug the queue on each page

for sync IO ll_write_end() calls into vvp_io_write_commit() at
every page. this get us to:

/* for sync write, kernel will wait for this page to be flushed
 * osc_io_end() is called, so release it earlier.
 * for mkwrite(), it's known there is no further pages. */
if (cl_io_is_sync_write(io) && oio->oi_active != NULL) {
osc_extent_release(env, oio->oi_active);
oio->oi_active = NULL;
}

ptlrpcd can be quick enough to intercept current (just reset) extent
and start to process that while the original is still continuing.

in the end this can result in suboptimal RPCs.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ie53d0cc7bb52a7ec12b39cfe3da86a623bf03f12
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56449
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 months agoLU-17190 osc: client-side high prio I/O under blocking AST 27/56327/5
Qian Yingjin [Fri, 13 Oct 2023 02:49:34 +0000 (22:49 -0400)]
LU-17190 osc: client-side high prio I/O under blocking AST

We found the following deadlock with parallel DIO:
T1: writer
Obtain DLM extent lock: L1=<PW, [0, EOF]>

T2: parallel DIO reader
- read 50M data, iosize=64M, max_pages_per_rpc=1024(4M)
  max_rpcs_in_flight=8
ll_direct_IO_impl()
- use out all available RPC slots: number of read RPC in flight: 9
- OST side
->tgt_brw_read()
->tgt_brw_lock()
- Server side locking. Try to cancel the conflict lock L1.

T3: reader
- Take DLM lock ref on L1=<PW, [0, EOF]>.
->ll_readpage()
->ll_io_read_page()
->cl_io_submit_rw()
- wait fro RPC slots to send the read RPC to OST
...

deadlock:
- T2 => T3: T2 is waiting for T3 to release DLM lock L1;
- T3 => T2: T3 is waiting for T2 finished to free RPC slots;

To solve this problem, we introduce a client-side high priority
I/O handling mechanism where the extent lock protecting the I/O is
under blocking AST.

It implements as follows:
When received a lock blocking AST and the corresponding lock is in
use (reader and writer count is not zero), it checks whether there
are any I/O (osc_extent) used this lock is outstanding (i.e. wait
for RPC slot). If found, make this kind of I/Os with high
priority and put them into the HP list of the client. Thus the
client will force to send HP I/Os even the available RPC slots
are used out.

This makes I/O engine on OSC layer more efficent.
For normal I/Os, the client needs to iterate over the object list
and send I/O one by one. Moreover, the in-flight I/Os can not
exceed the @max_rpcs_in_flight.

High priority I/Os are put into HP list and will be handled more
quickly. This can avoid possible deadlock caused by parallel DIO
and the client can reponse the lock blocking AST more quickly.

Test-Parameters: testlist=sanity-pcc env=ONLY=99a,ONLY_REPEAT=100 clientdistro=el8.10
Test-Parameters: testlist=sanity-pcc env=ONLY=99a,ONLY_REPEAT=100 clientdistro=el9.3
Test-Parameters: testlist=sanity-pcc env=ONLY=99b,ONLY_REPEAT=100 clientdistro=el8.10
Test-Parameters: testlist=sanity-pcc env=ONLY=99b,ONLY_REPEAT=100 clientdistro=el9.3
Change-Id: I9afe032a79f40d55b800ddb13d8b8e9a3e10ba56
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56327
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-11048 docs: adding missing pool man pages 03/56303/7
Frederick Dilger [Fri, 30 Aug 2024 21:32:26 +0000 (15:32 -0600)]
LU-11048 docs: adding missing pool man pages

Adding lctl-pool_destroy.8, lctl-pool_list.8 and lctl-pool_remove.8.

Test-Parameters: trivial
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I227a85b9703346a7bce4250670002c97c2d37cb8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56303
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>
3 months agoLU-18172: lfsck: umount has to wait lfsck_stop 65/56165/3
Vladimir Saveliev [Tue, 27 Aug 2024 11:02:29 +0000 (14:02 +0300)]
LU-18172: lfsck: umount has to wait lfsck_stop

When called from umount lfsck_stop() should wait if lfsck is already
stopping. Otherwise, continuation of mdt_fini() or ofd_fini() leads to
various failures. Seen so far:
1.
 osd_scrub_cleanup
   LASSERT(dev->od_otable_it == NULL);
 because lfsck_master_engine() has not reached yet
   oit_iops->fini(env, oit_di)
     osd_otable_it_fini
       dev->od_otable_it = NULL;
2.
 lfsck_find_mdt_idx_by_fid
   rc = fld_server_lookup(env, ss->ss_server_fld...
     BUG: unable to handle kernel NULL pointer dereference
 because ss->ss_server_fld is NULL set on
 mdt_fini
   mdt_fld_fini
     ss->ss_server_fld = NULL;

Test for umount while lfsck is stopping is added.

Test-Parameters: trivial testlist=sanity-lfsck env=ONLY=44
HPE-bug-id: LUS-12421
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I527c071d316ba3405f2199125fa7d018c98c403b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56165
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 months agoLU-13720 lfs: resync file if needed before mirror_split() 78/55978/10
Emoly Liu [Tue, 3 Dec 2024 20:24:19 +0000 (04:24 +0800)]
LU-13720 lfs: resync file if needed before mirror_split()

If "lfs mirror delete" is called on a file to delete the only
non-stale mirror of the file, it makes sense from a usability
point of view to automatically resync the stale mirror(s) and
then remove the mirror requested by the user, rather than
returning an error to the user.

Also, sanity-flr.sh test_44a/b and test_211 are modified to verify
this patch. Man pages lfs-mirror-delete.1 and lfs-mirror-split.1
are updated to reflect this change.

Test-Parameters: testlist=sanity-flr env=ONLY="44,211"

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Ice5ef893910e744d235dcb07f1049dfeede65858
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55978
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18109 utils: adding nodemap offset capability 43/55943/20
Maximilian Dilger [Tue, 6 Aug 2024 19:49:28 +0000 (13:49 -0600)]
LU-18109 utils: adding nodemap offset capability

nodemap offset: the ability to add an offset range to nodemaps.
When an offset is defined, idmaps can only be set inside of their
given range. This is defined as:

lctl nodemap_add_offset --name nodemap --offset 100000 --limit 99999

And removed as:

lctl nodemap_del_offset --name nodemap

Test sanity-sec 27ab is added to exercise this new feature.

Signed-off-by: Maximilian Dilger <mdilger@whamcloud.com>
Change-Id: Iba2116d21bc7de1ba03111b0313427301e4b0b50
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55943
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 months agoLU-18087 enc: support encrypted names in changelogs 16/55916/8
Sebastien Buisson [Fri, 2 Aug 2024 13:03:49 +0000 (15:03 +0200)]
LU-18087 enc: support encrypted names in changelogs

In order to support encrypted names in changelogs, we choose to have
the servers directly store the encoded+digested names in the
changelogs. This requires to add some knowledge of encrypted names on
server side, but that choice brings a number of benefits:
- as servers are storing changelog records, they have access to the
  files' flags and can find out if files are encrypted or not. This
  would not be possible on client side when reading changelogs,
  because corresponding files might even no longer exist.
- no modifications are needed on client side, either in the kernel or
  in userspace. As the API remains untouched, this is completely
  transparent to applications that are consuming changelogs.

The file names retrieved from the changelogs are identical to the
names displayed when listing directories without the encryption key.
If names are not encrypted, they remain unchanged. If names are
encrypted, their digested+encoded form is presented.

Add sanity-sec test_73 to exercise this code.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: If0de4bfa210f9067a7a934ac74863a77b19482db
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55916
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 months agoLU-928 misc: fix typos in comments 62/54862/4
Sohei Koyama [Mon, 22 Apr 2024 00:55:17 +0000 (09:55 +0900)]
LU-928 misc: fix typos in comments

Fix typo obejct -> object.

Test-Parameters: trivial
Signed-off-by: Sohei Koyama <skoyama@ddn.com>
Change-Id: I4ab626ca188166e439191450b48e394243116bef
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54862
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
3 months agoLU-17668 ptlrpc: create env in few more threads 42/54642/32
Alex Zhuravlev [Mon, 1 Apr 2024 11:37:32 +0000 (14:37 +0300)]
LU-17668 ptlrpc: create env in few more threads

like evict thread, pinger, mount process.  This avoids cases
where there is no lu_env found for a thread:

  mdt_dom_lvbo_update()) ASSERTION( env ) failed

yet another case is when MDT destroys exports - we don't need to
re-allocate a new env (including thread infos for every layer) for
each export being destroyed.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iff7b757ad34063a3596a34998489cc3c635a02d2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54642
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-10499 utils: add pcc pin/unpin commands 60/54460/7
Lei Feng [Tue, 19 Apr 2022 00:32:47 +0000 (20:32 -0400)]
LU-10499 utils: add pcc pin/unpin commands

Store pin information in xattr trusted.pin.
Add lfs pcc pin/unpin commands to set/clear pcc pin flag.
A pcc-pinned file will not be removed from local storage
cache by lpcc_purge automatically.

Examples of xattr trusted.pin:
trusted.pin=[hsm: 2]
trusted.pin=[hsm: 2,hsm: 3]

EX-bug-id: EX-5113
Change-Id: I17ddf5ac8dc4eae48c0f6bdd0f2a19240474b0f5
Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial testlist=sanity-pcc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54460
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-10499 sec: support of PCC-RO for encrypted files 59/54459/14
Sebastien Buisson [Mon, 20 Dec 2021 16:41:56 +0000 (17:41 +0100)]
LU-10499 sec: support of PCC-RO for encrypted files

In order to support PCC-RO for encrypted files, we decide to store
in PCC the ciphertext version of the Lustre files. We proceed to
decryption of PCC files only in the page cache, so cleartext is just
in memory. When a Lustre file is detached from PCC, or when the
encryption key is removed, we trash those PCC page cache pages.

As PCC files contain ciphertext, their sizes are aligned on
LUSTRE_ENCRYPTION_UNIT_SIZE instead of being lustre inode's clear
text size. In order to keep track of Lustre files' actual sizes,
we use a dedicated xattr on the PCC files. Its value is set at pcc
attach time, which is fine for PCC-RO.

Also add sanity-pcc test_21j to exercise this.

EX-5427 sec: fix pcc detach of encrypted file

In case of 'lfs pcc detach' of an encrypted file, its page cache
pages must be trashed as they might contain cipher text because
of the pcc file being detached.

Improve sanity-pcc test_21j to exercise this use case.
Was-Change-Id: Ice13c5b4205c074d9b46e2175d18f8743dbe9c58

EX-bug-id: EX-4182 EX-5427
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Id7d96adb4eb4770c813a042acf7ed6c42224b9bf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54459
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-14291 ofd: merge ost module into ofd 93/53993/6
James Simmons [Mon, 16 Dec 2024 16:55:24 +0000 (11:55 -0500)]
LU-14291 ofd: merge ost module into ofd

The ost module is very small and its very similar to the mds class
which is embedded in the mdt module. We can do the same thing with
the ost module. Merge it into the ofd module.

Test-Parameters: trivial
Change-Id: I1f7c44893d41ec8fc03113400a02b5076a07fbbe
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53993
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-16897 idl: add OBD_CONNECT2_SPARSE flag 04/55404/8
Cyril Bordage [Mon, 26 Aug 2024 12:05:41 +0000 (14:05 +0200)]
LU-16897 idl: add OBD_CONNECT2_SPARSE flag

This flag indicates when a client can handle sparse reads without
sending blank pages.

Test-Parameters: trivial
Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: I5e510deaace86558990479351074ad8f47876212
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55404
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-6142 contrib: update checkpatch.pl to 6.13-rc3 88/57388/2
Timothy Day [Thu, 12 Dec 2024 06:03:32 +0000 (01:03 -0500)]
LU-6142 contrib: update checkpatch.pl to 6.13-rc3

Update checkpatch.pl to the latest version. Notably, this version
drops the requirement for special comment style in net/. Lustre/LNET
will follow suit by also dropping this requirement.

Update the lustre-checkpatch.patch to match.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I6d9804965666e09196fb5f17b595914de1a5a109
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57388
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-6142 obdclass: SPDX for OBD Class 51/57351/2
Timothy Day [Tue, 10 Dec 2024 04:39:40 +0000 (23:39 -0500)]
LU-6142 obdclass: SPDX for OBD Class

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ieaa62c9f4177abdeae18e55e5c8ce6dc638a8918
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57351
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>
3 months agoLU-17906 ptlrpc: reduce time for connection switch 34/57234/3
Mikhail Pershin [Wed, 27 Nov 2024 09:11:13 +0000 (12:11 +0300)]
LU-17906 ptlrpc: reduce time for connection switch

If connection peer is not ready then reduce request
timeout for it to 1s, switching all imports connections
faster until some is ready

If connection status become ready after not-ready, try
it first to connect

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I87f2359f3a767ea9e52ce9da4cd5cf9b42b56320
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57234
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 months agoLU-18483 ldlm: serialize parallel lock res change requests 10/57110/2
Andrew Perepechko [Fri, 22 Nov 2024 17:05:36 +0000 (20:05 +0300)]
LU-18483 ldlm: serialize parallel lock res change requests

If parallel ldlm_lock_change_resource() calls race in a certain
way, the old resource can be released multiple times leading to
memory corruption.

The fix detects such race condtions after locking and restarts
the replace procedure if needed.

Change-Id: I742a8dde0ab4c63517c02c2e8e1bdfe402b331b4
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
HPE-bug-id: LUS-12212
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57110
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-18224 o2ib: normalize in-kernel-ko2iblnd.ko name 66/56366/8
Shaun Tancheff [Wed, 2 Oct 2024 05:00:36 +0000 (12:00 +0700)]
LU-18224 o2ib: normalize in-kernel-ko2iblnd.ko name

in-kernel-ko2iblnd module should be named as ko2iblnd.

Also make it easier to identify in-kernel vs external
ko2ibldn driver with modinfo.

Module version should also include the ofed version provided
by ofed_info -n if it is available.

Test-Parameters: trivial
Fixes: 8b1d2a72f1 ("LU-16967 build: Add in-kernel-ko2iblnd driver")
HPE-bug-id: LUS-12525
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Iab1c0502724a3bcf91ef7c62e7ae9ee23f2ccff6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56366
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Caleb Carlson <caleb.carlson@hpe.com>
3 months agoLU-18218 llog: catalog lgh_lock refactoring 41/56341/12
Alexander Boyko [Thu, 26 Sep 2024 22:40:50 +0000 (18:40 -0400)]
LU-18218 llog: catalog lgh_lock refactoring

-call down_read for list processing, and don't use it for
 single pointer reading.
-pass catalog flags to plain log.

llog_osd_prev_block() does not read from the end of file to
the beggining, and duplicates llog_osd_next_block.
tail->lrh_len was used without swabbing, it is an error.

Fixes llog_client error processing, according to llog_osd_next_block
EIO -> EBADR change.

It fixes test_135 race where only one record at llog. A cancel
happens before ENOSPC, a llog stays empty at catalog and could not be
deleted.

Fixes: 1a24dcdce121 ("LU-15938 lod: prevent endless retry in recovery thread")
HPE-bug-id: LUS-11970
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I353b3f291f2de65924f90650a400333a747a4f74
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56341
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 months agoLU-6142 libcfs: SPDX for libcfs headers 98/56298/3
Timothy Day [Sun, 8 Sep 2024 15:56:00 +0000 (11:56 -0400)]
LU-6142 libcfs: SPDX for libcfs headers

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I84d166e5d37b1d29d968ca21683cc4047bde166d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56298
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>