Whamcloud - gitweb
fs/lustre-release.git
9 hours agoLU-19030 quota: lfs quota all respects nodemap 97/59297/5
Sergey Cheremencev [Fri, 4 Apr 2025 01:58:13 +0000 (04:58 +0300)]
LU-19030 quota: lfs quota all respects nodemap

Command lfs quota all should print only IDs from the appropriate
nodemap range. The patch also maps FS quota IDs to client IDs
according to nodemap before returning in a quota all iterator buffer.

Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: I8820e18957805c0dceacc4674713875b024a8e99
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59297
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 hours agoLU-18813 contrib: add an example config.site 65/59265/3
Timothy Day [Fri, 16 May 2025 05:50:43 +0000 (01:50 -0400)]
LU-18813 contrib: add an example config.site

The variable CONFIG_SITE can be used to specify
config files to the Autoconf generated configure
script. This is a useful alternative to long
configure command lines.

Add an example config.site file used for compiling
Lustre server (osd-wbcfs) and client for use in
ktest.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I6597b860629643ced7191d7a250a86ede2576993
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59265
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Lijing Chen <lijinc@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 hours agoLU-19021 ptlrpc: Add obd info to nodemap exports output 48/59248/4
Marc Vef [Wed, 21 May 2025 11:35:33 +0000 (13:35 +0200)]
LU-19021 ptlrpc: Add obd info to nodemap exports output

When clients connect to MDTs/OSTs, a new export is generated on the
server-side during obd_connect_*() with the client's UUID. For each
target, a separate export is created which is then added to the
nodemap's "nm_member_list", if applicable.

Currently, "lctl get_param nodemap.NM_NAME.exports" prints the UUID
and NID information for each entry in the "nm_member_list". Because
the obd device is not listed, duplicate entries appear to be shown for
each client, which can be confusing for the administrator.

This patch extends the nodemap.NM_NAME.exports output by also showing
the obd the client is connected to, e.g., MDT0000, MDT0001, etc, such
that the shown entries no longer appear as duplucate.

Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: I681480f9258e57c522acc148f4096a8f40c71eab
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59248
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
9 hours agoLU-19011 utils: lfs quota -a -u --busage has delimiter 09/59209/4
Sergey Cheremencev [Tue, 13 May 2025 14:53:38 +0000 (17:53 +0300)]
LU-19011 utils: lfs quota -a -u --busage has delimiter

lfs quota all should insert a delimiter between the name and certain
parameter(busage, bhardlimit, bsoftlimit ...).

Fixes: 7c02893e12 ("LU-18079 utils: argument parse opts for lfs quota")
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: Icace5752c4a169858792748c5f4b41e336d18cac
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59209
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 hours agoLU-18971 build: Update ZFS version to 2.3.2 65/59065/17
Jihyeon Gim [Sun, 4 May 2025 14:40:53 +0000 (23:40 +0900)]
LU-18971 build: Update ZFS version to 2.3.2

Update ZFS version to 2.3.2. The changes are listed in:
https://github.com/openzfs/zfs/releases/tag/zfs-2.3.2

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

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

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

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

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

Change-Id: Id2a9780cd3b10e81e0136c0a7dde0cb317b52834
Signed-off-by: Jihyeon Gim <potatogim@gluesys.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59065
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 hours agoLU-7105 tests: remove deprecated test_28 from sanityn 52/59052/5
Frederick Dilger [Thu, 1 May 2025 00:53:21 +0000 (18:53 -0600)]
LU-7105 tests: remove deprecated test_28 from sanityn

sanityn.sh test_28 was deprecated in 2022-06 but not removed.

Test-Parameters: testlist=sanityn
Fixes: 51c491dac6 ("LU-10994 test: remove netdisk from obdfilter-survey")
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I524adf575170ae9e78dc1eb5e0e1596ee7252dfe
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59052
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 hours agoLU-17848 osd: fix deref in ldiskfs osd_health_check() 89/58989/3
Timothy Day [Sun, 27 Apr 2025 16:55:24 +0000 (12:55 -0400)]
LU-17848 osd: fix deref in ldiskfs osd_health_check()

The implementations of osd_health_check() in ldiskfs
incorrectly check for a NULL mount after already
dereferencing it. Add a check for a NULL mount in
osd_sb() and check for a NULL sb in osd_health_check().

CoverityID: 397885 ("Dereference before null check")

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id1ce015eb420fe067be375bf0019f305e3e2718c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58989
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lijing Chen <lijinc@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
9 hours agoLU-18687 doc: move man *.7 pages to Documentation/man7 90/58590/5
Timothy Day [Sat, 29 Mar 2025 23:37:30 +0000 (19:37 -0400)]
LU-18687 doc: move man *.7 pages to Documentation/man7

Consolidate all of the man pages into the top
level Documentation directory.

Move all of the Lustre man pages (from 7) to Docmentation/.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I9c5a5e36028739b4872e469721acb8d32b61cce1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58590
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Lijing Chen <lijinc@amazon.com>
Reviewed-by: Ellis Wilson <elliswilson@microsoft.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
9 hours agoLU-18116 tests: replay-single test_201 timeout 03/58203/4
Alexander Boyko [Tue, 25 Feb 2025 10:38:34 +0000 (11:38 +0100)]
LU-18116 tests: replay-single test_201 timeout

19s is not enough for some system to finish MDT1 umount.
Increasing it to 20s + OSTCOUNT seconds.

HPE-bug-id: LUS-12689
Test-Parameters: testlist=replay-single
Fixes: ffedcbae21f7 ("LU-17809 osp: make disconnect asynchronous")
Signed-off-by:Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I900ce107ceb664530bc2165685ba7b88cbd46807
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58203
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 hours agoLU-19045 build: memfs_write_end can be passed a folio 93/59393/2
Shaun Tancheff [Fri, 23 May 2025 00:06:32 +0000 (07:06 +0700)]
LU-19045 build: memfs_write_end can be passed a folio

Linux v6.11-rc1-51-ga225800f322a
 fs: Convert aops->write_end to take a folio
Linux v6.11-rc1-52-g1da86618bdce
 fs: Convert aops->write_begin to take a folio
Add 'struct folio' for page vs folio signature change.

Fixes: 25813cf8ba ("LU-18813 osd-wbcfs: MemFS-based OSD with writeback support")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I1cf87ac70c52652530e4fbc853c5160dc5822ec9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59393
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 hours agoLU-10026 ptlrpc: verify large allocations are aligned 44/57844/15
Patrick Farrell [Thu, 28 Sep 2023 00:09:03 +0000 (20:09 -0400)]
LU-10026 ptlrpc: verify large allocations are aligned

If we were ever to do an allocation with kmalloc(), we could
get non-page-aligned memory.

We haven't seen any problem yet, but we are trying to be ready for
this in advance. The arguments from https://lwn.net/Articles/787740/
also look strong.

Let's add an assertion to illuminate this dangerous behaviour.

EX-bug-id: EX-8245
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Change-Id: Id20898065b516d363d9dc280e71be1b5cfb6f4a7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57844
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
9 hours agoLU-17814 utils: Add work unit management 93/57293/14
Patrick Farrell [Thu, 5 Dec 2024 03:51:52 +0000 (22:51 -0500)]
LU-17814 utils: Add work unit management

Add creating and removing the root work unit.

Still no actual find, but closer.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Id56e43042b6e6ea776fae20b53837c9eced5098e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57293
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 hours agoLU-17814 utils: implement thread pool 92/57292/15
Patrick Farrell [Wed, 4 Dec 2024 23:49:23 +0000 (18:49 -0500)]
LU-17814 utils: implement thread pool

Implement thread pool for parallel find - still uses
regular find code to do the actual find.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: If5ebd3b52b93fc54dd4ab86bd8dfe06c4dcc0c11
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57292
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
9 hours agoLU-17055 mdt: add fallocate(FALLOC_FL_ZERO_RANGE) for indirect 46/57246/22
Keguang Xu [Tue, 3 Dec 2024 03:41:32 +0000 (11:41 +0800)]
LU-17055 mdt: add fallocate(FALLOC_FL_ZERO_RANGE) for indirect

This patch implements fallocate(zero) operation on DoM (Data
on Metadata) components where files are mapped in indirect mode.
This functionality is not natively supported in the current
ldiskfs implementation.

We mimic the write procedure ourselves, to brw zero content
between user specified [start, end) range.
- in mdt_io.c::mdt_fallocate_hdl() we first try the default path
 mdt_object_falloc(), where for this (ZERO & IND) case it returns
