Whamcloud - gitweb
fs/lustre-release.git
22 hours agoLU-17744 ldiskfs: mballoc stats fixes 72/54772/3 master
Alexander Zarochentsev [Sun, 31 Mar 2024 20:21:56 +0000 (20:21 +0000)]
LU-17744 ldiskfs: mballoc stats fixes

Change mballoc statistics to use correct
allocation loop ids.

Fixes: 95f8ae56774 ("LU-12103 ldiskfs: don't search large block range if disk full")
HPE-bug-id: LUS-11936
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I892ead5355865ec9c07fdc758e127c711b42cb1b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54772
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>
22 hours agoLU-17724 gss: fix bad use of user buffer in rsi upcall 30/54730/3
Sebastien Buisson [Thu, 11 Apr 2024 06:58:19 +0000 (08:58 +0200)]
LU-17724 gss: fix bad use of user buffer in rsi upcall

Use the proper kernel buffer to print message out when
upcall_cache_set_upcall() returns an error.

Fixes: 2153e86541 ("LU-17497 obdclass: check upcall incorrect values")
Test-Parameters: trivial
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ice781b4506822f1fd4ce0a062ce742f51e366525
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54730
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
22 hours agoLU-17717 tests: skip sanity-lnet/252 for interop 07/54707/4
Alex Zhuravlev [Tue, 9 Apr 2024 10:14:01 +0000 (13:14 +0300)]
LU-17717 tests: skip sanity-lnet/252 for interop

as the subtest fails finding the memory leak which has been
fixed recently.

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ide80e0b39a053a2774804b025306ebdb1fc964a8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54707
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
22 hours agoLU-17713 mdd: validate the length of mdd append_pool name 91/54691/6
Emoly Liu [Wed, 10 Apr 2024 09:18:03 +0000 (09:18 +0000)]
LU-17713 mdd: validate the length of mdd append_pool name

Validate the length of mdd append_pool name (<= LOV_MAXPOOLNAME)
before saving it in function append_pool_store().
Also, sanity.sh test_27M is improved a little to verify this fix.

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Id7083fab60e9a18af4d8eedfa3d55f37544ba15d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54691
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: Zhenyu Xu <bobijam@hotmail.com>
22 hours agoLU-17297 tests: recovery-small_156 interop check 46/54646/3
Sergey Cheremencev [Mon, 1 Apr 2024 19:31:15 +0000 (22:31 +0300)]
LU-17297 tests: recovery-small_156 interop check

Don't start recovery-small_156 "tot_granted miscount
after client eviction" with OSTs less than 2.15.60.

Test-Parameters: trivial testlist=recovery-small env=ONLY=156 serverversion=2.15
Fixes: 9df01eee75 ("LU-17297 grant: move tgt_grant_sanity_check() calls")
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: I800ac435dcba267b9a60a919d007428bb8af7f90
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54646
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
22 hours agoLU-17692 flock: get extra reference for lockd 22/54622/5
Yang Sheng [Thu, 28 Mar 2024 19:54:06 +0000 (03:54 +0800)]
LU-17692 flock: get extra reference for lockd

We should get local locking first for GETLK. Else
the lock_owner could be released while working with
lockd.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I56e4204e315c2bdbc496b7961519ae45ab1820fe
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54622
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 hours agoLU-17688 ofd: access log to release chardev 06/54606/6
Alex Zhuravlev [Thu, 28 Mar 2024 11:35:59 +0000 (14:35 +0300)]
LU-17688 ofd: access log to release chardev

due to missing put_device() OFD access log leaks number of structures.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I36109738201b98025bbd2e6ed7c8830044e505c2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54606
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
22 hours agoLU-17684 mdt: lprocfs_mdt_open_files_seq_open() leaks op_data 91/54591/7
Alex Zhuravlev [Wed, 27 Mar 2024 18:54:01 +0000 (21:54 +0300)]
LU-17684 mdt: lprocfs_mdt_open_files_seq_open() leaks op_data

op_data is allocated in single_open() and paired single_close()
is supposed to free it, but instead seq_release() was used.

same for ldlm_granted_fops.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I91846ea7a2c896cb57b878905db4f3630939a652
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54591
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
22 hours agoLU-17672 ldiskfs: release s_mb_prealloc_table 53/54553/10
Alex Zhuravlev [Mon, 25 Mar 2024 07:14:46 +0000 (10:14 +0300)]
LU-17672 ldiskfs: release s_mb_prealloc_table

