Whamcloud - gitweb
fs/lustre-release.git
3 weeks agoLU-17987 ofd: always trust OST last_id 74/55574/4
Lai Siyao [Thu, 30 May 2024 08:19:59 +0000 (04:19 -0400)]
LU-17987 ofd: always trust OST last_id

In normal precreate, the last_id on OST is always trustable because
it's maintained in memory, and it should be MDT that messes up the
last created FID in reconnect. Even if the gap is more than
OST_MAX_PRECREATE, reply the last_id to MDT to avoid leaving OST in
unavailable status.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I838aa0ab15e6adaaa340356e54ab597a43a9fdf4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55574
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>
3 weeks agoLU-17775 lfs: Use fid for lfs_setstripe copy 81/55081/7
Di Wang [Tue, 7 May 2024 03:12:43 +0000 (03:12 +0000)]
LU-17775 lfs: Use fid for lfs_setstripe copy

FID can be used for lfs_setstripe copy.

Signed-off-by: Di Wang <di.d.wang@oracle.com>
Change-Id: Ia3f968b0602f7f8640693189c4deec4260fc2bc9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55081
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
3 weeks agoLU-12885 mds: add enums for MDS_OPEN flags (2/4) 66/55066/7
Arshad Hussain [Fri, 10 May 2024 08:08:34 +0000 (13:38 +0530)]
LU-12885 mds: add enums for MDS_OPEN flags (2/4)

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

This second step changes och_flags to use MDS_* flags. This
also renames 'struct ll_file_data' variable from 'fd' to 'lfd'.
As 'fd' is generally used to denote kernel fd.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I3b105da5930fde51a57b2cda7aef38cd1e1d774d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55066
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-10499 pcc: keep mtime unchange when attach file into PCC 24/54424/7
Qian Yingjin [Tue, 14 Sep 2021 08:40:03 +0000 (16:40 +0800)]
LU-10499 pcc: keep mtime unchange when attach file into PCC

Modifying the timestamps of the files for the attach will cause
problems for the cache manager, since all files will appear new
at the time they are imported into the cache.
And that may also confuse applications if the file mtime has
changed just because of attach.

In this patch, it keeps the file mtime unchanged when attach it
into PCC.

EX-bug-id: EX-2859
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I26f0c19c7b6cc1af0d62c192931d0042c9614993
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54424
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: jsimmons <jsimmons@infradead.org>
3 weeks agoLU-17613 tests: explicit check for eviction with dmesg parse 99/54299/7
Vladimir Saveliev [Tue, 30 Jul 2024 15:21:43 +0000 (18:21 +0300)]
LU-17613 tests: explicit check for eviction with dmesg parse

client_evicted() used to check for client eviction based on result of
lfs df. When it returned any error but EOPNOTSUPP - that was taken as
"client was evicted".