(-EOPNOTSUPP & DT_FALLOC_ERR_NEED_ZERO as a signal. We then
switch to mdt_object_falloc_zero(), there we iteratively call
dt_bufs_get() for brw preparation, and invokes mdt_commitrw_write()
executing the real write.

Signed-off-by: Keguang Xu <squalfof@gmail.com>
Change-Id: Ic7a9cb46eb94bdddff47795aaa2e4a4276dbe237
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57246
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 hours agoLU-18461 lod: let's remove home coded lu_buf code. 88/57188/8
Alexey Lyashkov [Wed, 20 Nov 2024 08:46:40 +0000 (11:46 +0300)]
LU-18461 lod: let's remove home coded lu_buf code.

lti_ea_store and lti_ea_store_size is same is lu_buf,
lets drop code duplication.

Test-Parameters: trivial
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Change-Id: I3a61382e53a848c94654bc4c55b7ac0c97758dbb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57188
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>
Reviewed-by: Timothy Day <timday@amazon.com>
9 hours agoLU-18461 lod: convert a lti_ea_store to the lu_buf 87/57187/8
Alexey Lyashkov [Wed, 20 Nov 2024 08:33:12 +0000 (11:33 +0300)]
LU-18461 lod: convert a lti_ea_store to the lu_buf

lti_ea_store + lti_ea_store_size is same as lu_buf,
lets reuse code.

Signed-off-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Change-Id: I61334247288736286937eeb0bb3afee0638c28bb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57187
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>
9 hours agoLU-18461 lod: fix layout conversion. 86/57186/8
Alexey Lyashkov [Tue, 19 Nov 2024 15:59:59 +0000 (18:59 +0300)]
LU-18461 lod: fix layout conversion.

lets set a lcm_id after convert.

Change-Id: I58ce52362c97bcd5f747a05ef994b2de4e69f93c
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57186
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
9 hours agoLU-18446 ptlrpc: fix cpu_latency_work() completion time 85/59285/2
Andreas Dilger [Mon, 19 May 2025 08:17:21 +0000 (02:17 -0600)]
LU-18446 ptlrpc: fix cpu_latency_work() completion time

Consider the cpu_latency_work() completion when it is equal to the
scheduled jiffies counter, rather than only afterward.

Fixes: 54a64ea818 ("LU-18446 ptlrpc: lower CPUs latency during client I/O")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I985d29b493bda02aa69ad54d9aae581a05fad685
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59285
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bruno Faccini <bfaccini@nvidia.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
9 hours agoLU-13814 osc: reduce queue use in __osc_dio_submit 61/52161/33
Patrick Farrell [Mon, 28 Apr 2025 15:41:31 +0000 (11:41 -0400)]
LU-13814 osc: reduce queue use in __osc_dio_submit

This patch removes another queue use in __osc_dio_submit.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I6f15d4110291cdca3d3c894916ed3c894f2ad9ce
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52161
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
9 hours agoLU-13814 osc: begin converting queue_dio_pages 60/52160/34
Patrick Farrell [Mon, 28 Apr 2025 15:39:28 +0000 (11:39 -0400)]
LU-13814 osc: begin converting queue_dio_pages

This patch begins the lengthy process of converting
osc_queue_dio_pages to use the page array rather than the
lists.  This will be a lengthy process because this ties in
to the OSC extent and BRW code.

Test-Parameters: testlist=sanity-sec env=ONLY=52,59a,59b
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I788faa0748a88045d838fb530107938a639407d0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52160
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
9 hours agoLU-13814 osc: convert osc_dio_submit to array 59/52159/36
Patrick Farrell [Tue, 29 Aug 2023 15:37:33 +0000 (11:37 -0400)]
LU-13814 osc: convert osc_dio_submit to array

This is a trivial first step, converting from list to the
array of cl_pages, which is not a very useful step but
does have to be done as we proceed here.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ib208bc2ed2ad95602a5fde79a4b39652ff73d9bf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52159
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
9 hours agoLU-13814 osc: cleanup osc_completion 41/52141/37
Patrick Farrell [Mon, 28 Apr 2025 16:12:28 +0000 (12:12 -0400)]
LU-13814 osc: cleanup osc_completion

Removing oap_cmd usage in osc_completion makes it easier to
remove osc page usage for DIO.

There's also no need for the osc_ap_completion wrapper, so
remove it.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ie72eecded73b0444a51b0273bf8913bfaee001bd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52141
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
9 hours agoLU-13814 osc: add osc_queue_dio_pages 40/52140/39
Patrick Farrell [Sun, 25 Feb 2024 18:06:38 +0000 (13:06 -0500)]
LU-13814 osc: add osc_queue_dio_pages

For dio, we need to replace osc_queue_sync_pages with a
specialized function.  This adds that function and starts
specializing it to DIO only.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I1eb996578cf2fc4d758d959ffc7f9b48225374ce
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52140
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
9 hours agoLU-19059 lov: fix lov_stripe_set 36/59436/3
Vladimir Saveliev [Wed, 4 Jun 2025 16:18:14 +0000 (19:18 +0300)]
LU-19059 lov: fix lov_stripe_set

Prevent overflow on multiplication of 32 bit integers.

Test to illustrate the issue is added to hit overflow in both branches
of lov_stripe_set().

Fixes: 6eee4ea5b6 ("LU-6174 lov: use standard Linux 64 divison macros")
HPE-bug-id: LUS-12782
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: If5a5aaf8de98c79b3df908e0d052461a3c8d0989
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59436
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: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 days agoLU-18959 ofd: remove sync_on_lock_cancel tunable 45/59145/6
Oleg Drokin [Wed, 7 May 2025 21:59:26 +0000 (17:59 -0400)]
LU-18959 ofd: remove sync_on_lock_cancel tunable

Now that enough time passed we don't need anymore

Revert "LU-12967 ofd: restore sync_on_lock_cancel tunable"

This reverts commit 7df7347b7b188e7168e094304fd6d2d985f7f274.

Except the sanity.sh portion

Test-Parameters: trivial
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I871ea7ba90bb2f193c967cdd184bbf392916b525
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59145
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 days agoLU-19010 lnet: Define BXI3LND network type 56/59256/8
Sylvain Goudeau [Thu, 15 May 2025 08:51:58 +0000 (10:51 +0200)]
LU-19010 lnet: Define BXI3LND network type

Define the BXI3LND network type. This reserves the network type number
for future implementation and allows creation of bxi3 peers and
adding routes to bxi3 peers.

Test-Parameters: trivial
Signed-off-by: Sylvain Goudeau <sylvain.goudeau@eviden.com>
Change-Id: I0b15da1c3be7873fecebba926c60214663b8a091
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59256
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>
12 days agoLU-19016 target: reset o_grant if no grant is returned 34/59234/3
Alex Zhuravlev [Wed, 14 May 2025 16:35:13 +0000 (19:35 +0300)]
LU-19016 target: reset o_grant if no grant is returned

tgt_grant_dealloc() should reset o_grant (which goes back
to the client) if the server doesn't want to return grants.

Test-Parameters: testlist=sanity
Test-Parameters: testlist=sanity
Test-Parameters: testlist=sanity
Test-Parameters: testlist=sanity-quota,sanity-quota
Fixes: df2b5d99ad ("LU-17933 target: do not break grants on RPC failure")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I33851c1e023534f6b5cf3c5596a23b0835a3fe01
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59234
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 days agoLU-19007 doc: document client mount retry option 98/59198/3
Timothy Day [Mon, 12 May 2025 22:04:31 +0000 (22:04 +0000)]
LU-19007 doc: document client mount retry option

Document the client mount retry option.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ib618a5e909b66136bb37ed82783af500cd6b40ee
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59198
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 days agoLU-18988 kfilnd: add return value after LBUGs 57/59157/2
Gian-Carlo DeFazio [Thu, 8 May 2025 17:12:02 +0000 (10:12 -0700)]
LU-18988 kfilnd: add return value after LBUGs

To get rid of compiler warnings of the kind
"control reaches end of non-void function",
add return statements after LBUGs.

Signed-off-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Change-Id: Ie8596c7527fa68f88e807ca290157b4a4dc891cf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59157
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 days agoLU-18976 gss: detect dns error in lsvcgssd 95/59095/2
Aurelien Degremont [Mon, 5 May 2025 14:36:16 +0000 (16:36 +0200)]
LU-18976 gss: detect dns error in lsvcgssd

Use proper NI_NAMEREQD flag with getnameinfo() in lsvcgssd when
resolving IP addresses, for it to return an error if DNS resolution fails.

That way, the error is propagated and Lustre knows a DNS failure happens
and can report it better. If not, it fails latter and reports a very unclear
message.

Test-Parameters: kerberos=true testlist=sanity-krb5
Change-Id: Iaa9e718c056ea742d8695048e43bdeeb3205f0dd
Signed-off-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59095
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: Bruno Faccini <bfaccini@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 days agoLU-18964 tests: performance-sanity test_2 fixed large 47/59047/6
Frederick Dilger [Wed, 30 Apr 2025 20:40:07 +0000 (14:40 -0600)]
LU-18964 tests: performance-sanity test_2 fixed large

test_2 in performance-sanity previously had mdsrate-create-large
meaning that the files themselves were large, however for performance
testing this doesn't make much sense as this is largely dependant on
the system IO. Instead large now means a large number of files (1M),
which was the original goal of these tests.

The SLOW/zfs check was also moved from test_1 to test_2 as it had
been left when the tests were renumbered.

Fixes: 01d16dadab ("LU-14697 tests: change performance-sanity to use mdtest")
Test-Parameters: trivial testlist=performance-sanity env=ONLY=1+2
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I602b76c050d29b5d401971123caa73e5d4844342
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59047
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>
12 days agoLU-18936 tests: sanity-quota_95 interop fix 44/59044/3
Sergey Cheremencev [Wed, 30 Apr 2025 18:21:45 +0000 (21:21 +0300)]
LU-18936 tests: sanity-quota_95 interop fix

Skip sanity-quota 95 if MDS version is less than
2_16_52-39-gb162043239 to avoid MDS that is missing
root idmap quota offset.

Fixes: b162043239 ("LU-18109 nodemap: fix idmap offset for root")
Test-Parameters: testlist=sanity-quota env=ONLY=95 serverversion=2.16
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: I713827eb7eb500689a75e956817d2a6eac556656
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59044
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>
12 days agoLU-13527 utils: allow OST FID lookup via lfs fid2path 88/58988/11
Keguang Xu [Sun, 27 Apr 2025 07:32:00 +0000 (15:32 +0800)]
LU-13527 utils: allow OST FID lookup via lfs fid2path

We support reverse name lookup of OST FID in addition
to MDT FID via "lfs fid2path",
- we use fld_client_lookup() to tell whether it's OST FID
or MDT FID
- for OST FID, we communicate with the OST that contains
the underlying object with the given FID, retrieve its parent
FID, i.e., the MDT FID, then continue with the MDT FID logic
- for MDT FID, previous logic was kept

NB: The ost_index obtained from fld_client_lookup() is passed
down to the lower layer via u.gf_root_fid, which was initially
taken as a non-functional field in OST context.

Signed-off-by: Keguang Xu <squalfof@gmail.com>
Change-Id: Icdf5cd7bb4693d5fef0b48f83464ca80aab81d1d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58988
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
12 days agoLU-18944 target: shrink grant depending on free space 26/58926/3
Sergey Cheremencev [Tue, 22 Apr 2025 10:51:15 +0000 (13:51 +0300)]
LU-18944 target: shrink grant depending on free space

Shrink grant at targets when it uses more than 25% of left space.

Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: I7f2fe97a05e04cce0ac9db82abe4c4bd20f194a0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58926
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: Patrick Farrell <pfarrell@whamcloud.com>
12 days agoLU-18109 nodemap: map back root with offset 95/58895/5
Sebastien Buisson [Tue, 22 Apr 2025 13:08:17 +0000 (15:08 +0200)]
LU-18109 nodemap: map back root with offset

When a nodemap is defined with admin=1 and an offset, root should be
mapped back to id 0, independently from the map_mode property.

sanity-sec test_77 is added to exercise this.

Fixes: e3051ad0f1c8 ("LU-18109 utils: adding nodemap offset capability")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I5b220dc90104ceab5c874dfbee41d3e85aefeb5b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58895
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 days agoLU-18935 libcfs: cfs_num_min_max() returns wrong max value 56/58856/3
Rajeev Mishra [Tue, 16 May 2023 21:51:09 +0000 (21:51 +0000)]
LU-18935 libcfs: cfs_num_min_max() returns wrong max value

The cfs_num_min_max() function is called using the nf_min_max function
pointer. It returns the minimum and maximum values for a given
range. However, if a network type uses cfs_num_min_max()
to find the min and max of the range, it will encounter an issue
where the start and end values of the range will be same.

This occurs because cfs_num_min_max() was returning the same value
for both the max and min

Here's an example specific to the "kfi" type, which utilizes
"cfs_num_min_max()" to find the minimum and maximum values.
As a result of the bug, the start and end values of
the range are the same.
Added range for kfi type--
lctl nodemap_add_range --name alps --range [0-131071]@kfi
show the range added
lctl get_param nodemap.alps.ranges
nodemap.alps.ranges=
[
{ id: 1, start_nid: 0@kfi, end_nid: 0@kfi }
]

Signed-off-by: Rajeev Mishra <rajeevm@hpe.com>
Test-Parameters: testlist=sanity-sec.sh
Change-Id: I368f8563648c1819a89e76fa8974818b5f8f6111
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58856
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: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
12 days agoLU-18933 gss: allow expired ctx from server for LDLM callback 40/58840/5
Sebastien Buisson [Thu, 17 Apr 2025 14:45:55 +0000 (16:45 +0200)]
LU-18933 gss: allow expired ctx from server for LDLM callback

When a client receives an ldlm callback request to release a lock,
the server might use an expired reverse context to send this request.
The server might not have any other choice, as it only has a reverse
context and cannot refresh it explicitly. And if the client refuses to
use the associated gss context, it fails to reply to the ldlm callback
request and gets evicted.
In order to avoid this eviction, the client needs to accept the
expired gss context associated with the server request. The client
cannot refresh its own context immediately, as it would not match the
reverse context used by the server. But the client context is going to
be refreshed right after that, along with the subsequent ldlm cancel
request.

sanity-krb5 test_201 is added to exercise this use case.

Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I9bc82731cb7013e07cc09295cb488f52a0034ea9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58840
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>
12 days agoLU-17679 tests: enable sanity/851 41/58141/4
Feng Lei [Thu, 20 Feb 2025 02:21:44 +0000 (10:21 +0800)]
LU-17679 tests: enable sanity/851

Print start message in monitor_lustrefs just before it is ready
to read events.
In test script, wait for the start message to confirm that
monitor_lustrefs process is scheduled and executed.
In test script, assign monitor_lustrefs process a higher priority.

Test-Parameters: trivial
Test-Parameters: testlist=sanity env="ONLY=851,ONLY_REPEAT=1000"
Signed-off-by: Lei Feng <flei@whamcloud.com>
Change-Id: Ibc5dd2450e7a8b795dba355118ea4a95f4cd52af
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58141
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>
12 days agoLU-18715 utils: Extend lctl nodemap_info with property values 52/58052/8
Marc Vef [Wed, 12 Feb 2025 16:16:38 +0000 (17:16 +0100)]
LU-18715 utils: Extend lctl nodemap_info with property values

The command "lctl nodemap_info" only presents information about which
property names exist for a given nodemap. It does not show the values
for each property, and the command's usefulness is therefore limited.
Further, nodemap property values are generally retrieved via the "lctl
get_param" interface which is inconsistent with how nodemap properties
are set, i.e., by using the "lctl nodemap_*" interface rather than the
"lctl set_param" interface.

This patch extends the "lctl nodemap_info" command to improve
usability, presenting in-depth information, including the global
nodemap state (active/inactive), property availability and
descriptions, all defined nodemaps, and the values for all nodemap
properties.

Extended options:
lctl nodemap_info [-l/--list] [-n/--name NODEMAP_NAME]
[-p/--property PROPERTY_NAME]

List the values of all properties for all nodemaps:
"lctl nodemap_info"

List the value of the specific "ranges" property for the "remote"
nodemap: "lctl nodemap_info --name remote --property ranges"

"--name" and "--property" can be used individually to show the
properties of all nodemaps or all properties of a specific nodemap.
Note the previous positional arguments [all,list,<nodemap>] are
retained for backward-compatibility.

Added sanity-sec 25a to test these modifications.

Test-Parameters: trivial testlist=sanity-sec env=ONLY="25 25a"
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: Ic09710233de490d8eb2f50a74e2b7e4765ca4f3d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58052
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>
12 days agoLU-18682 tests: ost-pools/23b to call wait_delete_completed 17/57917/9
Alex Zhuravlev [Wed, 29 Jan 2025 03:31:53 +0000 (06:31 +0300)]
LU-18682 tests: ost-pools/23b to call wait_delete_completed

otherwise the next test 24 may find few OSTs almost filled
and do not use them for new objects leading to a failure:
 ost-pools test_24: @@@@@@ FAIL: Stripe count 4 not on
  /mnt/lustre/d24.ost-pools/dir1/f24.ost-pools0:3

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I0136dc352603b8f9ccd8926b3105d99ce0df63e2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57917
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandre Ioffe <aioffe@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 days agoLU-18612 quota: update usage in glimpse AST 38/57638/12
Hongchao Zhang [Thu, 24 Apr 2025 00:37:59 +0000 (08:37 +0800)]
LU-18612 quota: update usage in glimpse AST

In the quota ID glimpse AST, update the quota usage in case of
the qunit has been changed on QMT.

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: I1acae2731b11d70de21b47658fcea2e987167e04
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57638
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 days agoLU-18608 pcc: fix INTEGER_OVERFLOW in pcc_file_read_iter() 11/57611/8
Qian Yingjin [Sat, 28 Dec 2024 16:10:16 +0000 (00:10 +0800)]
LU-18608 pcc: fix INTEGER_OVERFLOW in pcc_file_read_iter()

Fixing the possible INTEGER_OVERFLOW issue reported from Coverity.

  /lustre/llite/pcc.c: 2643 in pcc_file_read_iter()
  2641         iocb->ki_filp = file;
  2642         pcc_io_fini(inode, PIT_READ, result, cached);
   CID 454276:  Insecure data handling  (INTEGER_OVERFLOW)
     "result", which might have overflowed,
     is returned from the function.
  2643         RETURN(result);

Test-Parameters: trivial testlist=sanity-pcc
CoverityID: 454276 ("Insecure data handing")
Fixes: ce98bfe5f72 ("LU-10499 pcc: add readonly mode for PCC")
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ib856b7598441c06e0fcfe2e7f1eb4eef4d3d82b7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57611
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 days agoLU-18460 lod: avoid double llog initialization 71/57071/4
Alex Zhuravlev [Tue, 19 Nov 2024 15:30:25 +0000 (18:30 +0300)]
LU-18460 lod: avoid double llog initialization

lod should not try to initialize llogs if they have been initialized
already. this may happen if, for example, deactivation of specific
MDT has been lost and we activate already active MDT.
the result would be an assertion in lod_sub_prep_llog():
LustreError: 8141:0:(lod_sub_object.c:991:lod_sub_prep_llog())
ASSERTION( !ctxt->loc_handle ) failed:

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I17ed1a19ac143d1dd80e5c711c08311c49eda89e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57071
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 days agoLU-17920 mgs: handle compound permanent parameters 18/56218/11
Etienne AUJAMES [Fri, 30 Aug 2024 17:46:11 +0000 (19:46 +0200)]
LU-17920 mgs: handle compound permanent parameters

Special parameters like "nrs_tbf_rule" or "pcc" can "append" several
values.

e.g: add several TBF rules for ost_io
  # lctl set_param ost.OSS.ost_io.nrs_policies="tbf jobid"
  # lctl set_param ost.OSS.ost_io.nrs_tbf_rule="start login
    jobid={*login*} rate=5000"
  # lctl set_param ost.OSS.ost_io.nrs_tbf_rule="start rbh
    jobid={*rbh*} rate=100000"

Multiple permanent values are not supported for these parameters since
the it is possible to set a single value today.
The current implementation will only stores the last value and remove
the old records.

This patch allows "pcc", "nrs_tbf_rule" and future "wbc" to store
several values for the same parameter: it appends new llog records
without deleting the old ones.

If the MGS found an existing record matching the new value, it will
not append the new one.

To remove from the configuration only one entry, the patch modifies
the behavior of "lfs set_param -Pd" and "lfs conf_param -d" to match
the parameter name and the value if set. Those commands return
-ENOENT if the entries are not found.

e.g: remove the TBF rule "rbh" from the configuration
  # lctl set_param -Pd ost.OSS.ost_io.nrs_tbf_rule="start rbh
    jobid={*rbh*} rate=100000"

e.g: remove all TBF rules for ost_io service
  # lctl set_param -Pd ost.OSS.ost_io.nrs_tbf_rule

Add regression test conf-sanity 123aj.
Fix conf-sanity 123ag to use "lctl set_param -P -d" with the value set
in configuration (not "ANY").

Fix sanity-sec 27a to use "lctl set_param -P -d" only if the parameter
have been set before.

Test-Parameters: testlist=conf-sanity env=ONLY=123
Test-Parameters: testlist=conf-sanity env=ONLY=123
Test-Parameters: testlist=conf-sanity env=ONLY=123aj,ONLY_REPEAT=20
Test-Parameters: testlist=sanity env=ONLY=400b
Test-Parameters: testlist=sanity env=ONLY=401db,ONLY_REPEAT=20
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I9d3ec3d8d9004218138468739d4f7c5ea8a3eadd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56218
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 days agoLU-17000 llite: Handle not NUL terminated buffer 77/55377/5
Arshad Hussain [Mon, 10 Jun 2024 08:15:41 +0000 (04:15 -0400)]
LU-17000 llite: Handle not NUL terminated buffer

In pcc_expr_time_parse() 'buf' may not have a null
terminator if the source string's length is equal
to the buffer. This patch handles this.

Test-Parameters: trivial testlist=sanity-pcc
CoverityID: 426259 ("Buffer not null terminated")
Fixes: 3835f4d3 (LU-13881 pcc: comparator support for PCC rules)
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ifc144d73c75b8eef25a994630c600b9c1922aa3b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55377
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
12 days agoLU-17658 fid: check on disk sequence before allocating to osp 74/54474/12
Li Dongyang [Wed, 20 Mar 2024 23:09:34 +0000 (10:09 +1100)]
LU-17658 fid: check on disk sequence before allocating to osp

If we lose the commit to update seq_srv on ofd/ost, the available
super-sequence range is not updated, the sequence server of ofd
could assign the same sequence again to a different osp,
creating filesystem corruption.

To address this, a new dt_device_operations->dt_last_seq_get()
is added to iterate the current known sequence dirs under /O
and return the latest one. Before using the super-sequence range
read from seq_srv we use the new interface to double check and
update the current range or get a new range if necessary.

Change-Id: I49a11bb3b5e476e55c5835b05392c9567aeeb4ce
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54474
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 weeks agoLU-19003 ptlrpc: prevent freed memory access in ptlrpcd_init() 85/59185/3
Oleg Drokin [Mon, 12 May 2025 07:21:13 +0000 (03:21 -0400)]
LU-19003 ptlrpc: prevent freed memory access in ptlrpcd_init()

When ptlrpcd_cpts is used, an array is allocated with parsed
arguments, and then freed before the last user is done with it.

Move freeing to the end of ptlrpcd_init() to fix this.

Test-Parameters: trivial
Fixes: 2686b25c30 ("LU-6325 ptlrpc: make ptlrpcd threads cpt-aware")
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I84847f00ca7df6a9cc56962a09bfe41c1435223e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59185
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>
2 weeks agoLU-19017 osd-ldiskfs: fix lprocfs stats print 35/59235/2
Oleg Drokin [Wed, 14 May 2025 18:24:50 +0000 (14:24 -0400)]
LU-19017 osd-ldiskfs: fix lprocfs stats print

It was mentioning zfs accidentally.

Test-Parameters: trivial
Fixes: a20476ca2286 ("LU-11850 obd: support the rest of "stats" with Netlink")
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I51334ca03dcb69c59a20e62325d2442b5ea5bac8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59235
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
2 weeks agoLU-18989 osd: no tx restart in fallocate 58/59158/4
Alexander Zarochentsev [Tue, 6 May 2025 15:27:48 +0000 (15:27 +0000)]
LU-18989 osd: no tx restart in fallocate

A transaction restart in osd_fallocate_preallocate()
while holding an object lock may lead to a deadlock
with another thread which takes the lock first and then
starts a transaction.

crash> bt 44982
 #0 __schedule at ffffffffa2331fe8
 #1 schedule at ffffffffa233241a
 #2 wait_transaction_locked at ffffffffc106f08a
 #3  add_transaction_credits at ffffffffc106f67a
 #4  start_this_handle at ffffffffc106fa10
 #5  jbd2__journal_restart at ffffffffc107015e
 #6  osd_fallocate_preallocate.constprop.0 at ffffffffc23e3b1b
 #7  osd_fallocate at ffffffffc23e40cb
 #8  mdt_object_fallocate at ffffffffc21418f9
 #9  mdt_fallocate_hdl at ffffffffc2144125

and

crash> bt
PID: 47838    TASK: ffff9f66f5288000  CPU: 9    COMMAND: "mdt00_020"
 #0  __schedule at ffffffffa2331fe8
 #1  schedule at ffffffffa233241a
 #2  rwsem_down_write_slowpath at ffffffffa2334a9b
 #3  osd_write_lock at ffffffffc23b6b4d
 #4  mdd_xattr_del at ffffffffc208cd88
 #5  mdt_reint_setxattr at ffffffffc21224a9
 #6  mdt_reint_rec at ffffffffc211ec69
 #7  mdt_reint_internal at ffffffffc20f0a64
 #8  mdt_reint at ffffffffc20fc6b9
 #9  tgt_handle_request0 at ffffffffc1dea9e7

HPE-bug-id: LUS-12819
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I8baa3ba1505c7a55e96841524368a66d447d18c5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59158
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-18983 nodemap: support obdfilter-survey with nodemap 20/59120/5
Sebastien Buisson [Tue, 6 May 2025 16:38:28 +0000 (18:38 +0200)]
LU-18983 nodemap: support obdfilter-survey with nodemap

When running obdfilter-survey case=disk, no nodemap is associated with
the export, as the echo client is setup local to the server and the
ofd is accessed directly. So allow no nodemap for a ECHO_UUID client.
When running obdfilter-survey case=network, the echo client setup on
remote node (usually client) connects to the server via the echo obd.
So the echo obd needs to add the remote nid to the nodemap.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ic8464a29e1dd02ae7e453b6a3c9484f130c01d05
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59120
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-18972 lustreapi: Implement llapi_lmv_get_uuids 07/59107/4
solanki [Mon, 5 May 2025 23:27:57 +0000 (19:27 -0400)]
LU-18972 lustreapi: Implement llapi_lmv_get_uuids

Provide missing implementation for declared method in lustreapi

Fixes: 322968acf1 ("LU-819 utils: Fix lfs getstripe -M")
Test-Parameters: trivial
Signed-off-by: Praveen Singh Solanki <praveen.solanki@gmail.com>
Change-Id: I561c875281de9bfc26cc61cf07631ac7d0740163
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59107
Reviewed-by: Sonia Sharma <sonia.sh.sharma@oracle.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 weeks agoLU-18967 doc: fix lctl-pool man pages 62/59062/2
Andreas Dilger [Thu, 1 May 2025 21:57:03 +0000 (15:57 -0600)]
LU-18967 doc: fix lctl-pool man pages

Update the lctl-pool man pages to fix the following issues:
- lctl-pool_new: describe the POOLNAME formatting rules
- lctl-pool_remove: make OST index numbers consistent with pool_add
- lctl-pool_list: use a better POOLNAME example
- lctl-pool_destroy: use a better POOLNAME example
- lctl-pool_*: use a better example name for the pool

Fix up minor formatting issues in the man pages.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ided7c79fbdcfb15aa01a1c2b66cf44292f500c1e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59062
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Aryan Gupta <argupta@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-18966 o2iblnd: Missing spin lock in poolset destroy 59/59059/2
Frank Sehr [Thu, 1 May 2025 20:19:39 +0000 (13:19 -0700)]
LU-18966 o2iblnd: Missing spin lock in poolset destroy

Put a spin lock around pool set destroy in
kiblnd_fini_fmr_poolset() and kiblnd_fini_poolset()

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: I4a2864a64b1c1389cab84b120f889b1414a5d0de
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59059
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-18963 lnet: remove erroneous lnet_inet_enumerate() CWARN 42/59042/3
Timothy Day [Wed, 30 Apr 2025 14:59:49 +0000 (14:59 +0000)]
LU-18963 lnet: remove erroneous lnet_inet_enumerate() CWARN

Upon finding a DOWN interface, LNet will emit a message like
"lnet: Ignoring interface eth0: it's down". However, this is
not true - LNet doesn't ignore eth0; it chooses to spam the
kernel log.

On an instance with a large number of network interfaces,
many of them may be down. And many of them could be designated
for Lustre. As a result, this error could be printed hundreds
of times. But the error doesn't provide actionable advice to
the user; they aren't attempting to set up those interfaces and
hence don't care about them.

Downgrade this warning to a CDEBUG. lnet_inet_select() will emit
an appropriate warning, if needed.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I17942c2eeb37ffa5c6b7d9c107e9eae108105115
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59042
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-18927 lnet: Fix lnetctl fault commands 07/58807/3
Chris Horn [Tue, 15 Apr 2025 15:24:58 +0000 (09:24 -0600)]
LU-18927 lnet: Fix lnetctl fault commands

Various lnetctl fault commands are broken. It seems they never really
worked. Several fixes are made and the commands are refactored.

To faciliate refactoring the code the commands have been reworked to
drop the required --rule_type option. For example,

"lnetctl fault add --rule_type drop" is now "lnetctl fault drop add"

"lnetctl fault del --rule_type delay" is now "lnetctl fault delay del"

A couple options were missing from the add commands like message type
and portal. These are added and the getopt loop is reordered so the
cases are alphabetical.

The --all option was missing from the delete commands, this is added,
and getopt loop reordered.

Added some input validation to check that required arguments are
specified and check for some invalid combinations of options (e.g.
rate or interval must be specified, but not both).

fault_attr_nid_parse() is deleted from lnetctl.c since it is no longer
used after this refactoring.

sanity-lnet.sh has new wrappers for adding and deleting drop and delay
rules. The wrappers randomly choose to use either lctl or lnetctl to
do the add/delete.

Test-Parameters: trivial testlist=sanity-lnet
Fixes: f1c66236c6 ("LU-10391 lnet: Fault injection add/del ioctls to netlink")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I81930ba9e4313e7206f474011a5c6143dd7a72d6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58807
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Manish Regmi <mregmi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-16771 llite: cache statfs data for projects 81/58781/11
Alex Zhuravlev [Mon, 14 Apr 2025 16:51:35 +0000 (19:51 +0300)]
LU-16771 llite: cache statfs data for projects

use per-fs rhashtable to cache project-related statfs

Test-Parameters: fstype=ldiskfs testlist=sanity
Test-Parameters: fstype=ldiskfs testlist=sanity-quota
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I0bcac75afb9ab74535e2c553c575a812116b14d4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58781
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-8066 ofd: migrate files out of procfs 42/58742/8
James Simmons [Wed, 7 May 2025 12:41:55 +0000 (08:41 -0400)]
LU-8066 ofd: migrate files out of procfs

Move all the simple proc files to sysfs. The more complex files
get moved to debugfs.

Change-Id: I357418f795549b238ca3d3e7da217e6d98dad8fb
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58742
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 weeks agoLU-18780 llite: fix the hung during get all quota 28/58328/5
Hongchao Zhang [Wed, 7 May 2025 12:17:02 +0000 (20:17 +0800)]
LU-18780 llite: fix the hung during get all quota

If "lfs quota -a" is called simultaneously, the different list for
each call in ll_sb_info->ll_all_quota_list could be out of order,
then it could be stuck in "quotactl_getallquota".

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: I28099a24127a95ad0db301ee65707962efa67fe8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58328
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 weeks agoLU-18951 utils: validate ioc_inlbuf in llog_ioctl() 51/59051/4
Andreas Dilger [Wed, 30 Apr 2025 23:49:03 +0000 (17:49 -0600)]
LU-18951 utils: validate ioc_inlbuf in llog_ioctl()

Validate that the inlbuf is initialized with the log index
for OBD_IOC_LLOG_CANCEL and similarly for other ioctl commands
in llog_ioctl().

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I237a4f6906dabd64aa2106b6917e9660a92540e5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59051
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Manish Regmi <mregmi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-12511 build: make fscrypt detection work for native client 49/58949/3
James Simmons [Fri, 25 Apr 2025 00:03:18 +0000 (20:03 -0400)]
LU-12511 build: make fscrypt detection work for native client

The current code when built against the native client fails to
detect fscrypt so no support is built into the tools. This
patch makes the LC_FSCRUPT_SUPPORT test against the fscrypt UAPI
header to see if its at a level we can support natively.

Test-Parameters: trivial
Change-Id: Ic65f9dca637edd9194acbcf90e02da9681b26ab0
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58949
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-13814 osc: clarify osc_transfer_pinned usage 39/52139/33
Patrick Farrell [Sun, 25 Feb 2024 18:06:15 +0000 (13:06 -0500)]
LU-13814 osc: clarify osc_transfer_pinned usage

osc_transfer_pinned is not used for transient pages, so
don't clear it for them either.

This is part of a process of cleaning up DIO page
submission by truly specializing it for DIO pages.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I48f0da5f3cede5af04770c64077bbe7475623881
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52139
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
2 weeks agoLU-18826: obdclass: fix panic from shrink_slab 01/58501/17
Lijing Chen [Fri, 21 Mar 2025 17:46:28 +0000 (17:46 +0000)]
LU-18826: obdclass: fix panic from shrink_slab

Grant slot when obd_get_mod_rpc_slot called from kthreadd.
This change will prevent kernel panic from null pointer.

When shrink_slab triggered from kthreadd (system under
memory pressure and try to free up memory) it will invoke
ll_delete_node to free up inode cache. If in flight rpcs is
full, it will try to sleep the thread, but this will trigger
null pointer given kthreadd have null set_child_tid field.
We anyway don't want kthreadd get put into sleep.

Signed-off-by: Lijing Chen <lijinc@amazon.com>
Change-Id: Ie7dc1e4956bf508d9e2f1272cdfc377e78971ff8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58501
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: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoNew tag 2.16.55 2.16.55 v2_16_55
Oleg Drokin [Wed, 14 May 2025 03:59:09 +0000 (23:59 -0400)]
New tag 2.16.55

Change-Id: I82ce74b5b4db895036233d398b43f8776972032c
Signed-off-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18987 mdt: Remove stray assertion for dom read 73/59173/2
Oleg Drokin [Fri, 9 May 2025 23:21:10 +0000 (19:21 -0400)]
LU-18987 mdt: Remove stray assertion for dom read

There's a strange assertion in mdt_dom_read_on_open()
that does not make sense and checks parameters in
a loop that don't even change.

Let's remove it.

Change-Id: I0662b621a39fbde79415676a8486ec4f9ab3a2ab
Test-Parameters: trivial
Fixes: 13372d6c243c ("LU-10181 mdt: read on open for DoM files")
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59173
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
3 weeks agoLU-19859 misc: Declare symbols static 43/59143/2
Oleg Drokin [Wed, 7 May 2025 21:44:27 +0000 (17:44 -0400)]
LU-19859 misc: Declare symbols static

Previous iteration missed osp_ping_show and
qsd_caches that are not used outside the
files they are in.

Change-Id: Ib2a0455d81ef0ff96537055ba62651c482a3159b
Test-Parameters: trivial
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59143
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>
3 weeks agoLU-17224 tests: reduce MAXFREE in oos2.sh for ZFS 05/59105/5
Andreas Dilger [Mon, 5 May 2025 22:46:56 +0000 (16:46 -0600)]
LU-17224 tests: reduce MAXFREE in oos2.sh for ZFS

If fallocate is unavailable on the OSTs, then do not run the
out-of-space test on large filesystems or it will time out.

Test-Parameters: trivial
Test-Parameters: testlist=sanityn env=ONLY=15 fstype=ldiskfs
Test-Parameters: testlist=sanityn env=ONLY=15 fstype=zfs
Fixes: dcd5f6c0a0 ("LU-17224 tests: improve OST out-of-space testing")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I72bf52563522336a4689bbaa76984cf7e78e1ab8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59105
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18968 libcfs: fix invalid cfs_print_to_console() calls 61/59061/6
Jihyeon Gim [Thu, 1 May 2025 21:54:31 +0000 (06:54 +0900)]
LU-18968 libcfs: fix invalid cfs_print_to_console() calls

The cfs_print_to_console() function was changed so that it no
longer accepts mask information as a parameter.

However, functions such as cfs_trace_debug_print() do not reflect
this change and cause build errors because they conditionally compile
with the LNET_DUMP_ON_PANIC macro enabled when --enable-panic_dumplog
is enabled.

This commit therefore resolves the issue by amending the code that
calls the cfs_print_to_console() functions that were not updated.

Test-Parameters: trivial
Fixes: 02fc9e8977 ("LU-17623 libcfs: save msg_fn pointer to avoid race")
Signed-off-by: Jihyeon Gim <potatogim@gluesys.com>
Change-Id: I6480642b246830393c09ed48d8a7c14111f7c39f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59061
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
3 weeks agoLU-18687 libcfs: linux-list.h is no longer needed 86/58986/3
Timothy Day [Sun, 6 Apr 2025 05:30:25 +0000 (01:30 -0400)]
LU-18687 libcfs: linux-list.h is no longer needed

The linux-list.h header only includes a test for
hlist_add_after(), which is no longer called in the
code. Remove the header.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I34a57ae0d934bccbbc91d55208fe0d57d1eb331a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58986
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18947 osd-zfs: rename TXG_* to DMU_TX_* 39/58939/6
Shaun Tancheff [Thu, 24 Apr 2025 08:22:03 +0000 (15:22 +0700)]
LU-18947 osd-zfs: rename TXG_* to DMU_TX_*

zfs-2.3.99-237-gf69631992
  dmu_tx: rename dmu_tx_assign() flags from TXG_* to DMU_TX_*

Rename TXG_* to DMU_TX_* and provide replacements for older
releases of zfs.

HPE-bug-id: LUS-12840
Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I34c72b9ed6c284cdd67bffea7eeac09e2c9f358f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58939
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Akash B <akash-b@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
3 weeks agoLU-9633 ptlrpc: Add kernel doc style for ptlrpc (7) 63/58863/3
Arshad Hussain [Fri, 18 Apr 2025 17:36:47 +0000 (23:06 +0530)]
LU-9633 ptlrpc: Add kernel doc style for ptlrpc (7)

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I21532bbcb07b00dfb6275f5cd25015b46564c745
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58863
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18162 ofd: convert Object Filter Device to LU device 30/58830/3
Timothy Day [Wed, 16 Apr 2025 19:52:45 +0000 (19:52 +0000)]
LU-18162 ofd: convert Object Filter Device to LU device

Convert OFD to use LU device init/fini rather
than the legacy OBD API.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I4c1934d04ecafff2217159ef5040e396f4774acc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58830
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 weeks agoLU-18162 lmv: convert Logical Metadata Volume to LU device 29/58829/3
Timothy Day [Wed, 16 Apr 2025 19:07:44 +0000 (19:07 +0000)]
LU-18162 lmv: convert Logical Metadata Volume to LU device

Convert LMV to use LU device init/fini rather
than the legacy OBD API.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I7a1cbb56ee4aa054dba083789e1977986b1934fd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58829
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>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 weeks agoLU-18162 lov: convert Logical Object Volume to LU device 28/58828/3
Timothy Day [Wed, 16 Apr 2025 18:12:29 +0000 (18:12 +0000)]
LU-18162 lov: convert Logical Object Volume to LU device

Convert LOV to use LU device init/fini rather
than the legacy OBD API.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ia289e7f0ab31763db258f0c688c7324d737b3f52
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58828
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>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 weeks agoLU-18162 oss: convert Object Storage Service to LU device 24/58824/4
Timothy Day [Wed, 16 Apr 2025 14:56:04 +0000 (14:56 +0000)]
LU-18162 oss: convert Object Storage Service to LU device

Convert OSS to use LU device init/fini rather
than the legacy OBD API.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I15e8b059af7d574458b1ccec0e6ffb8ac8e3f930
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58824
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>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 weeks agoLU-18162 llite: consolidate cl_stack_fini()/lu_stack_fini() 10/58810/5
Timothy Day [Wed, 16 Apr 2025 04:31:46 +0000 (04:31 +0000)]
LU-18162 llite: consolidate cl_stack_fini()/lu_stack_fini()

lu_stack_fini() is only called by cl_stack_fini(), which is
simply a thin wrapper around the former. Consolidate these
two functions by deleting cl_stack_fini().

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I42e9b5310c50dc2362fc5ef83b2a10bed09becea
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58810
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: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
3 weeks agoLU-18162 kunit: convert LDLM extent test to LU device 04/58804/4
Timothy Day [Tue, 15 Apr 2025 17:22:23 +0000 (17:22 +0000)]
LU-18162 kunit: convert LDLM extent test to LU device

Convert LDLM extent test to use LU device init/fini rather
than the legacy OBD API.

Test-Parameters: trivial env=SLOW=yes env=ONLY=842 testlist=sanity
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id043fc2e768b2447cee582be4dc0d5032ec57882
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58804
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>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 weeks agoLU-18887 build: Update ZFS version to 2.3.1 48/58648/4
Jian Yu [Fri, 2 May 2025 04:18:18 +0000 (00:18 -0400)]
LU-18887 build: Update ZFS version to 2.3.1

Update ZFS version to 2.3.1. The changes are listed in:
https://github.com/openzfs/zfs/releases/tag/zfs-2.3.1

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

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

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

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

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

Change-Id: I2a5fc13210b2520009bf3fe21f8b559ac140318a
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58648
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18687 doc: move man pages to Documentation [3] 88/58588/4
Timothy Day [Sat, 29 Mar 2025 23:26:03 +0000 (19:26 -0400)]
LU-18687 doc: move man pages to Documentation [3]

Consolidate all of the man pages into the top
level Documentation directory.

Move all of the Lustre man pages (from 3) to Docmentation/.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I0cd7bda703cfd4cae1f18261c2c617fae188a2e2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58588
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 weeks agoLU-18813 osd-wbcfs: MemFS-based OSD with writeback support 39/58439/33
Qian Yingjin [Mon, 17 Mar 2025 15:41:17 +0000 (23:41 +0800)]
LU-18813 osd-wbcfs: MemFS-based OSD with writeback support

Implement a memory filesystem based OSD with writeback support for
Lustre.
It borrows lots of design from memory-based file systems such as
tmpfs/ramfs. The data is first written into the memory-based file
system (called MemFS for short). And then, the data can be flushed
to the persistent storage in a delayed write-back manner.

This patch implemented the basic functionality to store data in
MemFS. It can reuse lots of VFS codes in Linux kernel such as:
- Page caching for data;
- dcache for dentry management and lookup;
- icache for inode management and lookup;
- Writeback mechanism in Linux kernel

Test-Parameters: testlist=sanity fstype=wbcfs mdscount=1 mdtcount=1 osscount=4 ostcount=1
Test-Parameters: testlist=sanity fstype=wbcfs mdscount=1 mdtcount=1 osscount=4 ostcount=1
Test-Parameters: testlist=sanity fstype=wbcfs mdscount=4 mdtcount=1 osscount=4 ostcount=1
Test-Parameters: testlist=sanity fstype=wbcfs mdscount=4 mdtcount=1 osscount=4 ostcount=1
Test-Parameters: testlist=sanity fstype=wbcfs combinedmdsmgs=false standalonemgs=true mdscount=1 mdtcount=1 osscount=4 ostcount=1
Test-Parameters: testlist=sanity fstype=wbcfs combinedmdsmgs=false standalonemgs=true mdscount=1 mdtcount=1 osscount=4 ostcount=1
Test-Parameters: testlist=sanity fstype=wbcfs combinedmdsmgs=false standalonemgs=true mdscount=4 mdtcount=1 osscount=4 ostcount=1
Test-Parameters: testlist=sanity fstype=wbcfs combinedmdsmgs=false standalonemgs=true mdscount=4 mdtcount=1 osscount=4 ostcount=1
Signed-off-by: Yingjin Qian <qian@ddn.com>
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ia07c1d95b7ad3f7f5e817a8de69d0a4ab6995ffa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58439
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18684 config: don't run kernel checks with modules disabled 21/57921/4
Ake Sandgren [Wed, 29 Jan 2025 12:02:43 +0000 (13:02 +0100)]
LU-18684 config: don't run kernel checks with modules disabled

Running:

configure --enable-client --disable-server --disable-modules

runs kernel checks. They should only ever be run with modules enabled.

Fixes: a13fc434c57f ("LU-17662 osd-zfs: Support for ZFS 2.2.3")
Signed-off-by: Ake Sandgren <ake.sandgren@hpc2n.umu.se>
Change-Id: I97277474e1db554c23bf2fa3f80ac3a5b745bded
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57921
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-18660 utils: add long opts for 'lfs project' 19/57919/15
Frederick Dilger [Fri, 24 Jan 2025 21:25:17 +0000 (14:25 -0700)]
LU-18660 utils: add long opts for 'lfs project'

'lfs project' is missing long options for all of its commands.
    -0|--print0
    -c|--check
    -C|--clear
    -d|--directory
    -k|--keep
    -p|--proj-inherit
    -r|--recursive
    -s|--set-inherit|--inherit

Test-Parameters: trivial
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: Ib09e120c100c58c2443e3c72d5a921f82282e080
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57919
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 weeks agoLU-18175 lustre: back port shrinker debugfs support. 74/56174/40
James Simmons [Mon, 7 Apr 2025 13:33:22 +0000 (09:33 -0400)]
LU-18175 lustre: back port shrinker debugfs support.

The Linux kernel has developed a shrinker API to help deal
with a system that under memory pressure. Lustre uses this
shrinker API for several subsystems. While it helps this
API lacked the ability to manually trigger a cleanup. Now
with newer kernels a debugfs interface has been developed
just for this purpose. Back port this interface so Lustre
adminstrators can use this new feature to lighten the
load related to Lustre.

The following link explains this new debugfs interface:

https://lwn.net/Articles/896274

and how to use it:

https://docs.kernel.org/admin-guide/mm/shrinker_debugfs.html

For older kernels since Lustre shrinkers are not memcg aware
we remove that code since older kernels lack newer memcg
features. Sadly memcg functionality is not exported so
even for newer kernels we can't support it.

Note this is the basic functionality present in newer
kernels. A follow on patch will provide support in our
tools for this.

Test-Parameter: trivial
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: I70aeb4af15c46036e51e362a69602babfd5ea05f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56174
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
3 weeks agoLU-13814 osc: add osc_dio_submit 36/52136/33
Patrick Farrell [Sun, 25 Feb 2024 18:05:52 +0000 (13:05 -0500)]
LU-13814 osc: add osc_dio_submit

This function is a coyp of osc_io_submit, specialized to
handle only dio pages.  Converting this to handle batch
submission will come later.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Icb6923d22502bbb72af7e8b24b4c9afaba49380b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52136
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-13814 clio: convert lov submit to cl_dio_pages 13/52113/34
Patrick Farrell [Sun, 25 Feb 2024 18:05:27 +0000 (13:05 -0500)]
LU-13814 clio: convert lov submit to cl_dio_pages

This patch converts lov layer of IO submit to use the
cl_dio_pages array.  This simplifies that code since the
page array is all on one stripe and can only succeed or
fail completely.  (No partial successes.)

This pushes the array-to-queue conversion down to the OSC
layer.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ic414218be2be07bb7d74b150faebf5f404760d80
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52113
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
4 weeks agoLU-18959 misc: Mark symbols static to prevent namespace pollution 81/59081/3
Oleg Drokin [Sun, 4 May 2025 20:19:30 +0000 (16:19 -0400)]
LU-18959 misc: Mark symbols static to prevent namespace pollution

Sparse highlighted a number of symbols as not used outside
the file they are defined in. And a couple where they were used,
but the proper header was not included, fix these issues:

libcfs/libcfs/tracefile.c:37 sparse warning: symbol 'cfs_trace_data' was not declared. Should it be static?
libcfs/libcfs/tracefile.c:49 sparse warning: symbol 'tctl_task' was not declared. Should it be static?
lnet/lnet/lnet_rdma.c:24 sparse warning: symbol 'nvfs_shutdown' was not declared. Should it be static?
lnet/lnet/lnet_rdma.c:25 sparse warning: symbol 'nvfs_ops' was not declared. Should it be static?
lnet/lnet/lnet_rdma.c:26 sparse warning: symbol 'nvfs_n_ops' was not declared. Should it be static?
lustre/ldlm/ldlm_lockd.c:44 sparse warning: symbol 'ldlm_kobj' was not declared. Should it be static?
lustre/lfsck/lfsck_namespace.c:6916 sparse warning: symbol 'lfsck_namespace_assistant_ops' was not declared. Should it be static?
lustre/lmv/lproc_lmv.c:409 sparse warning: symbol 'lprocfs_lmv_obd_vars' was not declared. Should it be static?
lustre/lod/lod_dev.c:160 sparse warning: symbol 'lod_txn_callback_kmem' was not declared. Should it be static?
lustre/mdc/lproc_mdc.c:572 sparse warning: symbol 'ldebugfs_mdc_obd_vars' was not declared. Should it be static?
lustre/mdc/mdc_batch.c:189 sparse warning: symbol 'mdc_update_interpreters' was not declared. Should it be static?
lustre/mdc/mdc_dev.c:1672 sparse warning: symbol 'mdc_lu_ops' was not declared. Should it be static?
lustre/mdt/mdt_mds.c:63 sparse warning: symbol 'mds_max_io_threads' was not declared. Should it be static?
lustre/mgc/lproc_mgc.c:39 sparse warning: symbol 'ldebugfs_mgc_obd_vars' was not declared. Should it be static?
lustre/obdclass/hash.c:98 sparse warning: symbol 'cfs_rehash_wq' was not declared. Should it be static?
lustre/obdclass/jobid.c:33 sparse warning: symbol 'jobid_hash_lock' was not declared. Should it be static?
lustre/obdclass/kernelcomm.c:273 sparse warning: symbol 'stats_params' was not declared. Should it be static?
lustre/obdclass/lprocfs_status.c:2610 sparse warning: symbol 'cksum_name' was not declared. Should it be static?
lustre/obdclass/lprocfs_status_server.c:540 sparse warning: symbol 'ldebugfs_obd_exports_vars' was not declared. Should it be static?
lustre/obdclass/lu_object.c:1883 sparse warning: symbol 'lu_env_rhash' was not declared. Should it be static?
lustre/obdclass/scrub.c:464 sparse warning: symbol 'scrub_status_names' was not declared. Should it be static?
lustre/obdclass/scrub.c:475 sparse warning: symbol 'scrub_flags_names' was not declared. Should it be static?
lustre/obdclass/scrub.c:483 sparse warning: symbol 'scrub_param_names' was not declared. Should it be static?
lustre/ofd/ofd_oss.c:28 sparse warning: symbol 'oss_max_threads' was not declared. Should it be static?
lustre/osc/lproc_osc.c:664 sparse warning: symbol 'ldebugfs_osc_obd_vars' was not declared. Should it be static?
lustre/osd-ldiskfs/osd_handler.c:81 sparse warning: symbol 'ldiskfs_flush_descriptors_seconds' was not declared. Should it be static?
lustre/osd-ldiskfs/osd_handler.c:84 sparse warning: symbol 'ldiskfs_delayed_unlink_blocks' was not declared. Should it be static?
lustre/osd-ldiskfs/osd_handler.c:90 sparse warning: symbol 'osd_itea_cachep' was not declared. Should it be static?
lustre/osd-ldiskfs/osd_lproc.c:810 sparse warning: symbol 'ldebugfs_osd_obd_vars' was not declared. Should it be static?
lustre/osd-zfs/osd_lproc.c:384 sparse warning: symbol 'ldebugfs_osd_obd_vars' was not declared. Should it be static?
lustre/ptlrpc/nodemap_lproc.c:23 sparse warning: symbol 'nodemap_root' was not declared. Should it be static?
lustre/ptlrpc/nrs_tbf.c:2284 sparse warning: symbol 'nrs_tbf_opcode_ops' was not declared. Should it be static?
lustre/ptlrpc/nrs_tbf.c:2598 sparse warning: symbol 'nrs_tbf_uid_ops' was not declared. Should it be static?
lustre/ptlrpc/nrs_tbf.c:2611 sparse warning: symbol 'nrs_tbf_gid_ops' was not declared. Should it be static?
lustre/quota/lquota_lib.c:23 sparse warning: symbol 'lquota_caches' was not declared. Should it be static?
lustre/quota/qsd_lib.c:39 sparse warning: symbol 'qsd_caches' was not declared. Should it be static?
lustre/target/tgt_grant.c:61 sparse warning: symbol 'lbug_on_grant_miscount' was not declared. Should it be static?
lustre/target/tgt_handler.c:1576 sparse warning: symbol 'tgt_lfsck_in_notify' was not declared. Should it be static?
lustre/target/tgt_main.c:39 sparse warning: symbol 'sync_lock_cancel_show' was not declared. Should it be static?
lustre/target/tgt_main.c:72 sparse warning: symbol 'sync_lock_cancel_store' was not declared. Should it be static?

Change-Id: Ibdf617161fe481ddd6a2905e60890cb23ed59733
Test-Parameters: trivial
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59081
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: Timothy Day <timday@amazon.com>
4 weeks agoLU-18959 osd-ldiskfs: Remove unused ldiskfs_flush_descriptors_seconds 80/59080/2
Oleg Drokin [Sun, 4 May 2025 19:40:03 +0000 (15:40 -0400)]
LU-18959 osd-ldiskfs: Remove unused ldiskfs_flush_descriptors_seconds

ldiskfs_flush_descriptors_seconds is not used anywhere.

Change-Id: I8941cc18dcaf7b4f87120a5f299616741e639900
Fixes: 6a3d7634a1fa ("LU-18463 ptlrpc: removing cfs_flush_fput idle")
Test-Parameters: trivial
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59080
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 weeks agoLU-18956 mgc: Remove llog_config_lock 92/58992/3
Oleg Drokin [Mon, 28 Apr 2025 06:10:13 +0000 (02:10 -0400)]
LU-18956 mgc: Remove llog_config_lock

This was alredy previously removed as nothing is using it,
but accidentally got resurrected by LU-11185 patch.

Remove it again.

Change-Id: Ie68c54d3401473c0ddb095c49ce753a7b94063ca
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Test-Parameters: trivial
Fixes: 0ad54d5977736 ("LU-11185 mgc: config lock leak")
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58992
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
4 weeks agoLU-18961 mdt: add safety checks in MDT_BOOL_RW_ATTR 09/59009/2
Oleg Drokin [Tue, 29 Apr 2025 04:05:27 +0000 (00:05 -0400)]
LU-18961 mdt: add safety checks in MDT_BOOL_RW_ATTR

MDT_BOOL_RW_ATTR macro creates a store and show methods
for a boolean sysfs entry, but in process they use result
of mdt_dev() call without checking, but internally
it uses container_of_safe that could return NULL or
ERR_PTR, so we need to check the return value.

While we can probably pass in the decoded PTR_ERR,
since NULL is also an option, simplier to just return
-ENOENT which makes sense on it's own.

Change-Id: Ibbc62cf74dc5d8b7e335fc42ff5149bd2ae174c6
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Test-Parameters: trivial
Fixes: d71a24005b753 ("LU-17144 mdt: set dmv by setxattr")
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59009
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>
4 weeks agoLU-18957 tests: remove obsolete osc.*.contention_seconds 98/58998/3
Emoly Liu [Sun, 27 Apr 2025 12:31:21 +0000 (20:31 +0800)]
LU-18957 tests: remove obsolete osc.*.contention_seconds

Remove the obsolete parameter osc.*.contention_seconds from
sanity.sh and sanityn.sh.

Test-Parameters: trivial
Fixes: 5ad00e36eca1 ("LU-14838 osc: Remove client contention support")

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Ie62157adfe7588fa66f9e82d97affee8ad2d4436
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58998
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 weeks agoLU-10765 hsm: fix source_fd type in hsm_copyaction_private 80/58980/3
Patrick Farrell [Fri, 25 Apr 2025 22:12:13 +0000 (18:12 -0400)]
LU-10765 hsm: fix source_fd type in hsm_copyaction_private

The source_fd field in struct hsm_copyaction_private was defined as
__u32 (unsigned), but was being used with -1 to indicate an invalid
file descriptor. This mismatch caused the error handling code to
incorrectly check if source_fd < 0, which is impossible for an
unsigned value, potentially leading to file descriptor leaks.

Change the type of source_fd from __u32 to __s32 to match how it's
used and to be consistent with data_fd which is already __s32.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I41d74642d9906075ec7eda670e4c390d55fed297
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58980
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 weeks agoLU-18953 tests: verify identity_upcall is executable 61/58961/2
Sebastien Buisson [Fri, 25 Apr 2025 13:14:14 +0000 (15:14 +0200)]
LU-18953 tests: verify identity_upcall is executable

In test-framework, verify that the value of the L_GETIDENTITY
variable points to an executable. Otherwise, the identity_upcall
would fail.

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I5839c157c3678caa81908f950d3cc2cd2fc59c44
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58961
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17361 tests: reduce lustre-rsync-test/2a+b workload 30/58930/3
Andreas Dilger [Wed, 23 Apr 2025 21:41:15 +0000 (15:41 -0600)]
LU-17361 tests: reduce lustre-rsync-test/2a+b workload

The lustre-rsync-test test_2a and test_2b are copying the dbench
output to the local $TMP filesystem twice and can run into memory
allocation issues on VMs where /tmp is a RAM-based filesystem.
The tests are sufficiently verifying lrsync correctness making
a single copy of the dbench output to the local $TMP filesystem.
Other subtests are verifying that multiple '-t DIR' targets work.

Test-Parameters: trivial
Test-Parameters: testlist=lustre-rsync-test env=ONLY=2a,ONLY_MINUTES=60
Test-Parameters: testlist=lustre-rsync-test env=ONLY=2b,ONLY_MINUTES=60
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ibbc720f30c1146c04760f24bc09e1fe76c762edc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58930
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Rajeev Mishra <rajeevm@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-11029 target: centralize size checking 88/58888/7
Chakshu Kansal [Thu, 24 Apr 2025 12:40:58 +0000 (06:40 -0600)]
LU-11029 target: centralize size checking

Consolidate size checking logic inside object_update_param_get()
instead of having separate checks at each call site.

Test-Parameters: testlist=sanity,sanityn

Signed-off-by: Chakshu Kansal <ckansal@ddn.com>
Change-Id: I290ce300fb28ee48b2052fcb8263a308d63022f5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58888
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aryan Gupta <argupta@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-9633 ptlrpc: Add kernel doc style for ptlrpc (5) 61/58861/2
Arshad Hussain [Fri, 18 Apr 2025 15:05:17 +0000 (20:35 +0530)]
LU-9633 ptlrpc: Add kernel doc style for ptlrpc (5)

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ia025459e129fd5ab0709798f7bd4b6872fc08a94
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58861
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Anjus George <georgea@ornl.gov>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-9633 ptlrpc: Add kernel doc style for ptlrpc (4) 60/58860/2
Arshad Hussain [Thu, 17 Apr 2025 14:42:06 +0000 (20:12 +0530)]
LU-9633 ptlrpc: Add kernel doc style for ptlrpc (4)

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ib22e67e4c2416fe1a7b5e86b7afca440e2b7800c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58860
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Anjus George <georgea@ornl.gov>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-10911 idl: add OBD_CONNECT2_FLR_EC flag 43/58843/4
James Simmons [Tue, 22 Apr 2025 19:47:14 +0000 (15:47 -0400)]
LU-10911 idl: add OBD_CONNECT2_FLR_EC flag

The new connect2 flag indicates when I/O data containing
parity data can be handled. The field l_ost_gen for
struct lov_ost_data_v1 has never been used. We can use
it to classify OST object data.

Test-Parameters: trivial
Change-Id: I4883c7f5bb80690de7b3fe65144baa70538bd4d6
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58843
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-16266 lfsck: fix the PROJID of OST object 19/58519/6
Hongchao Zhang [Tue, 18 Mar 2025 01:19:52 +0000 (09:19 +0800)]
LU-16266 lfsck: fix the PROJID of OST object

The PROJID of the OST object should be fixed along with UID/GID
when LFSCK finds the UID/GID/PROJID of the OST object is different
from the value of the MDT object.

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ifbdc89797ccfa4d80515ec1a67062016e7dc30fb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58519
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: Li Dongyang <dongyangli@ddn.com>
4 weeks agoLU-18828 lnet: lnetctl SIGSEGV in infra_ping_nid 60/58460/8
Frank Sehr [Wed, 19 Mar 2025 00:10:00 +0000 (17:10 -0700)]
LU-18828 lnet: lnetctl SIGSEGV in infra_ping_nid

Return value of strtok() not checked.
Save error code and continue pinging after syntax error.

Test-Parameters: trivial
Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: I817d7c46ced9e8ea42a283b6c05dfc17ce8781f3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58460
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>
4 weeks agoLU-18687 compat: move hash/rhash to lustre_compat 57/58157/18
Timothy Day [Sat, 22 Feb 2025 01:30:05 +0000 (20:30 -0500)]
LU-18687 compat: move hash/rhash to lustre_compat

Migrate the backported hash and rhashtable code to
lustre_compat.

The backported linux-hash.c code is only needed for
CentOS 7.5, so drop it.

Eventually, all of the Lustre/LNet compatability code
will live in lustre_compat - maintaining a clear
separation from the functional code in Lustre and LNet.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I73add2b5c2ad8ccc46c252f1066c7f20dc12cc39
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58157
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 weeks agoLU-18685 deb: fix broken EXTRAFLAGS 22/57922/3
Ake Sandgren [Wed, 29 Jan 2025 12:15:37 +0000 (13:15 +0100)]
LU-18685 deb: fix broken EXTRAFLAGS

A change to allow separate packages to be built has broken handling
of EXTRAFLAGS in debian/rules. It should always use:

 EXTRAFLAGS="${EXTRAFLAGS} ..."

Fixes: 1a2119c54e ("LU-17462 build: make some deb packages optional")
Test-Parameters: trivial
Signed-off-by: Ake Sandgren <ake.sandgren@hpc2n.umu.se>
Change-Id: I44aa60fea474ae046ba89a6502ba9b6c635c6918
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57922
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>