at umount

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I0a5cbf646c9bd73461691c49c6e7a509acd5a500
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54553
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: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
22 hours agoLU-17650 gss: fix use out of bounds in ptlrpc_gss 52/54452/6
Oleg Drokin [Tue, 19 Mar 2024 03:10:13 +0000 (23:10 -0400)]
LU-17650 gss: fix use out of bounds in ptlrpc_gss

KASAN highlighted that the sockaddr_un struct is not enough
for the kernel primitives we use, so we have to use the
bigger sockaddr_storage for allocation, alas the field
names inside are different so we have to jump through some
hoops to make it actually work.
Also for a 128 byte allocation on stack variable is fine and
cannpot fail, so convert to that

Change-Id: I2292900b54756bf39530c96f7c5c228835562bef
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54452
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
22 hours agoLU-17630 osc: add cond_resched() to osc_lru_shrink() 46/54346/6
Alex Zhuravlev [Mon, 11 Mar 2024 07:42:24 +0000 (10:42 +0300)]
LU-17630 osc: add cond_resched() to osc_lru_shrink()

osc_lru_shrink() may need to handle lots of pages and this way
can block scheduling for long. add couple cond_resched() to
prevent kernel warnings and other thread's starvation.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I862c568ac777c0b929a1ffb61e246b079aee6718
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54346
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
22 hours agoLU-17000 utils: Fix do_warn_interval resource leak 30/54330/8
Arshad Hussain [Fri, 8 Mar 2024 10:12:26 +0000 (15:42 +0530)]
LU-17000 utils: Fix do_warn_interval resource leak

In function do_warn_interval 'fd' opened was not closed
in case write() returned error. This leak is fixed by
calling close() before returning

This patch also checks the return from futimens() and
logs an error in case it fails

CoverityID: 415056 ("Resource leak")
Fixes: a454c9efd8 (LU-17137 utils: Deprecate l_getidentity 'files' alias)
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ice0269d524e237a4fc421b2a91d8f26b5e41b13f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54330
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
22 hours agoLU-8130 nrs: for TBF nid handling using rhashtables 93/54193/7
James Simmons [Wed, 27 Mar 2024 17:21:37 +0000 (11:21 -0600)]
LU-8130 nrs: for TBF nid handling using rhashtables

While looking at the nrs code for lnet_nid_t I saw TBF was not
using struct lnet_nid. For the first step to support large NIDs
I moved the current use of cfs_hash to rhashtables. This doesn't
complete IPv6 support but its a first step since the rhashtable
can use large NIDs. Next step will be updating tr_nids handling.

With this port I found the refcount handling to be incorrect.
Before this work I saw in the debug logs

Busy TBF object from client with NID 0@lo, with -1073741824 refs

and nrs_tbf_res_put() never cleans up struct nrs_tbf_client until
the filesystem is unmounted. With this patch we do cleanup
each nrs_tbf_client after we are done with policy. With this being
the case nrs_tbf_nid_hop_exit() should be called unless something
is wrong.

Test-Parameters: trivial testlist=sanityn
Change-Id: Iab69a16c12ed89f0694af7bcfe9158f468838ca4
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54193
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 hours agoLU-17422 clio: use page pools for UDIO/hybrid 70/53670/17
Patrick Farrell [Wed, 27 Mar 2024 21:45:02 +0000 (17:45 -0400)]
LU-17422 clio: use page pools for UDIO/hybrid

This moves unaligned/hybrid IO to using page pools.  This
reduces the time spent in memory allocation while doing IO
to near zero, at least in simple tests.

This should close most of the performance gap between
udio/hybrid and regular DIO for reads, taking them from
~13 GiB/s to close to 20 GiB/s.  This should also scale as
DIO performance improves.

The improvement for writes is much more limited, because
UDIO writes do not have parallel data copy yet.  This will
improve UDIO write performance by perhaps 10-20%, so from
~2.5 GiB/s to ~3.0 GiB/s, very roughly.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I0cb8b5881bf2885a926383291f67fa252b56574f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53670
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
22 hours agoLU-17422 osc: Clear PageChecked on bounce pages 65/53865/10
Patrick Farrell [Wed, 27 Mar 2024 21:44:47 +0000 (17:44 -0400)]
LU-17422 osc: Clear PageChecked on bounce pages