When glibc's realpath() changed to not call stat()
(see for ref
  stdlib: Sync canonicalize with gnulib [BZ #10635] [BZ #26592] [BZ
  ..
  - Realpath mishandles EOVERFLOW; stat not needed anyway (BZ#24970).
)
'lfs df' started to return EOPNOTSUPP from lfs_df(). client_evicted()
was changed, now any non-zero return is taken as client was evicted.

Check for "This client was evicted" in dmesg output to make sure that
eviction happened.

Add a comment in ptlrpc_import_recovery_state_machine() to make it
clear that this specific error message is used by the test code. Avoid
ratelimiting for the message.

Fixes: a5a9ded43b ("LU-16916 tests: fix client_evicted() not to ignore EOPNOTSUPP")
Test-Parameters: trivial testlist=replay-vbr,recovery-small
HPE-bug-id: LUS-11742
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I10ef99d23d630164bfdf167e54e2f177e9b85598
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54299
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Elena <elena.gryaznova@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17463 osc: add support for unevictable mlock()ed pages 26/53826/16
Qian Yingjin [Fri, 26 Jan 2024 07:49:34 +0000 (02:49 -0500)]
LU-17463 osc: add support for unevictable mlock()ed pages

The page cache shrinker does not distinguish mlock()ed pages from
normal unused pages in page LRU list and would remove it from
cache wrongly.

In this patch, we use a separate unevictable list to manage the
pages marked with PG_mlocked flag.
As there is no direct notification or interface for page mlock()/
munlock() to the filesystem, we need to scan the whole unevitable
list heavily to check whether there are any freeable pages in the
list to remove them later.

Thus we implement two interfaces to scan and shrink unevictable
pages that no longer marked with PG_mlocked and remove them
from cache manually.
- $LCTL set_param llite.*.unevict_cached_mb=clear
  Scan and clear all pages in unevictable lists that no
  longer marked with PG_mlocked on a Lustre client FS.
  Scan the normal LRU list to move the pages marked with
  PG_mlocked into the unevictable list.
- $LCTL set_param osc.*.osc_unevict_cached_mb=clear
  Scan and clear all pages that no longer marked with PG_mlocked
  in the unevictable list corresponding to this OSC obd device.
  Scan the normal LRU list to move the pages marked with
  PG_mlocked into the unevictable list.

The command "echo 3 > /proc/sys/vm/drop_caches" can also be
used to evict the pages unlocked by munlock() system call which
are no longer marked with PG_mlocked.

In our design, the mlocked pages are not accounted into the LRU.
Thus, the total cached pages in a Lustre client FS may exceed
the maximum LRU limit @max_cached_mb on a Lustre client FS.

Add a tunable parameter to control whether the mlocked pages
functionality is enabled:
llite.*.enable_mlock_pages
This will allow disabling this feature if something goes wrong in
the feild.
It is disabled by default.

Add test case sanity/test_600{a,b,c,d}.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I0713ad254999dfc32ed5063ec0d8e042968793a9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53826
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-3720 tests: use actual stripe count in sanity/130b 72/53072/11
Andreas Dilger [Fri, 10 Nov 2023 08:57:37 +0000 (01:57 -0700)]
LU-3720 tests: use actual stripe count in sanity/130b

If the requested number of stripes is not created, then
the test will fail.  Use the actual number of stripes
when checking the filefrag output.

Also clean up code style in other test_130 subtests.

Test-Parameters: trivial testlist=sanity env=ONLY=130
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iec5926a2863c750d89f89a5cbf6bf5df0d3ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53072
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-17272 osc: check cl_dirty_max_pages 37/53037/4
Hongchao Zhang [Wed, 26 Jun 2024 06:56:26 +0000 (14:56 +0800)]
LU-17272 osc: check cl_dirty_max_pages

In osc_queue_sync_pages, the client_obd->cl_dirty_max_pages
should also be checked along with the grant check.

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: I3d22fdcf6d8ea99b48bc1f42e7b686ab4ba0e1f0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53037
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18080 ldiskfs: support NO_CHECKS for Ubunutu and SuSE15 85/55985/2
James Simmons [Fri, 9 Aug 2024 17:01:08 +0000 (11:01 -0600)]
LU-18080 ldiskfs: support NO_CHECKS for Ubunutu and SuSE15

Backport the special NO_CHECKS flag for Ubuntu and SuSE15 that
was missing. Without it you get the build error:

osd_scrub.c:656:42: error: ‘LDISKFS_IGET_NO_CHECKS’ undeclared ...

Also add ext4-filename-encode.patch for Ubuntu 20.04.

Test-Parameters: trivial
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: I1022b0f4a1b5ee818596ca3aece3f886a5721d25
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55985
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17911 obdclass: fix faked flexible arrays in jobid 95/55995/3
Yang Sheng [Mon, 12 Aug 2024 05:04:55 +0000 (13:04 +0800)]
LU-17911 obdclass: fix faked flexible arrays in jobid

To fix the crash caused by issue of faked flexible arrays
in  jobid.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: Iba88582e20dfe38ec060ed9a05ba3d65ee3e31e1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55995
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: Jian Yu <yujian@whamcloud.com>
3 weeks agoLU-6142 kgnilnd: SPDX for GNI LND 31/55931/2
Timothy Day [Mon, 5 Aug 2024 03:01:24 +0000 (23:01 -0400)]
LU-6142 kgnilnd: SPDX for GNI LND

Convert from verbose license text to SPDX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I429de7ecee8bd42d83401b4ede3a00947ba65210
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55931
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-6142 fid: SPDX for FID/FLD code 86/55886/2
Timothy Day [Tue, 30 Jul 2024 03:15:24 +0000 (23:15 -0400)]
LU-6142 fid: SPDX for FID/FLD code

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Iaadd10e60e08fb3f551812289e2c30de12824fd4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55886
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-6142 mdc: SPDX for MetaData Client 85/55885/2
Timothy Day [Tue, 30 Jul 2024 03:09:18 +0000 (23:09 -0400)]
LU-6142 mdc: SPDX for MetaData Client

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ie07b59890c246074eec51052ccf7e1049d99bf81
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55885
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-6142 lnet: Fix style issues for o2iblnd_cb.c 80/55880/3
Arshad Hussain [Mon, 29 Jul 2024 10:54:39 +0000 (06:54 -0400)]
LU-6142 lnet: Fix style issues for o2iblnd_cb.c

This patch fixes issues reported by checkpatch
for files lnet/klnds/o2iblnd/o2iblnd_cb.c

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Id84dbf4a18eedc73d1fc3173fef799c5d5cdf659
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55880
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-6142 lnet: Fix style issues for socklnd_proto.c 26/55826/4
Arshad Hussain [Mon, 22 Jul 2024 04:37:54 +0000 (00:37 -0400)]
LU-6142 lnet: Fix style issues for socklnd_proto.c

This patch fixes issues reported by checkpatch
for files lnet/klnds/socklnd/socklnd_proto.c

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ie1eff17d3287dc5f844f2deba62a6f6ca4a02b4a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55826
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-14853 tests: conf-sanity/32 upgrade 2.14/2.15 images 66/54666/10
Andreas Dilger [Sat, 17 Aug 2024 05:11:01 +0000 (22:11 -0700)]
LU-14853 tests: conf-sanity/32 upgrade 2.14/2.15 images

Add filesystem upgrade images for conf-sanity test_32 for the
2.14.0 and 2.15.0 releases to confirm proper upgrade for the
on-disk filesystem format from these systems.

Add checks for new features added in these releases:
- OST pools, OST Pool Quotas
- fscrypt data encryption and filename encryption

Test-Parameters: trivial mdtcount=4 mdscount=2 env=ONLY=32 testlist=conf-sanity
Test-Parameters: trivial fstype=zfs env=ONLY=32 testlist=conf-sanity
Test-Parameters: trivial mdtcount=4 mdscount=2 testlist=sanity-quota

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: I58c1be54abc0a36b8bd0fd0139627af0a078e0f0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54666
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-6142 mdt: Fix style issues for mdt_lib.c 30/54230/7
Arshad Hussain [Fri, 1 Mar 2024 06:29:46 +0000 (11:59 +0530)]
LU-6142 mdt: Fix style issues for mdt_lib.c

This patch fixes issues reported by checkpatch
for file lustre/mdt/mdt_lib.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I04b1cb3c993f229c83e7f54a13e03ae6a957aa49
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54230
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17525 llite: unaligned DIO zfs detection 95/55895/4
Shaun Tancheff [Sat, 10 Aug 2024 02:12:21 +0000 (09:12 +0700)]
LU-17525 llite: unaligned DIO zfs detection

Update to the ZFS detection logic to be stable. If any
component of the I/O is ZFS treat the entire I/O as ZFS

HPE-bug-id: LUS-12175
Fixes: 07a1272233 ("LU-17525 llite: unaligned DIO interop page alignment")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ie9d5c8af373cec96855f81f5330e174ed71f370a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55895
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>
4 weeks agoLU-18113: ptlrpc: move DEBUG_REQ out of spinlock 48/55948/2
Andriy Skulysh [Tue, 18 Jun 2024 18:18:59 +0000 (21:18 +0300)]
LU-18113: ptlrpc: move DEBUG_REQ out of spinlock

It may help with slow cancel processing:

Stack :
crash_nmi_callback
nmi_handle
default_do_nmi
do_nmi
end_repeat_nmi
number
vsnprintf
libcfs_debug_msg
_debug_req
ptlrpc_server_request_add
ptlrpc_server_handle_req_in
ptlrpc_main
kthread
ret_from_fork
Progs:  1836895 "ldlm_cn00_011"

Change-Id: I778547c676be8192da2ec30ec5deefb789fe8e7b
HPE-bug-id: LUS-12411
Signed-off-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55948
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>
4 weeks agoLU-18112 mdt: check for fid from a client to match format 47/55947/2
Andriy Skulysh [Wed, 24 Jul 2024 17:14:06 +0000 (20:14 +0300)]
LU-18112 mdt: check for fid from a client to match format

Access to /mnt/lustre/.lustre/fid/0x200000 passes sane checks

Change-Id: I748e519b56cce6809285bbe178e89f5872a46188
HPE-bug-id: LUS-12448
Signed-off-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55947
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-16707 scripts: make license-status more flexible 28/55928/2
Timothy Day [Sat, 3 Aug 2024 20:02:43 +0000 (16:02 -0400)]
LU-16707 scripts: make license-status more flexible

Accept a path argument to restrict the search to a sub-tree.
By default, use the current directory. Also, fix some shellcheck
errors.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Iaddf0c22f8fed80947b0b511f9a56f6a35e0347b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55928
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>
4 weeks agoLU-17812 coverity: Fixes Boolean operation on a constant 26/55926/4
Rajeev Mishra [Sat, 3 Aug 2024 18:28:58 +0000 (18:28 +0000)]
LU-17812 coverity: Fixes Boolean operation on a constant

This commit fixes the coverity issue introduced by the
previous commit of LU-17812. Below given is the coverity
report.
CID 440624 Integer handling issue constant_expression_result
The expression "ldlm_lock_to_ns(__ext->oe_dlmlock)->
ns_dump_stack_on_error && 1 /* D_ERROR & D_ERROR */" performs a
Boolean operation on a constant

Fixes: 70b9dc57a99d ("LU-17812 ldlm: stack trace log for LDLM error")
Signed-off-by: Rajeev Mishra <rajeevm@hpe.com>
Change-Id: I300831598c54f3f96719938253c7eaacb83f299f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55926
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 weeks agoLU-18081 tests: improve conf-sanity/98 testing 91/55891/10
Andreas Dilger [Tue, 30 Jul 2024 20:54:14 +0000 (14:54 -0600)]
LU-18081 tests: improve conf-sanity/98 testing

conf-sanity test_98 is failing for newer distros like Ubuntu 24.04
and SLES15sp6, which have newer userspace tools.

Print better error messages about what options are being processed
to help debug this issue.  It appears mount is now deduplicating
options passed on the command-line, which invalidates the test case.

Change test_98 to call mount.lustre directly to verify this handling.

Test-Parameters: trivial
Test-Parameters: testlist=conf-sanity env=ONLY=98 clientdistro=ubuntu2404
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I34de0fdbd4ca36228d313b53251b5dbcfc502b07
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55891
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-18016 kfilnd: avoid wrong call to kfilnd_ep_put_key 88/55688/2
Vladimir Saveliev [Wed, 10 Jul 2024 09:26:17 +0000 (12:26 +0300)]
LU-18016 kfilnd: avoid wrong call to kfilnd_ep_put_key

kfilnd_tn_alloc(): do not call kfilnd_ep_put_key() if
kfilnd_ep_get_key() was not called

HPE-bug-id: LUS-12405
Test-Parameters: trivial
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I6dc9f581b5632a9a220cc04f4b5735581b75f40a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55688
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17702 utils: 'lfs quota' MOUNT_POINT optional 83/55683/22
Frederick Dilger [Tue, 9 Jul 2024 22:01:36 +0000 (16:01 -0600)]
LU-17702 utils: 'lfs quota' MOUNT_POINT optional

Specifying the MOUNT_POINT is now optional for 'lfs quota'.
Additionally multiple mount points can now be specified
to print quota information for each one.

If the mount point is not specified, quota information for ALL
mounted filesystems will be printed instead.

Changes were made to fix the quota formatting as some columns were
misaligned. Filesystem is no longer placed on newline if the
name exceeds 16 characters, this should make for better argument
parsing.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I3985855c5ce67be0fb8107c046bd54b802e1f6f1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55683
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17983 mdt: mti_big_lov and mti_big_lmv 51/55551/11
Shaun Tancheff [Fri, 19 Jul 2024 04:00:08 +0000 (11:00 +0700)]
LU-17983 mdt: mti_big_lov and mti_big_lmv

Currently mti_big_lmm can be used for LOV, LMV and as a
generic buffer in mdt_attr_get_pfid() and mdt_attr_get_pfid_name()

The LOV and LMV are not mutually exclusive and should be split
into separate buffers so one does not over write the other.

HPE-bug-id: LUS-11657
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Icc4c5676a24d92a6448e21fe1d66a851a17de46e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55551
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-11077 utils: move get/set/list_param into own file 42/55642/9
Andreas Dilger [Wed, 3 Jul 2024 16:35:44 +0000 (10:35 -0600)]
LU-11077 utils: move get/set/list_param into own file

Move the "lctl get_param/set_param/list_param" handling code into a
separate file so that the functions can be called within the code
elsewhere without the need for all the dependencies.

Remove obsolete "local_cfg" and "set_timeout" sub-commands that
have been obsolete since "set_param" was added.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: If4dc44abb1f5de4a3c24e043ba9a352ef7c0e1ec
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55642
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 weeks agoLU-17753 llite: ll_getattr_dentry(): protect access to times 43/54843/5
Vladimir Saveliev [Mon, 13 May 2024 14:57:27 +0000 (17:57 +0300)]
LU-17753 llite: ll_getattr_dentry(): protect access to times

ll_merge_attr() updates inode's timestamps twice. Racing stat may get
intermediate values of timestamps.

Test to illustrate the issue is added.

ll_merge_attr() makes intermediate inode's timestamp update with
values from MDS under
ll_inode_info->lli_size_mutex. ll_getattr_dentry() should also use the
mutex to not return intermediate timestamps. This applies for regular
files only.

Test-Parameters: testlist=sanity env=ONLY=39u,ONLY_REPEAT=200
HPE-bug-id: LUS-12265
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: Ic94040418da2a5cc5e41458dbf9d4c05244741ff
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54843
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-17567 tests: improve sanity.sh:test_27T 13/54113/3
Vladimir Saveliev [Wed, 31 Jul 2024 14:20:17 +0000 (17:20 +0300)]
LU-17567 tests: improve sanity.sh:test_27T

sanity.sh:test_27T is to take care that second of write rpcs generated
by multiop fails with ENOSPC. Otherwise, grant accounting breaks.

Test-Parameters: testlist=sanity env=ONLY="27T 42d"
HPE-bug-id: LUS-11178
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I056145ffc223f943585edbaa70f92ab9d5fdc1f1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54113
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nikitas Angelinas <nikitas.angelinas@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-18083 utils: handle more than one peer NI per peer 44/55944/4
James Simmons [Wed, 7 Aug 2024 13:43:01 +0000 (07:43 -0600)]
LU-18083 utils: handle more than one peer NI per peer

For lnetctl peer list command the loop to parse the returned data
from the kernel ended its loop on the first mapping end event.
This fails since we can have multiple peer ni nids and each one
contains a mapping start and end event. Instead we need to skip
everything until we get an sequence end event which has the
effect of filtering everything but the primary nids which we
want.

Second smaller issue is that yaml_lnet_peer_display() can have
either an emitter or parser error. If it was a emitter error
the code would return back yaml_lnet_peer() would still treat
it as an parse error as well which is incorrect. Make
yaml_lnet_peere_display() return 0 if its a parser error or
-EINVAL if its an emitter error. This way we can handle error
reporting in each case separately.

Test-Parameters: trivial testlist=sanity-lnet
Change-Id: I71372a5b243c5907022a09fb080781d60180dd41
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55944
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-6142 lnet: update files with correct SPDX 30/55930/4
Timothy Day [Sun, 4 Aug 2024 17:43:33 +0000 (13:43 -0400)]
LU-6142 lnet: update files with correct SPDX

Some files were given LGPL-2.0 when they should have been
LGPL-2.1 based on the previous license text. Add the Linux
syscall note to UAPI headers.

Add SPDX to a few missed files in LNET.

Fixes: 0f39311369 ("LU-6142 lnet: SPDX for lnet/utils/")
Fixes: c9a7728476 ("LU-6142 lnet: SPDX for lnet/include/ and misc files")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I6ceadfa182909ed4e3e52f88b4d37249cb30b6ef
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55930
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-6142 kfilnd: SPDX for Kfabric LND 29/55929/2
Timothy Day [Sat, 3 Aug 2024 20:30:49 +0000 (16:30 -0400)]
LU-6142 kfilnd: SPDX for Kfabric LND

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id75f33b7a1d3eaa699f6f7056ae7e54fd88d7240
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55929
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-6142 lfsck: SPDX for Lustre FS checker 27/55927/2
Timothy Day [Sat, 3 Aug 2024 19:46:10 +0000 (15:46 -0400)]
LU-6142 lfsck: SPDX for Lustre FS checker

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ie02c2bcc775520e8710880b5e91a545c4a922f60
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55927
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 weeks agoLU-6142 ldlm: SPDX for lock manager code 25/55925/2
Timothy Day [Sat, 3 Aug 2024 18:44:12 +0000 (14:44 -0400)]
LU-6142 ldlm: SPDX for lock manager code

Convert from verbose license text to SDPX.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id89b827f2596f4522b5ea7ea5be60a10aa15c083
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55925
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-18080 ldiskfs: add NO_CHECKS flags for ext4_iget 96/55896/5
Li Dongyang [Wed, 31 Jul 2024 12:03:32 +0000 (22:03 +1000)]
LU-18080 ldiskfs: add NO_CHECKS flags for ext4_iget

Since v6.4-rc4-1-gb3e6bcb94590, the upstream kernel introduced
a strict checking of EXT4_IGET_EA_INODE and it has to match the
EXT4_EA_INODE_FL from the inode.

This creates a problem for osd scrub as we iterate over the inodes
according to bitmap we have no idea if the inode is an ea_inode or
not.

Add a new flag EXT4_IGET_NO_CHECKS and relax the strict checking
when the flag is used.

Cleanup osd_ldiskfs_iget_special(), the caller of osd_iget() now are
passing in the additional flags to ext4_iget().

Test-Parameters: trivial
Test-Parameters: fstype=ldiskfs serverdistro=el9.4 testlist=conf-sanity env=ONLY=32a
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I43c8da68b06c5592e197dd3b5e3f4f7c842cf7c4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55896
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Shuichi Ihara <sihara@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-6142 lnet: Fix style issues for socklnd_lib.c 24/55824/2
Arshad Hussain [Fri, 19 Jul 2024 09:12:26 +0000 (05:12 -0400)]
LU-6142 lnet: Fix style issues for socklnd_lib.c

This patch fixes issues reported by checkpatch
for files lnet/klnds/socklnd/socklnd_lib.c

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I9c83e632ae52336bd26191a8e053757ede53a25e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55824
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-6142 lnet: Fix style issues for socklnd_cb.c 23/55823/2
Arshad Hussain [Fri, 19 Jul 2024 10:01:23 +0000 (06:01 -0400)]
LU-6142 lnet: Fix style issues for socklnd_cb.c

This patch fixes issues reported by checkpatch
for files lnet/klnds/socklnd/socklnd_cb.c

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I1928c560de316e587606770cf924410f5699ab27
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55823
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-10391 obdclass: truncate large uuids 67/55767/7
Chris Horn [Mon, 15 Jul 2024 18:33:41 +0000 (12:33 -0600)]
LU-10391 obdclass: truncate large uuids

With large NIDs it is now possible for UUIDs, based on NID strings, to
exceed UUID_MAX length. To handle this, these large NID strings are
truncated.

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ic6b9310c9bf8a598e3cc87575c85f43ef4577345
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55767
Reviewed-by: Timothy Day <timday@amazon.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>
4 weeks agoLU-18012 obd: support large NIDs when MGS is down 07/55907/6
James Simmons [Thu, 1 Aug 2024 19:23:39 +0000 (13:23 -0600)]
LU-18012 obd: support large NIDs when MGS is down

When the mgc is initialized it will create an export for the MGS.
Having a MGS export does not mean we can actually reach the
remote MGS. The way to know if the MGS is reachable is to examine
the connect flags after obd_connect() is called. If its zero
then the remote MGS is down. If this is the case since when
starting the mgc we examine the mgsnode= string we can examine
every NID. If one of those NIDs for mgsnode= or the failover
has a large NID address then force support for large NIDs.

Change-Id: I3550df21618f07b69701a9d337d3dfc5f99e49a3
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55907
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 weeks agoLU-6142 llite: Fix style issues for namei.c 42/54142/9
Arshad Hussain [Thu, 22 Feb 2024 08:08:26 +0000 (13:38 +0530)]
LU-6142 llite: Fix style issues for namei.c

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ibf2113a598f7c72879e8068c44e38a4ce41e1774
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54142
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 weeks agoLU-16537 write: fixes to writes at maximal offsets 33/49933/19
Shaun Tancheff [Sun, 28 Jul 2024 04:51:48 +0000 (11:51 +0700)]
LU-16537 write: fixes to writes at maximal offsets

There are issues at maximal offsets.
Sanity tests 44[b-e] illustrate the problems.

osd_ldiskfs_map_inode_pages():
  fix osd-ldiskfs to not hinder write of maximum possible block of a
  file at block number 2^32-1.  It was incorrectly preventing this
  last block to be written.
        Fixes 44b and 44c.

lov_io_rw_iter_init():
  cast loff_t to __u64 so that comparison worked correctly for
  overflowed loff_t (as it is signed).
        Fixes 44d which fails for ZFS.

lsme_unpack():
  Limit maximal size of file to take into account that last stripe of
  an object may be incomplete.
        Fixes 44e.

ll_do_tiny_write():
  Do not allow to go over cl_file_maxbytes.
        Fixes 44e for aarch64 client/LDISKFS servers.

HPE-bug-id: LUS-11475
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I1c19efda38ab3621fa3b08712308a76330d86cff
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49933
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-18110 doc: lctl multiple NIDs specification not clear 57/55957/3
Oleg Drokin [Wed, 7 Aug 2024 21:42:53 +0000 (17:42 -0400)]
LU-18110 doc: lctl multiple NIDs specification not clear

The original statement is somewhat confusing. I think
this one is better, but may be there's an even better
option somebody could think of?

Test-Parameters: trivial
Change-Id: I4206269913eaec06fec034374da2be42625086b0
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55957
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
6 weeks agoLU-18110 doc: improve wording in lctl-snapshot* manpages 56/55956/4
Oleg Drokin [Wed, 7 Aug 2024 21:41:38 +0000 (17:41 -0400)]
LU-18110 doc: improve wording in lctl-snapshot* manpages

There's some consistently strangely spelled umount when the unmount
action is meant (i.e. not part of the command itself) and other
clearing of the language

Test-Parameters: trivial
Change-Id: If20bcad739e3eb1367f2e028ac45d60d2986fc34
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55956
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
6 weeks agoLU-18110 doc: grammar fixes in llapi changelog and pcc man pages 60/55960/3
Oleg Drokin [Wed, 7 Aug 2024 21:51:51 +0000 (17:51 -0400)]
LU-18110 doc: grammar fixes in llapi changelog and pcc man pages

There are some minor grammar issues there highighted by my latest toy.

Test-Parameters: trivial
Change-Id: Ib37d30acf9bbabb6c71158d0658a18224997a177
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55960
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
6 weeks agoLU-18110 doc: improve lfs-flushctx manual page 58/55958/3
Oleg Drokin [Wed, 7 Aug 2024 21:44:29 +0000 (17:44 -0400)]
LU-18110 doc: improve lfs-flushctx manual page

There's some pretty strange wording around kerberos/keyring
right now, so let's try to improve it?

Test-Parameters: trivial
Change-Id: Ie905b5b9db54597ad96e46a429fb163f963ff02b
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55958
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
6 weeks agoLU-18117 obdclass: fix llog_validate_record prototype 64/55964/2
Sebastien Buisson [Thu, 8 Aug 2024 13:52:40 +0000 (15:52 +0200)]
LU-18117 obdclass: fix llog_validate_record prototype

Fix prototype of function llog_validate_record() to make it static
inline, otherwise build fails on some platforms (e.g. ubuntu 2404).

Fixes: 96d8987a36 ("LU-14714 mgc: server to mount without local config")
Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ica8cbb9bffdb2e7abd5284ab0bbd3d026961bae1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55964
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
6 weeks agoNew tag 2.15.65 2.15.65 v2_15_65
Oleg Drokin [Thu, 8 Aug 2024 00:25:17 +0000 (20:25 -0400)]
New tag 2.15.65

Change-Id: Ib7a88c78e3c31481c045c47186da5255b75e7be2
Signed-off-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-18110 doc: misspelled hexadecimal in lfs getstripe/getdirstripe 55/55955/3
Oleg Drokin [Wed, 7 Aug 2024 21:36:02 +0000 (17:36 -0400)]
LU-18110 doc: misspelled hexadecimal in lfs getstripe/getdirstripe

Somehow hexadecimal is misspelled very consistently in
lfs getdirstripe and lfs getstripe manual pages as hexademical

Change-Id: Id2b2f96cec70728d06e533c61dea7745d7ccf910
Test-Parameters: trivial
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55955
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
6 weeks agoLU-18110 doc: Fix typos in lustre/doc 50/55950/5
Oleg Drokin [Wed, 7 Aug 2024 05:03:51 +0000 (01:03 -0400)]
LU-18110 doc: Fix typos in lustre/doc

Fixed typos galore, pretty obvious ones went into this commit,
more advanced types will follow separately

Change-Id: Ief6624c6bd297548a04ef65a1312f32b752d7f7a
Test-Parameters: trivial
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55950
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
6 weeks agoLU-18110 doc: llapi_layout_stripe_count_get mistake 49/55949/2
Oleg Drokin [Wed, 7 Aug 2024 04:29:21 +0000 (00:29 -0400)]
LU-18110 doc: llapi_layout_stripe_count_get mistake

The function gets stripe count, not size.

Change-Id: I654b3595d35d09bf16fc82d1f30766eaa3e79d40
Test-Parameters: trivial
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55949
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
6 weeks agoLU-18047 lnet: sanity-lnet test_260 wrong value 10/55910/4
Frank Sehr [Thu, 1 Aug 2024 23:05:20 +0000 (16:05 -0700)]
LU-18047 lnet: sanity-lnet test_260 wrong value

Added retries and delay in case values are not set in time.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: I6caa00e5fd7fb86ae55a593bed897f1dcaee1392
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55910
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
6 weeks agoLU-17679 tests: make stdout unbuffered in sanity/851 04/55904/3
Lei Feng [Thu, 1 Aug 2024 07:34:25 +0000 (15:34 +0800)]
LU-17679 tests: make stdout unbuffered in sanity/851

Make stdout unbuffered in sanity/test_851.
So that the output can be detected ASAP.

Fixes: 7101742b459 ("LU-17490 tests: verify fanotify works for lustre")
Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial
Test-Parameters: testlist=sanity env=ONLY=851,ONLY_REPEAT=1000
Change-Id: I852a73b6bbdcbae7dfe1704183d4cb3c8200be43
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55904
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
6 weeks agoLU-17331 tests: fix conf-sanity/30b fake NID generation 90/55890/7
Andreas Dilger [Tue, 30 Jul 2024 19:11:42 +0000 (13:11 -0600)]
LU-17331 tests: fix conf-sanity/30b fake NID generation

It appears that "NID + 20" used by conf-sanity test_30b would
occasionally match the client NID and cause the test to fail.

Ensure the "fake" NID generated for OSS failover is not already
used by the cluster, and it also handles IPv6 NIDs.

Update code style in this subtest to match current standards.

Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Test-Parameters: trivial testlist=conf-sanity env=ONLY=30
Fixes: b91d5d4263 ("b=15253 fix conf-sanity 30b for non-tcp networks")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I119c8123193d2d0947ebbdbac5e5c7fb50d34ca5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55890
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
6 weeks agoLU-17131 ldiskfs: Refresh suse15 sp2 and 5.4 series 63/55863/2
Shaun Tancheff [Thu, 25 Jul 2024 12:28:17 +0000 (19:28 +0700)]
LU-17131 ldiskfs: Refresh suse15 sp2 and 5.4 series

Correct the patch attribution sles15sp3/ext4-encdata.patch

Update ext4-filename-encode.patch for trivial context conflict
and correct the patch attribution.

Update the ubuntu 20.04 series to include:
   ext4-ext-merge.patch
   ext4-filename-encode.patch
   ext4-encdata.patch

Refresh linux-5.4/ext4-pdirop.patch and update series:
   ldiskfs-5.4.136-ml.series
   ldiskfs-5.4.21-ml.series

Test-Parameters: trivial
HPE-bug-id: LUS-11967
Fixes: d4aecb71dc ("LU-17131 ldiskfs: Refresh suse15 sp3 series")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Idf4973522c40f8fc287742833e3af3835ebcdad4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55863
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-18057 mdt: don't include DOM bit to stripes lock 28/55828/3
Mikhail Pershin [Mon, 22 Jul 2024 08:50:06 +0000 (11:50 +0300)]
LU-18057 mdt: don't include DOM bit to stripes lock

Exclude DOM bit from inodebits mask used to restriping.
That might cause assertions further in inodebits code if
conflicts with GROUP lock. This bit is not needed anyway
but is taken just as part of MDS_INODELOCK_FULL used there

Patch uses mask MDS_RESTRIPE_ELC with excluded DOM bit for
restriping and prohibits further attempts to combine DOM
lock with other ibits mandatory. Note, that is restriction
only for local MDT locks as they are blocking locks.
In all such cases trybits to be used either for DoM bit or
for others

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I2fed05caf60aaa17a0d91ecf7b72df2b4ff95141
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55828
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-18054 build: Debian 12 with module-assistant 0.11.11 17/55817/2
Shaun Tancheff [Sat, 20 Jul 2024 04:46:23 +0000 (11:46 +0700)]
LU-18054 build: Debian 12 with module-assistant 0.11.11

Building with module-assistant 0.11.11 fails in module-assistant
prep-deb-files generic.make rule:

   The required compiler '<...gcc-12 make...>' is not installed, \
   won't continue!
   Set RELAX_CC_CHECK variable to skip plausibility checks.

Suppress the auto detection by explicitly setting
CC and RELAX_CC_CHECK when running m-a

HPE-bug-id: LUS-12443
Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Icb2330884b542ba2a1a36b0318a3551c14c8ea09
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55817
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Caleb Carlson <caleb.carlson@hpe.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-16350 ldiskfs: Server support for linux v6.10 29/55729/3
Shaun Tancheff [Tue, 23 Jul 2024 02:09:42 +0000 (09:09 +0700)]
LU-16350 ldiskfs: Server support for linux v6.10

Updated patch series for Linux v6.10:
   ext4-corrupted-inode-block-bitmaps-handling-patches.patch
   ext4-delayed-iput.patch
   ext4-filename-encode.patch
   ext4-max-dir-size.patch
   ext4-mballoc-extra-checks.patch
   ext4-misc.patch
   ext4-prealloc.patch

The same updates applies for Ubuntu 6.10.0 kernel

Test-Parameters: trivial
HPE-bug-id: LUS-11376
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I456ec723f04aaf57cb64965cc9d53fbea23a8c27
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55729
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-18034 build: compatibility updates for kernel 6.10 28/55728/3
Shaun Tancheff [Mon, 15 Jul 2024 01:57:04 +0000 (08:57 +0700)]
LU-18034 build: compatibility updates for kernel 6.10

Braces required around trivial conditional statements that devolve
to a single semi-colon (;).

static modifier should be the first modifier used.

Use 'static inline' or 'inline' modifier at the front
of declaration if inline is to be used.

const int func(), const is discarded and should not be used.

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Iff67ff589e3ffde522c3b5bc03b1ec6705c6fc5c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55728
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-17057 tests: check OSCs FULL state when setting GSS flvr 28/55628/4
Sebastien Buisson [Tue, 2 Jul 2024 13:12:25 +0000 (15:12 +0200)]
LU-17057 tests: check OSCs FULL state when setting GSS flvr

When setting a GSS flavor, make sure all OSCs are in FULL state, so
that clients refresh their connections with the updated flavor.

Test-Parameters: trivial
Test-Parameters: testgroup=review-dne-selinux-ssk-part-1
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I7c43856e7951f23f2299b25e133fea72400daf94
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55628
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>
6 weeks agoLU-15737 ofd: don't block destroys 98/55598/5
Alexander Boyko [Sat, 15 Jun 2024 10:04:34 +0000 (06:04 -0400)]
LU-15737 ofd: don't block destroys

ofd_destoy_by_fid could sleep infinite for a GROUP lock
conflict. If all MDT osp_sync_inflight is spend for such destroys,
MDT would not be able to send destroys and setattr. And as a result
OST free space leakage.

This fix makes ldlm_cli_enqueue_local nonblocking for group locks,
and adds MDT repeat part of sync requests with errors.
Also patch adds a debugfs file to check hanged osp jobs.
lctl get_param osp.lustre-OST0000-osc-MDT0000.error_list

Adds recovery-small 160. It reproduces a situation when
MDT sends object destroys and it hangs at OST side,
because of conflicting GROUP lock.

Lustre: ll_ost02_068: service thread pid 51278 was inactive for
204.776 seconds. The thread might be hung...
Call Trace TBD:
ldlm_completion_ast+0x7ac/0x900 [ptlrpc]
ldlm_cli_enqueue_local+0x307/0x880 [ptlrpc]
ofd_destroy_by_fid+0x235/0x4a0 [ofd]
ofd_destroy_hdl+0x263/0xa10 [ofd]
tgt_request_handle+0xcc9/0x1a20 [ptlrpc]
ptlrpc_server_handle_request+0x23f/0xc60 [ptlrpc]
ptlrpc_main+0xc8b/0x15d0 [ptlrpc]

HPE-bug-id: LUS-12350
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I396bf48d3d29f058f65095cbb4dbba11581534cc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55598
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-17000 utils: interger overflow fixes 88/55588/6
Shaun Tancheff [Tue, 2 Jul 2024 07:07:46 +0000 (14:07 +0700)]
LU-17000 utils: interger overflow fixes

CoverityID: 426402 ("Logical vs. bitwise operator")
LIBCFS_ALLOC_PRE()
  Add extra parenthesis to clarify && vs & precedence

CoverityID: 429655 ("Overflowed integer argument")
LIBCFS_FREE()
  Use size_t to avoid integer overflow

CoverityID: 429629 ("Overflowed integer argument")
jobid_interpret_string()
  Prevent joblen from becoming negative, truncate if necessary.

CoverityID: 429557 ("Overflowed constant")
ll_stats_pid_write()
   if len is 0 prevent stack corruption via kernbuf

CoverityID: 429646 ("Overflowed integer argument")
llog_pack_buffer()
  ssize_t read(): prevent int overflow if read() returns > INT_MAX

CoverityID: 429630 ("Overflowed integer argument")
readline() in cacheio.c
  ssize_t read(): prevent int overflow if read() returns > INT_MAX

CoverityID: 429624 ("Overflowed integer argument")
osd_read()
  passes loff_t size to osd_ldiskfs_readlink, update
  osd_ldiskfs_readlink to accept size_t length to avoid a
  theoretical overflow

Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ica8a5e1ce58e540016e4bc101763f835eed2c2f7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55588
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-17989 tests: Cleanup fake interface usage 65/55465/6
Chris Horn [Mon, 17 Jun 2024 17:58:41 +0000 (11:58 -0600)]
LU-17989 tests: Cleanup fake interface usage

Callers of have_interface() are using it to check that setup_fakeif()
completed successfully. Update setup_fakeif() to perform its own
validation. Both IPv4 and IPv6 addresses should be assigned to the
fake interface, so setup_fakeif() now checks for both of these.

Test cases that use the non-default namespace should call
setup_netns()/cleanup_netns() themselves rather than relying on the
test suite to setup this environment.

Test-Parameters: trivial
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I80451c55b8b7b6919b7d7e94e72265f2e6aa2854
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55465
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-15504 utils: lfs find -ls function 43/55443/11
Maximilian Dilger [Sun, 16 Jun 2024 01:55:46 +0000 (21:55 -0400)]
LU-15504 utils: lfs find -ls function

Added -ls function for lfs find. It is equivalent to using
printf "%i/t%k/t%M/t%n/t%u/t%g/t%s/t%t/t%p/n"

Signed-off-by: Maximilian Dilger <mdilger@whamcloud.com>
Change-Id: If84687915a2f71be81ee8adc5c9402371d635956
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55443
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: Anjus George <georgea@ornl.gov>
6 weeks agoLU-14714 mgc: server to mount without local config 83/55283/8
Mikhail Pershin [Wed, 29 May 2024 18:27:13 +0000 (21:27 +0300)]
LU-14714 mgc: server to mount without local config

Server uses local config copy to mount with but
that is not the case always. Local config can be
damaged or empty and may be not updated from MGS,
e.g. due to -ENOSPC on server upon llog backup or
other errors. That causes empty or partial local
config so server unable to mount with it.

Patch allows a server to mount first from remote config
if local config wasn't copied from MGS. If remote
processing is not possible or failed then local config
is used as last attempt to mount.

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I442a4f20eeb7deb1b40ccc7cabb1fae65804e211
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55283
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>
6 weeks agoLU-17779 lnet: use copy_page() 23/54923/4
Patrick Farrell [Fri, 26 Apr 2024 02:27:26 +0000 (22:27 -0400)]
LU-17779 lnet: use copy_page()

When copying one page to another in kernel memory, the
kernel has an optimized copy_page which can be used instead
of memcpy().

This is relevant in the lnet loopback subsystem, which
copies from the kiov from the client to that on the server.
(Using the same page is nasty for a lot of reasons, so
 copying is best.)

So we can check for the full page to full page copy and
use that.

On my little tiny VM system, this improves maximum write
performance (with the fake write fail_loc enabled) by about
20%, from 4.4 GiB/s to 5.7 GiB/s.

We should also eventually be able to add a fake copy to the
fake read/fake write fail loc, but that's a bit tricky, so
will be left out of this patch.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Iea89447ed03bd4646544883b588873700f6e09a4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54923
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: Chris Horn <chris.horn@hpe.com>
6 weeks agoLU-10499 pcc: add pcc_mode parameter for permission check 22/54422/4
Qian Yingjin [Wed, 1 Sep 2021 13:45:47 +0000 (21:45 +0800)]
LU-10499 pcc: add pcc_mode parameter for permission check

This patch introduced a "llite.*.pcc_mode" parameter for PCC.
By this parameter, administrator can determine what file access
permissions should be allowed to bring files into PCC device for
caching.
This paramter is set with 0 by default.
Add sanity-pcc test_46 to verify it.

In this patch, it also ignores the EEXIST error when found that the
file had already attached into PCC during the manual attach.

EX-bug-id: EX-3741
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I1e006e4f723c1c177ae84c64ad32c6049a57110f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54422
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>
6 weeks agoLU-15837 utils: added lfs find --printf functions 41/55441/20
Maximilian Dilger [Wed, 12 Jun 2024 17:04:31 +0000 (13:04 -0400)]
LU-15837 utils: added lfs find --printf functions

adding functionality for:  %i (inode number)
     %M (symbolic file access mode)
     %g (groupname)
     %u (username)

Test-Parameters: trivial
Signed-off-by: Maximilian Dilger <mdilger@whamcloud.com>
Change-Id: I2a577c1c9869bfcda9aa20f60db65c7dc888204d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55441
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
6 weeks agoLU-13814 osc: do not call osc_lru_use for transient 87/52087/22
Patrick Farrell [Fri, 23 Feb 2024 16:22:20 +0000 (11:22 -0500)]
LU-13814 osc: do not call osc_lru_use for transient

Transient pages are never added to the LRU, because they
can't be cached.  osc_lru_use already skips them because
they don't have the flag set, but make it explicit that
this is not called for transient pages.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I2c92ccb52380faefbcba3bfa35508dac2b601bd4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52087
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
6 weeks agoLU-13814 osc: remove "osc_page_transfer_add" wrapper 86/52086/21
Patrick Farrell [Fri, 23 Feb 2024 16:21:49 +0000 (11:21 -0500)]
LU-13814 osc: remove "osc_page_transfer_add" wrapper

osc_page_transfer_add is just a wrapped around osc_lru_use,
let's remove it to be more explicit about what we're
actually doing.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I495a90bee7dc8f8c9d823fa47f9303d2fac2a829
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52086
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
6 weeks agoLU-13814 clio: remove cl_page_prep for transients 85/52085/21
Patrick Farrell [Fri, 23 Feb 2024 16:21:26 +0000 (11:21 -0500)]
LU-13814 clio: remove cl_page_prep for transients

cl_page_prep no longer does anything for transient pages,
finish cleaning that up and make it explicit with asserts.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I3285a69f971530ba0407de128430bb2497900d11
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52085
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
7 weeks agoLU-17151 tests: increase memcg limit on x86_64 68/55568/7
Qian Yingjin [Fri, 28 Jun 2024 02:41:47 +0000 (22:41 -0400)]
LU-17151 tests: increase memcg limit on x86_64

The x86_64 memcg limit of 384MB is quite small, often resulting in
failures on sanity/test_411b in some exterme situations when test
in VM environments.

To avoid the failures, we increase the limit with 1024MiB on both
x86_64 and arm systems.

And we also skip the test if the available OST storage space are
not enough.

Test-Parameters: trivial testlist=sanity env=ONLY=411b,ONLY_REPEAT=100
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I1064a4c2523b8d3e721f9712c17b829a9b1796dc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55568
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>
7 weeks agoLU-18019 tests: Convert hostname to IP list 07/55707/9
Chris Horn [Thu, 11 Jul 2024 18:51:18 +0000 (12:51 -0600)]
LU-18019 tests: Convert hostname to IP list

modify h2name_or_ip to convert the specified hostname into a
comma separated list of NIDs. If FORCE_LARGE_NID is true, and the host
has IPv6 addresses, then only those IPv6 NIDs are listed. If it is
false, and the host has IPv4 addresses, then only those IPv4 NIDs are
listed. Otherwise, we list NIDs based on whichever addresses are
present.

h2name_or_ip() may be called prior to init_test_env, and in this case
FORCE_LARGE_NID will not be initialized. Add FORCE_LARGE_NID to
cfg/local.sh to ensure it is set before h2name_or_ip() is called.

Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I0ef74eef5748d495e6b64f023c07d8eb4a23a5ed
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55707
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-17925 utils: fix 'lfs setstripe -c -1' interop 48/55548/11
Rajeev Mishra [Thu, 27 Jun 2024 03:37:18 +0000 (03:37 +0000)]
LU-17925 utils: fix 'lfs setstripe -c -1' interop

This issue was caused by the -C option was storing -1 as 0xffdf
and -33 was stored as 0xffff, which changed the on-disk file layout
compared to all older versions storing -1 as 0xffff. This resulted
in interop failure of 'lfs setstripe -c/-C' usage.

Instead, store stripe_count as -1 = 0xffff, and -32 = 0xffe0, like
normal unsigned short.  There is no need to distinguish "-c -1"
from "-C -1" in the layout since they both mean the same thing, to
allocate one object per OST.  However, don't allow "-c -2..-32"
since this has no meaning today.  Keep these in reserve in case we
assign some meaning to them in the future.

Restore LLAPI_LAYOUT_WIDE and LOV_ALL_STRIPES definitions, since
these are part of the API and may be used by userspace applications.

Rename LOV_ALL_STRIPES_MIN to LOV_ALL_STRIPES_WIDE since it was
confusing that the "MIN" value created files with the most stripes.

Rename LOV_V1_INSANE_STRIPE_COUNT to LOV_V1_INSANE_STRIPE_INDEX
since it is really the maximum OST index and not a stripe count.

Test-Parameters: testlist=sanity-flr serverversion=2.15 env=SANITY_FLR_EXCEPT="0k 44e 205"
Fixes: 1a6ef725c285 ("LU-16938 utils: setstripe overstripe multiple OST count")
Signed-off-by: Rajeev Mishra <rajeevm@hpe.com>
Change-Id: I3908bd5a70aa35305ef8f278fb0346319055e5b3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55548
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
7 weeks agoLU-17905 kernel: new kernel [SLES15 SP6 6.4.0-150600.23.14.2] 63/55563/14
Jian Yu [Thu, 25 Jul 2024 17:27:34 +0000 (10:27 -0700)]
LU-17905 kernel: new kernel [SLES15 SP6 6.4.0-150600.23.14.2]

This patch makes changes to support new SLES15 SP6 release
with kernel 6.4.0-150600.23.14.2 for Lustre client.

In Lustre test suites, there are some subtests using filefrag
from Lustre-patched e2fsprogs. This patch adds checks in those
subtests to skip them if the Lustre-patched e2fsprogs is not
installed on Lustre client.

Test-Parameters: trivial mdtcount=4 mdscount=2 \
  env=SANITY_EXCEPT="27J 103a 244a" \
  clientdistro=sles15sp6 testlist=sanity

Test-Parameters: optional clientdistro=sles15sp6 testgroup=full-part-1
Test-Parameters: optional clientdistro=sles15sp6 testgroup=full-part-2
Test-Parameters: optional clientdistro=sles15sp6 testgroup=full-part-3

Change-Id: Ib9159d200122595d0a56e3581cfc66d75ddb59f6
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55563
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-15593 tests: fix sanity-flr/44e interop check 45/55845/3
Frederick Dilger [Tue, 23 Jul 2024 18:55:37 +0000 (12:55 -0600)]
LU-15593 tests: fix sanity-flr/44e interop check

sanity-flr.sh test_44e was failing interop testing with 2.15 servers
because the version check was 2.14.52 when the patch didn't land
until v2_15_50-155-ga3f1c4622a. Update the interop check accordingly.

Test-Parameters: trivial testlist=sanity-flr
Test-Parameters: testlist=sanity-flr env=ONLY=44 serverversion=2.15
Fixes: a3f1c4622a ("LU-15593 mdt: Add option to disable use of SOM")
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I432078410003bea260032473729d89c9e174330f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55845
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>
7 weeks agoLU-18056 osp: fix KASAN warning when lu2dt_dev() lwp device 25/55825/2
Timothy Day [Sun, 21 Jul 2024 21:47:29 +0000 (17:47 -0400)]
LU-18056 osp: fix KASAN warning when lu2dt_dev() lwp device

A lwp device isn't really a dt device, so it shouldn't be
marked as such. This causes a KASAN warning when obd_setup()
attempts to access dt device fields using lu2dt_dev():

 BUG: KASAN: slab-out-of-bounds in obd_setup+0x208/0x4b0 [obdclass]

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ib52b0f93c35a7d966314b6375ee963bc59f86abb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55825
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-17685 tests: skip nocompr test for older versions 16/55816/3
Alexandre Ioffe [Fri, 19 Jul 2024 23:43:01 +0000 (16:43 -0700)]
LU-17685 tests: skip nocompr test for older versions

nocompr flag in lfs mirror extend is supported
after MDS version v2_15_61-245-g37e1316050

Fixes: 37e1316050 ("LU-17685 utils: Allow nocompr flag in lfs mirror extend")
Test-Parameters: trivial testlist=sanity-flr env=ONLY="205a 205b"
Test-Parameters: trivial testlist=sanity-flr env=ONLY="205a 205b"
Test-Parameters: trivial testlist=sanity-flr env=ONLY="205a 205b"
Signed-off-by: Alexandre Ioffe <aioffe@ddn.com>
Change-Id: I5c23e549893b9f6dbc016b79d4a6601a8320bf94
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55816
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-18027 lfs: lfs find handling special files 09/55709/15
Caleb Carlson [Tue, 2 Apr 2024 16:29:48 +0000 (10:29 -0600)]
LU-18027 lfs: lfs find handling special files

This replaces fget_projid() with get_projid(),
a newer function that is able to get project ids on
regular files, directories, symbolic links, and
special file types. This adopts the same approach to
getting file attributes that lfs_project.c uses in
project_get_fsxattr() by getting a special file's
attributes by the containing directory.

This patch also replaces the exclusion logic for
the --projid flag, reducing the depth count of if/else
clauses by checking a boolean equivalence statement.

Boolean algebra table for why this works (skip means
we don't print, include means we do):

matches | exclude_projid | matches == exclude_projid |
------------------------------------------------------
   1    |       1        |            1 (skip)       |
   1    |       0        |            0 (include)    |
   0    |       1        |            0 (include)    |
   0    |       0        |            1 (skip)       |

Finally, this patch replaces the INVALID_PROJID = -1
definition with DEFAULT_PROJID = 0. A major reason for
this is that projid is defined as an unsigned, 32-bit
integer, so storing a negative value in it doesn't make
much sense. With this patch we should be able to get
the project id for every file type (special or not),
so we no longer need a case for invalid projid.

.gitignore .vscode/settings.json files.

Add test_56ei in sanity.sh that sets a project id
on some special files and checks that lfs find --printf
picks up the file, and prints the correct project
id.

Updates error messages in test_56rd to not assume
we can't get projid from special file types.

Fix bug where we were only printing file types.

HPE-bug-id: LUS-12195
Signed-off-by: Caleb Carlson <caleb.carlson@hpe.com>
Test-Parameters: testlist=sanity
Change-Id: I8b10044ea62d662d6f9388725c0e93d55a43b431
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55709
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: corey tesdahl <corey.tesdahl@hpe.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Sakib Samar <sakib.samar@hpe.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-18019 tests: Check for large NIDs in load_modules_local 94/55694/6
Chris Horn [Wed, 10 Jul 2024 16:39:52 +0000 (10:39 -0600)]
LU-18019 tests: Check for large NIDs in load_modules_local

Enforce FORCE_LARGE_NID in load_modules_local by calling load_lnet()
with config_on_load=1. This will force large NID configuration (if
large NIDs are assigned to LNet interfaces), but should not alter
the existing behavior when large NIDs are not assigned to LNet
interfaces.

Test-Parameters: trivial
Fixes: c8ca47daac ("LU-16822 tests: Force IPv6 testing in mixed environment")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I66d201c61c59246486f2aa60ab2338bd9e5317b6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55694
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
7 weeks agoLU-13403 utils: mirror-count not required for mirror extend 77/55677/7
Frederick Dilger [Tue, 9 Jul 2024 19:11:20 +0000 (13:11 -0600)]
LU-13403 utils: mirror-count not required for mirror extend

If [--mirror-count|-N] is not specified for 'lfs mirror extend', '-N'
will be added to the option arguments before lfs_setstripe_internal()
is called.

The lustre manual states for 'lfs mirror extend':
    "The mirror_count argument is optional and default to 1 if it is
     not specified."
Which can be interpretend as [--mirror-count|-N] does not need to be
specified rather than the MIRROR_COUNT being optional.

It also makes sense that someone who is using 'lfs mirror extend' in
fact intends to extend the mirror count, so it would make sense to
have a default for mirror-count without it having to be specified.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I01bea6cec71fbf61c617cf27a52d7fb24fd4b06d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55677
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-18005 gss: allow regular users to authenticate on MGS 40/55640/5
Sebastien Buisson [Fri, 5 Jul 2024 14:51:44 +0000 (16:51 +0200)]
LU-18005 gss: allow regular users to authenticate on MGS

It can be useful for regular users to be able to authenticate against
the MGS, for instance to run 'lfs check mgts'.
Just allow this type of authentication request in the code, and take
into account the MGC export when doing 'lfs flushctx', so that any
user key associated with the MGS gets flushed as well.

Add sanity-krb5 test_152 to exercise this capability.

Test-Parameters: trivial
Test-Parameters: testgroup=review-dne-selinux-ssk-part-1
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I4871b4ed61af918644e11d64ef5750a858713323
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55640
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>
7 weeks agoLU-18002 build: proper MOFED detection with multiple installations 25/55625/4
Aurelien Degremont [Wed, 3 Jul 2024 13:43:36 +0000 (15:43 +0200)]
LU-18002 build: proper MOFED detection with multiple installations

For build step, OFED detection is based on header path detected
from the locally installed packages.

Building with multiple OFED headers installed (for different
kernels by example) is broken since v2_15_63-60-g0e9708016b.

This patch is at least fixing the Ubuntu case, and the EL
case is not changed, what was working is still working, but
the broken case is still broken.

Also simplify the package query a little bit.

Fixes: 0e9708016 ("LU-16819 build: use mofed path based on target kernel")
Signed-off-by: Aurelien Degremont <adegremont@nvidia.com>
Change-Id: Ib15f971ea745d9deded6288e3ed4663bdd385da0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55625
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: ake sandgren <ake.sandgren@hpc2n.umu.se>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-9544 utils: set -P if missing in 'set_param -d' 99/55399/18
Frederick Dilger [Tue, 11 Jun 2024 21:35:35 +0000 (17:35 -0400)]
LU-9544 utils: set -P if missing in 'set_param -d'

The -P option to lctl set_param will now be added if
the -d option (for delete) is specified by itself.

As described in the ticket, if a value is erroneously supplied when
using -P and -d then instead of being deleted, the parameter is
set to the old value with a trailing '='. A non-regression test
has been created to verify that this isn't happening.

wait_update_cond and wait_update were modified to avoid unresolved
errors from throwing an unwanted errnum during the wait. They still
operate with logical equivalence to before.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: If35b2e9db51f7296da25b798205b9f9104830bca
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55399
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
7 weeks agoLU-10499 pcc: add test for concurrent read from 2 clients 19/54419/10
Qian Yingjin [Tue, 31 Aug 2021 03:45:25 +0000 (11:45 +0800)]
LU-10499 pcc: add test for concurrent read from 2 clients

This patch add a test case with concurrent read access from 2
clients.
The purpose is to verify that the client will not re-attach file
into PCC backend once attached when the file is read access
concurrently from 2 mount points on a client according to the
PCC attach stats.

EX-bug-id: EX-3730
Test-Parameters: trivial
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ibb038bd3a74f43031b6fab4e65565620c416909e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54419
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-17628 lfs: add lfs_setstripe admin restrict 41/54341/12
Patrick Farrell [Mon, 1 Apr 2024 16:12:00 +0000 (12:12 -0400)]
LU-17628 lfs: add lfs_setstripe admin restrict

In some settings, it's not desirable for users to be able
to set their own striping.  This is purely a 'convenience'
restriction, where the admin prefers users not set their
own striping to avoid user error, and not a security
restriction.  This is for sites which have a sensible
default striping and prefer users not modify it.

The goal here is to avoid user error.  However, some
applications use the Lustre API to set their own striping,
and it's not desirable for such applications to fail.

So setstripe fails with an error for the 'lfs' binary, and
is silently ignored in other cases.  In all cases, the file
is created with the default layout.

Note we return EACESS for this case rather than EPERM
because EPERM is already returned (via a special case) for
setting layout on the root of the file system.  This is a
distinct case because we do not want the special group
created by this patch to be able to set the root filesystem
layout, so the root of the FS continues to be handled
separately.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Id2e8dd175f5e3870f3aa64b69556308706d5317c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54341
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: wangdi <di.d.wang@oracle.com>
7 weeks agoLU-18017 lnet: Swapped put/get stats in net show 89/55689/2
Cyril Bordage [Wed, 10 Jul 2024 13:16:00 +0000 (15:16 +0200)]
LU-18017 lnet: Swapped put/get stats in net show

Inverse LNET_NET_LOCAL_NI_MSG_STATS_ATTR_PUT_COUNT and
LNET_NET_LOCAL_NI_MSG_STATS_ATTR_GET_COUNT in lnet_net_show_dump.

Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Fixes: d15bfca0785 ("LU-10391 lnet: migrate full LNet NI information collection")
Test-Parameters: trivial
Change-Id: Ib89bbae62a67c51c24c53d2634d4a00cdff9efeb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55689
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
7 weeks agoLU-17999 lnet: prevent race in access to peer rtrcredits count 20/55620/9
Serguei Smirnov [Thu, 4 Jul 2024 00:02:32 +0000 (17:02 -0700)]
LU-17999 lnet: prevent race in access to peer rtrcredits count

Refactor lnet_parse_forward_locked and lnet_post_routed_recv_locked
to have the code which checks and acts on peer rtrcredits in a single
spot, in order to avoid the race when the count is decremented
(by another thread) after being checked initially for the purpose of
"eager receiving" the message, which might cause an assert on
msg_rx_ready_delay to get triggered.

This race is possible if messages from the same peer NID are being
processed on different local NIs mapped to different CPTs.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Ibe938882a69d860554cd9c875403bfb0399df8ec
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55620
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
7 weeks agoLU-15899 mdt: mdt_hsm_release default lov buffer 01/55801/2
Shaun Tancheff [Fri, 19 Jul 2024 04:07:29 +0000 (11:07 +0700)]
LU-15899 mdt: mdt_hsm_release default lov buffer

If LOV is not set during mdt_hsm_release the md_attr needs
to be assigned a large enough buffer to define lov default
values.

Since the md_attr is possibly not populated at this point
use the common mti_xattr_buf to hold the values.

Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I3e1c2f751bb031fdf3ea0d8583213cd5c81a57d7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55801
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-18066 obdclass: reorder s1 string instead of options string 39/55839/2
James Simmons [Tue, 23 Jul 2024 14:09:09 +0000 (10:09 -0400)]
LU-18066 obdclass: reorder s1 string instead of options string

Testing with client mounts with multiple MGS NIDs exposed a bug
in that mount options could be lost. In this case user_xattr
from our testing. The mistake was moving the s2 string into the
wrong string; options; instead of s1.

Fixes: 415fa27540 ("LU-9325 obdclass: use match_table for server mount options")
Change-Id: I0a5e1511d558e4600a009b7e7820f68d399bcc21
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55839
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Maximilian Dilger <mdilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 weeks agoLU-13814 clio: cleanup cl_page_completion 84/52084/21
Patrick Farrell [Fri, 23 Feb 2024 16:19:59 +0000 (11:19 -0500)]
LU-13814 clio: cleanup cl_page_completion

Clean up cl_page_completion and make very explicit which
parts of the function do not apply to transient pages.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Ic288717c8487ff963f0fa7f63a943e72d05d129a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52084
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
7 weeks agoLU-13814 llite: note references in direct_rw_pages 83/52083/21
Patrick Farrell [Fri, 23 Feb 2024 16:18:18 +0000 (11:18 -0500)]
LU-13814 llite: note references in direct_rw_pages

Add a comment denoting the function of cl_2queue_fini in
ll_direct_rw_pages.  This will eventually be removed as
part of this process, but this comment serves as a remidner
for when we get to that step.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I98a03c7ee0d97665d77a321bc21b4fab6448b2d7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52083
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
7 weeks agoLU-13814 clio: further transient own/disown removal 82/52082/20
Patrick Farrell [Fri, 12 Jul 2024 15:53:56 +0000 (11:53 -0400)]
LU-13814 clio: further transient own/disown removal

This patch goes a bit further in removing own/disown for
transient pages, including adding asserts that the code is
not called for transient pages.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Ibad555e50088adc53a66d0e4aeba5558ac2b6a06
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52082
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>
7 weeks agoLU-13814 clio: remove cl_page_delete for transient 80/52080/20
Patrick Farrell [Wed, 29 May 2024 15:16:52 +0000 (11:16 -0400)]
LU-13814 clio: remove cl_page_delete for transient

cl_page_delete no longer does anything for transient pages,
so do not call it for them.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I666cceaa1f05bf7e86fb60782eb573d5714051ee
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52080
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
7 weeks agoLU-13814 clio: remove discard for transient pages 81/52081/22
Patrick Farrell [Wed, 29 May 2024 15:16:39 +0000 (11:16 -0400)]
LU-13814 clio: remove discard for transient pages

With cl_page_delete removed for transient pages, now
cl_page_discard doesn't do anything for transient pages.

Remove it.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Ib62e8a5aea71669428b7b61ba989867702bf1758
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52081
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 weeks agoLU-18045 mdt: do extra MDT cleanup before barrier 91/55791/3
Mikhail Pershin [Thu, 11 Jul 2024 16:48:40 +0000 (19:48 +0300)]
LU-18045 mdt: do extra MDT cleanup before barrier

In osp_disconnect() do namespace cleanup to don't
leave OSP locks pinning obd_export_barrier()

In mdt_fini() call target_recovery_fini() and
mdt_quota_fini() before calling obd_export_barrier()

Fixes: ffedcbae21 ("LU-17809 osp: make disconnect asynchronous")
Change-Id: I97bf7915cf8b77e26b2a8f1ba41c6128575bd06b
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55791
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
7 weeks agoLU-16011 lnet: remove LBUG() in srpc_client_rpc_expired() 85/55785/2
Timothy Day [Wed, 17 Jul 2024 18:24:10 +0000 (18:24 +0000)]
LU-16011 lnet: remove LBUG() in srpc_client_rpc_expired()

We shouldn't crash just because an RPC expired.

Fixes: e5026380 ("LU-16011 lnet: use preallocate bulk for server")
Test-Parameters: trivial
Test-Parameters: testgroup=review-ldiskfs-arm testlist=sanity-lnet,lnet-selftest
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ia4e9bf7f688b2920c91444f57f7a7da2b1f89a67
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55785
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 weeks agoLU-18006 osc: rework sdio locking 49/55649/7
Patrick Farrell [Sat, 6 Jul 2024 18:10:26 +0000 (14:10 -0400)]
LU-18006 osc: rework sdio locking

We cannot hold a spinlock across a call to kthread_create,
so we have to rearrange the locking for this, moving the
locking inside the data copy function.  This handles the
multithreading in a slightly different spot.

Test-Parameters: testlist=sanity env=ONLY=119f,ONLY_REPEAT=100
Test-Parameters: testlist=sanity env=ONLY=119f,ONLY_REPEAT=100
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I30c1c6600ebfe2e1fb54606608ea55469ae06937
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55649
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>
8 weeks agoLU-17367 utils: improved hostname and IPv6 NID support 06/55706/9
Maximilian Dilger [Thu, 11 Jul 2024 19:07:17 +0000 (15:07 -0400)]
LU-17367 utils: improved hostname and IPv6 NID support

Improved NID parsing to accept hostnames, IPv4 and IPv6 addresses.
IPv6 addresses need @network to be parsed properly. The following
is a valid IPv6 address: "6699:7654::1234:1234:d84@tcp"

All other non IPv6 addresses can be passed in without a network
identifier.

Signed-off-by: Maximilian Dilger <mdilger@whamcloud.com>
Change-Id: I131c8b2d1f7b0fe593564af90308d2d3ea278a0c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55706
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
8 weeks agoLU-14992 mdt: restore mkdir VBR support 14/55714/3
Lai Siyao [Sun, 2 Jun 2024 16:02:45 +0000 (12:02 -0400)]
LU-14992 mdt: restore mkdir VBR support

The patch of LU-14470 (striped mkdir replay by client request) broke
the mkdir VBR support: in mkdir replay, if target exists, it should
do version check instead of return -EEXIST directly, otherwise the
VBR support is broken.

Fixes: a2e997f0be ("LU-14470 dne: striped mkdir replay by client request")
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I858499f3ef5315bbce9538733400cf6102675e4c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55714
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 weeks agoLU-18020 tests: define CONFIG for do_rpc_nodes 95/55695/2
Chris Horn [Wed, 10 Jul 2024 17:03:49 +0000 (11:03 -0600)]
LU-18020 tests: define CONFIG for do_rpc_nodes

This allows correct test environment definitions when CONFIG is
defined but not NAME. This is useful when configuration files live
some place other than lustre/tests/cfg

Test-Parameters: trivial
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: If1be2123d5fc60a1bdf210627bc5d0b9bdbf3daa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55695
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Elena <elena.gryaznova@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>