When we're finalizing a bounce page, we must clear
PageChecked.  Otherwise, if it's a page pool page, it will
be reused without the full wipe the kernel gives it, and we
will see PageChecked on pages which are not actually from
encryption and will handle them incorrectly.

Fixes: f3fe144b85 ("LU-15003 sec: use enc pool for bounce pages")
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I8b319e7ba55dd883d74db79a19bf93b6f125616a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53865
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
22 hours agoLU-17422 obdclass: rename sptlrpc pool and move init 69/53669/14
Patrick Farrell [Wed, 27 Mar 2024 21:44:15 +0000 (17:44 -0400)]
LU-17422 obdclass: rename sptlrpc pool and move init

This patch completes the move of the pools code to obd by
renaming the sptlrpc pool to obd, and moves the pool init
and cleanup to obd.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I9164601745c8faf19559216f55ea5df4e2e226fe
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53669
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
22 hours agoLU-17422 obdclass: rename ptlrpc_page_pool 68/53668/14
Patrick Farrell [Wed, 27 Mar 2024 21:41:21 +0000 (17:41 -0400)]
LU-17422 obdclass: rename ptlrpc_page_pool

This patch renames the ptlrpc page pool to reflect its new
place in obd.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I67aa5f3eef26b5fb890e62bced837bea9dd032c6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53668
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
22 hours agoLU-17422 obdclass: move page pools to obdclass 67/53667/14
Patrick Farrell [Wed, 27 Mar 2024 21:34:09 +0000 (17:34 -0400)]
LU-17422 obdclass: move page pools to obdclass

This patch starts the process of moving page pools to
obdclass by moving the file and making the changes necessary
to compile and run Lustre with the file moved.

This does not rename anything in the file yet, that will be
done in subsequent patches.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Iff39dd9ddfb105773f8eafa4754d32189067189b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53667
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 hours agoLU-17550 lov: check for empty layout on DIO 77/54077/7
Patrick Farrell [Mon, 1 Apr 2024 15:28:49 +0000 (11:28 -0400)]
LU-17550 lov: check for empty layout on DIO

When a write crosses from an area of a file with a layout to
one without, the write should return ENODATA.  Due to layout
caching in the direct IO path, we need an extra check for
this to work correctly for DIO.

Fixes: 14db1faa0f ("LU-13799 lov: Cache stripe offset calculation")
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Ib9a40dab7939d9420144ecaa7460625d6184aa0b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54077
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 hours agoLU-17533 llite: call merge attr on all writes 16/54016/9
Patrick Farrell [Wed, 13 Mar 2024 14:45:44 +0000 (10:45 -0400)]
LU-17533 llite: call merge attr on all writes

Because DIO writes do not update the inode size during the
write, when a file is closed and the LSOM update is sent,
the file size provided by the client is incorrect.

DIO writes don't cause consistency problems because ls and
other things which check the file size will get the correct
size and update the inode size then, but that just means
this issue isn't fatal - DIO should still update the inode
size.

This is best done by calling ll_merge_attr on all writes at
the end of the write, rather than just for async writes in
vvp_io_write_commit.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I856b319254ad7093e69e41613120e06b71f656cc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54016
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: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 hours agoLU-16736 quota: set revoke time to avoid endless wait 26/50626/8
Hongchao Zhang [Wed, 20 Mar 2024 05:37:22 +0000 (13:37 +0800)]
LU-16736 quota: set revoke time to avoid endless wait

The revoke time of the lquota entry should be set when its qunit
reaches least qunit, but it could not be set in some rare case,
which could be related to the broken quota LDLM lock, set it in
"qmt_acquire" to avoid endless wait in QSD.

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ib68c5dc881346e0e619d43553ee490847ae5e225
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50626
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: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
22 hours agoLU-16623 tests: ignore sanity-pfl stripe-count off-by-1 78/54778/6
Andreas Dilger [Sun, 14 Apr 2024 05:54:24 +0000 (23:54 -0600)]
LU-16623 tests: ignore sanity-pfl stripe-count off-by-1

In some cases the MDS may not create all stripes on a file, if the
MDT-OST connection does not have precreated objects.  This is OK,
so the tests should not fail the stripe-count check if trying to
create a fully-striped file and one of the stripes is missing.

Test-Parameters: trivial testlist=sanity-flr
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie482fdf86f82e7a2292c021761885249a6c551f1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54778
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 hours agoLU-17269 obdclass: fix locking for class_register/deregister 47/54747/7
Timothy Day [Thu, 11 Apr 2024 17:56:54 +0000 (17:56 +0000)]
LU-17269 obdclass: fix locking for class_register/deregister

Prevent registration and deregistration from racing with
each other. Otherwise, we could see a crash.

Test-Parameters: testlist=conf-sanity env=ONLY=41c,ONLY_REPEAT=30
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I4d512dcc8778c5116c1d6037ed2b7f486a7bc0dc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54747
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
22 hours agoLU-13374 mdd: fix close time update race with set-in-past 50/54450/8
Vitaly Fertman [Mon, 18 Mar 2024 21:33:25 +0000 (00:33 +0300)]
LU-13374 mdd: fix close time update race with set-in-past

Do not update mtime on close if ctime is not increased.

Save the time when atime was last changed, in case this is
set-in-past, to not lose it on a later LSOM update on close.

HPE-bug-id: LUS-12186
Fixes: d2f7cb7934a0 ("LU-12026 mdt: MDS stores atime|mtime|ctime")
Signed-off-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Change-Id: I070578a30f9bf548eec18a34ba6a06f1cb16909e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54450
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Nikitas Angelinas <nikitas.angelinas@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
22 hours agoLU-6142 lnet: SPDX for lnet/include/ and misc files 51/54251/2
Timothy Day [Sat, 2 Mar 2024 22:00:47 +0000 (22:00 +0000)]
LU-6142 lnet: SPDX for lnet/include/ and misc files

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Iad6b111df015cbe524ff0cad9f2a2efc446c2692
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54251
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>
22 hours agoLU-12452 lnet: allow to set IP ToS value per-NI 81/54081/6
Etienne AUJAMES [Fri, 16 Feb 2024 17:19:47 +0000 (18:19 +0100)]
LU-12452 lnet: allow to set IP ToS value per-NI

This patch allows to set the IP "Type of Service" value per network
interface to use IP QoS on TCP or RoCE network.

e.g:
$ lnetctl add --net tcp2 --if eth1 --tos 104

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I99fad41f4b12951c0d09ad7460ff0ed107e7ce0a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54081
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 hours agoLU-6142 mdd: Fix style issues for mdd_object.c 76/54076/3
Arshad Hussain [Fri, 16 Feb 2024 10:36:34 +0000 (16:06 +0530)]
LU-6142 mdd: Fix style issues for mdd_object.c

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ie7ce393116ceb554e95c752739552fae29ada9a9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54076
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>
22 hours agoLU-17440 lnet: prevent errorneous decref for asym route 96/53896/16
Gian-Carlo DeFazio [Thu, 29 Feb 2024 00:44:48 +0000 (16:44 -0800)]
LU-17440 lnet: prevent errorneous decref for asym route

The following stack trace was seen on a lustre server:
Call Trace TBD:
[<0>] libcfs_call_trace+0x6f/0xa0 [libcfs]
[<0>] lbug_with_loc+0x3f/0x70 [libcfs]
[<0>] lnet_destroy_peer_ni_locked+0x44d/0x4e0 [lnet]
[<0>] lnet_handle_find_routed_path+0x86c/0xee0 [lnet]
[<0>] lnet_select_pathway+0xb95/0x16c0 [lnet]
[<0>] lnet_send+0x6d/0x1e0 [lnet]
[<0>] lnet_parse_local+0x3ed/0xdd0 [lnet]
[<0>] lnet_parse+0xd7d/0x1490 [lnet]
[<0>] kiblnd_handle_rx+0x30e/0x900 [ko2iblnd]
[<0>] kiblnd_scheduler+0x104b/0x10d0 [ko2iblnd]
[<0>] kthread+0x14c/0x170
[<0>] ret_from_fork+0x1f/0x40

It was discovered that the lnet routes between the server
and a client cluster were misconfigured, so that the clients
had routes to the server through all 8 available routers,
but the server had routes to the clients through only 7 of
the routers.

The server was contacted by a client node through the
router with the missing route. It incremented the ref count
for the corresponding struct lnet_peer_ni for that router,
but then, because it had no route through that peer, changed
the value of the struct lnet_peer_ni to a peer with a route
back to the client. It then decremented the new
struct lnet_peer_ni which resulted in the ref count being
decremented to 0 which caused an LBUG.

Detect if the peer is a router to the appropriate net.
If so, decrement its ref count at the end of the function,
if not, decrement its ref count immediately.

Fixes: 2e27193 ("LU-17062 lnet: Update lnet_peer_*_decref_locked usage")
Test-Parameters: testlist=sanity-lnet mdscount=1 osscount=2 clientcount=1
Signed-off-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Change-Id: I2d00faef60ae8768afa7afbb1b00a62ba90535bb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53896
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
22 hours agoLU-17638 utils: break up Netlink error handling 12/54412/27
James Simmons [Tue, 9 Apr 2024 17:23:44 +0000 (13:23 -0400)]
LU-17638 utils: break up Netlink error handling

In the current code when function yaml_netlink_msg_complete()
calls yaml_netlink_msg_error() the arg becomes NULL. So break
up yaml_netlink_msg_error() into two functions. One called by
the netlink err callback and the other called directly by
yaml_netlink_msg_complete(). Also change the libyaml
read_handler_data to yaml_parser itself since its life cycle
is outside the library itself so no chance of it disappear on
us while executing library code.

Fixes: d3ef8f6 ("LU-9680 lnet: add NLM_F_DUMP_FILTERED support")
Test-Parameters: trivial testlist=sanity-lnet
Change-Id: Iacb1e9c8929cd8a78a14580d909f94f2569fa5a3
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54412
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 hours agoLU-17218 ofd: improve filter_fid upgrade compatibility 98/52798/8
Bobi Jam [Mon, 23 Oct 2023 07:29:07 +0000 (15:29 +0800)]
LU-17218 ofd: improve filter_fid upgrade compatibility

filter_fid could be expanded in later Lustre version, and with
upgrade then downgrade process, the filter_fid EA on disk
could has been expanded during upgrade, and won't work after
the downgrade.

This patch improves this process by allocating bigger buffer to
hold the expanded filter_fid EA then trims the unrecognizable
fileds off.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I4c99f1d9f3962d46ebf9e9b799988ff3dba4f919
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52798
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: Qian Yingjin <qian@ddn.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
22 hours agoLU-13802 ptlrpc: correctly remove inflight request 99/54099/8
Patrick Farrell [Wed, 13 Mar 2024 14:46:12 +0000 (10:46 -0400)]
LU-13802 ptlrpc: correctly remove inflight request

When removing a request from the active set on error, we
must also remove it from "inflight" or we will not reduce
inflight as needed and hang on cleanup.

This bug has been latent for some time, but running sanity
414 with hybrid IO tends to trigger it.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Ib73980724f6e2f5a74400a39840df2e8835a6e23
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54099
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
22 hours agoLU-13802 llite: add fail loc to force bio-dio switch 93/52593/25
Patrick Farrell [Mon, 1 Apr 2024 15:28:28 +0000 (11:28 -0400)]
LU-13802 llite: add fail loc to force bio-dio switch

This adds a fail loc to force switching from BIO to DIO.

Test-Parameters: trivial
Test-Parameters:testlist=sanity env=ONLY=119j,ONLY_REPEAT=50
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Icba303c32a86170af08a78c6b306db08e8ed6047
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52593
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>
22 hours agoLU-13814 osc: add osc transient page ops 77/52077/19
Patrick Farrell [Fri, 23 Feb 2024 16:05:11 +0000 (11:05 -0500)]
LU-13814 osc: add osc transient page ops

As part of gradually removing cl_pages for transient pages,
create a special set of OSC page operations for them.

This makes it easier to see what's left for transient pages
and focus on removing that.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I20bbe7535e8df223ec1fff9b940b3063fcc3f8d7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52077
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
22 hours agoLU-13814 clio: Remove owner for transient pages 76/52076/20
Patrick Farrell [Thu, 28 Mar 2024 03:05:44 +0000 (23:05 -0400)]
LU-13814 clio: Remove owner for transient pages

Removing cl_page ownership is another step in removing
cl_page for transient/DIO pages.  This disables all of the
ownership related functionality for transient pages.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I7f1776284d7cd14bdab89290adcc27e3c73416ec
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52076
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
22 hours agoLU-13814 clio: add io to cio_submit 75/52075/21
Patrick Farrell [Fri, 23 Feb 2024 16:02:35 +0000 (11:02 -0500)]
LU-13814 clio: add io to cio_submit

cp_owner is going away for transient pages, so we need to
remove its usage to find the top level IO.  Here that means
passing the IO down through a few layers.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I7fac0e53a7831247b846261c1c734c9d6e43a7d2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52075
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
22 hours agoLU-10215 tests: remove disk2_4 disk2_5 images 81/47281/4
Andreas Dilger [Thu, 4 Apr 2024 03:36:24 +0000 (21:36 -0600)]
LU-10215 tests: remove disk2_4 disk2_5 images

Remove the old disk2_4-*.tar.bz2 and disk2_5-ldiskfs.tar.bz2
images from the Git repo.  The disk2_5 image was never included into
testing due to an oversight in Makefile.am, and adding it to testing
is unlikely to be of any practical value as these releases are both
more than 10 years old and very unlikely to have any users that would
actually want to upgrade their systems at this point.

Test-Parameters: trivial
Test-Parameters: testlist=conf-sanity env=ONLY=32 mdscount=1 mdtcount=1
Test-Parameters: testlist=conf-sanity env=ONLY=32 mdscount=2 mdtcount=4
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I76a42eb90c3e1198d33783f3089ac30462429ac4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47281
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>
9 days agoLU-17705 ptlrpc: replace synchronize_rcu() with rcu_barrier() 69/54669/5
Alex Zhuravlev [Thu, 4 Apr 2024 08:14:10 +0000 (11:14 +0300)]
LU-17705 ptlrpc: replace synchronize_rcu() with rcu_barrier()

synchronize_rcu() does not wait for in-flight rcu callback completion,
thus kmem_cache_free() can still race with kmem_cache_destroy().

Fixes: a9411a9856a ("LU-17076 nrs: wait for RCU completion")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I2da668c06b532a41c8ce2fe681ea17cf6f3013ef
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54669
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: James Simmons <jsimmons@infradead.org>
9 days agoLU-16904 tests: Fix sanity test 56a and 65a when PFL layout is used 44/54644/3
Wei Liu [Mon, 1 Apr 2024 17:51:56 +0000 (10:51 -0700)]
LU-16904 tests: Fix sanity test 56a and 65a when PFL layout is used

Fix sanity test_56a to use correct operator order
Skip sanity test_65a if PFL layout is set since it is a test of
directory with no stripe info

Test-Parameters: trivial testlist=sanity-compr env=ONLY="56a 65a",compr_STRIPEPARAMS="-E 1M -c1 -E eof"
Test-Parameters: testlist=sanity-compr env=ONLY="56a 65a",compr_STRIPEPARAMS="-E 64k -c 1 -E eof"
Test-Parameters: testlist=sanity-compr env=ONLY="56a 65a",compr_STRIPEPARAMS="-E 64k -c 1 -E eof -c 2"
Test-Parameters: testlist=sanity-compr env=ONLY="56a 65a",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: I0c17a0aceed7894f4eefa7336bd4a11e8fd7bc9e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54644
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
9 days agoLU-15552 tests: skip bad result in sanity-flr test_0d 23/54623/3
Alexandre Ioffe [Fri, 29 Mar 2024 05:18:55 +0000 (22:18 -0700)]
LU-15552 tests: skip bad result in sanity-flr test_0d

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

Test-Parameters: trivial testlist=sanity-flr env=ONLY=0d
Test-Parameters: trivial testlist=sanity-flr env=ONLY=0d clientversion=2.14
Signed-off-by: Alexandre Ioffe <aioffe@ddn.com>
Change-Id: I0df94eea9fd11ca3f74a7df47b77de1de76c4066
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54623
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
9 days agoLU-16500 utils: 'lfs migrate' should select new OSTs 00/54600/4
Andreas Dilger [Thu, 28 Mar 2024 03:18:56 +0000 (21:18 -0600)]
LU-16500 utils: 'lfs migrate' should select new OSTs

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

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

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

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

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

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

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

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

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

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

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I783a6b67508a4497d18db94b5d2bdab616b4ade5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54547
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 days agoLU-17431 ost: add ioctl handler for oss 05/54505/7
Sebastien Buisson [Wed, 20 Mar 2024 08:24:30 +0000 (09:24 +0100)]
LU-17431 ost: add ioctl handler for oss

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

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I90f4c6988bed2ba721e366ae088983958d484a2f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54505
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 days agoLU-17431 mdt: add ioctl handler for mds 04/54504/7
Sebastien Buisson [Wed, 20 Mar 2024 08:20:52 +0000 (09:20 +0100)]
LU-17431 mdt: add ioctl handler for mds

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

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I6a68a17d3f12c799238a93242bbd385e6eeb1d0b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54504
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 days agoLU-17431 ptlrpc: move nodemap related ioctls to ptlrpc 02/54502/6
Sebastien Buisson [Tue, 19 Mar 2024 16:04:20 +0000 (17:04 +0100)]
LU-17431 ptlrpc: move nodemap related ioctls to ptlrpc

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

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I7a9651ea8484c540d18d6813ab96dc95a0871245
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54502
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 days agoLU-17643 gss: make a local copy of the sptlrpc llog 94/54394/8
Sebastien Buisson [Thu, 14 Mar 2024 17:15:29 +0000 (18:15 +0100)]
LU-17643 gss: make a local copy of the sptlrpc llog

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

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

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

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

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

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

Change-Id: Ic461c4b30317bfd2b1e9f5b6be84c4a7fb4e3eb9
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54365
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 days agoLU-17624 ssk: support FIPS mode on client 14/54314/8
Sebastien Buisson [Wed, 6 Mar 2024 15:33:25 +0000 (15:33 +0000)]
LU-17624 ssk: support FIPS mode on client

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

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

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

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

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

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

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

With no distro kernels between 4.10 and 4.11 switch to
CPUHP_BP_PREPARE_DYN

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

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

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

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

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

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

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

Add sanity-krb5 test_9 to exercise this.

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

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

LU-16724 ptlrpc: remove PAGES_PER_POOL macro

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

Start unwinding this by removing the PAGES_PER_POOL macro.

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

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

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

Change-Id-Was: I56ee54c7f39b52d7cceffec9e3decf71bd313ddc

LU-16724 ptlrpc: rename max_pools to max_ptr_pages

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

Change-Id-Was: I14796f670a7f06fbec3b40ec23b4dd2e50f22d46

LU-16724 ptlrpc: rename npools to nptr_pages

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

Change-Id-Was: I97b320027a0a6b5870d246e1527fa3fbe15fccb5

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

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

Change-Id-Was: I0f4aba95f573f4afdc6f5d92f22fd67391fa6dab

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Ie29434f53eeb945b8d35df7c1212ae3f51a2aafa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52663
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
9 days agoLU-16724 ptlrpc: refactor page pools patch 2 45/52645/10
Patrick Farrell [Wed, 27 Mar 2024 21:24:18 +0000 (17:24 -0400)]
LU-16724 ptlrpc: refactor page pools patch 2

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

LU-16724 ptlrpc: stop passing around pool_index

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

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

LU-16724 ptlrpc: convert to void

Convert functions without meaningful return to void.

Change-Id-Was: I81f0baefd5b77b60ba699fa8749eaa83acadd8dd

LU-16724 ptlrpc: refactor pool growing code

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

Change-Id-Was: I175abc7e61d55563e989f87207a8c59da852f5f9

LU-16724 ptlrpc: replace ELEMENT_SIZE

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

Change-Id-Was: I322037e50bbdb8e0274b37f82618b6907b6d2906

LU-16724 ptlrpc: simplify pool arrays

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

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

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

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

Change-Id-Was: I650e05d25727f10b0ca2d556cba17e9c4fccc309

LU-16724 ptlrpc: begin renaming pool_index to order

Replace local variables for pool_index with pool_order.

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

Change-Id-Was: If347ff39776f9a75c0f7d9d9981d01e19bc2cbc9

LU-16724 ptlrpc: rename ppp_index to ppp_order

Rename ppp_index to ppp_order.

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

Change-Id-Was: I96559e27a67b7cc4e56e06378e5686370438850c

LU-16724 ptlrpc: rename INDEX macros

Rename INDEX macros to ORDER.

Change-Id-Was: Ic1123d25bc855dc7671c9cb587a0d6680662b729

LU-16724 ptlrpc: remove PAGES_POOL macro

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

Change-Id-Was: I09e1debeadecbce33c7be43a8859815084623358

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I42dc8b8094212c69b7a29cc3766bd0a10860f7af
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52645
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
9 days agoLU-17700 lnet: properly calculate ping buffer size 73/54673/5
James Simmons [Fri, 5 Apr 2024 00:01:32 +0000 (20:01 -0400)]
LU-17700 lnet: properly calculate ping buffer size

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

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

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

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

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

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

Change-Id: Ic4a39d9328326634190cd0719b4c0637e1bf315c
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54676
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 days agoLU-16915 tests: except sanity-sec test_51 51/54751/15
Andreas Dilger [Fri, 12 Apr 2024 01:18:28 +0000 (19:18 -0600)]
LU-16915 tests: except sanity-sec test_51

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

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

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

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

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

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

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

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

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

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

fix false warning

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

which is allocated in lnet_inet_enumerate()

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

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

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

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

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

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

Test-Parameters: trivial

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

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

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

Fixes: 43cbc93 ("LU-8191 lnet: remove unused, fix non-static functions")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I5e498dc411048f0ae3ca69cc5d24a728a711d6f7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54635
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-17678 quota: fix memleak in qmt_setup_lqe_gd() 75/54575/3
Alex Zhuravlev [Tue, 26 Mar 2024 14:41:18 +0000 (17:41 +0300)]
LU-17678 quota: fix memleak in qmt_setup_lqe_gd()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Change-Id-Was: I38b184239814a0f692b644566075c798ed16f816

LU-16724 ptlrpc: rename get_buf to get_pages

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

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

Change-Id-Was: I9c03b9d638e7df7f09bf5724c5a6896b7d1e7b6c

LU-16724 ptlrpc: improve usage of PAGES_POOL

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

Change-Id-Was: Ifed59db63d15d61d15712e6df6b8dbae56f2f5b7

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

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

Change-Id-Was: Iba3c98641e24173d95bf8bcf0df2424bbabf3ef9

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

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

Change-Id-Was: I1c14f6cf8cf1a19d89b5a7787aac1b67203866d3

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

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

Change-Id-Was: Iaaf6c23ea295b22ded2e8942227ebd5ce4d34e13

LU-16724 ptlrpc: improve use of 'count'

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

Change-Id-Was: Ic4f74db74b8cec63572d5fd5b129f861ab0cba7c

LU-16724 ptlrpc: simplify pools_should_grow

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

Change-Id-Was: I0accbce2c36fa97684fbee364057b8ff2f9ae12d

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

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

Clean that up.

Change-Id-Was: I9eabcfe77a57a82c87b36e3b3e040be91671fbfb

LU-16724 ptlrpc: reduce usage of pool_index

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

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

Change-Id-Was: I7efbf491cf28f6fd16d06f5bbc42d714c908f34c

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I636a4756a033d0b96a4772b8912f61c4b31b9c64
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52634
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
2 weeks agoLU-16694 tests: rewrite socket client, server in python 78/52478/2
Timothy Day [Fri, 22 Sep 2023 03:29:41 +0000 (03:29 +0000)]
LU-16694 tests: rewrite socket client, server in python

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

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

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

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

Add the missing close().

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

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

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

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

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

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

The build on kernel 6.7 reported the following errors:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Change-Id: I22395b6b19f94de3c95ba8517a14d2ea251fe37a
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54363
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17409 scripts: correct ldev MGS handling 19/53619/3
Olaf P. Faaland [Tue, 9 Jan 2024 05:36:50 +0000 (21:36 -0800)]
LU-17409 scripts: correct ldev MGS handling

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

    gopher1  gopher2  MGS  gopher1/mgs

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Remove el8.[0123] kernel patch series.

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

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

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

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

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

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

Code disabled for many years should be removed.

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

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

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

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

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

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

Add sanity-sec test_69 to exercise this.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Iaf59e72aa1612f5579db175d8999dcf0053308ed
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53878
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-16741 ptlrpc: ptlrpc: rename ptlrpc_req_finished 48/53648/7
Patrick Farrell [Thu, 11 Jan 2024 10:51:11 +0000 (16:21 +0530)]
LU-16741 ptlrpc: ptlrpc: rename ptlrpc_req_finished

First series of patchs thats renames ptlrpc_req_finished
to ptlrpc_req_put

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

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

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

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ibc5d16c3c7781fd92c44e48960c3746be81739d5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53565
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>