Whamcloud - gitweb
fs/lustre-release.git
2 weeks agoLU-9633 lod: Add kernel doc style for lod (Part 2) 04/58604/4
Arshad Hussain [Thu, 27 Mar 2025 17:30:04 +0000 (23:00 +0530)]
LU-9633 lod: Add kernel doc style for lod (Part 2)

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I00844d369329541da28ef55f997fd295930db0c5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58604
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Anjus George <georgea@ornl.gov>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-18860 mdd: fix CLF_UNLINK_LAST on open file unlink 78/58578/4
Etienne AUJAMES [Fri, 28 Mar 2025 17:57:11 +0000 (18:57 +0100)]
LU-18860 mdd: fix CLF_UNLINK_LAST on open file unlink

The flag CLF_UNLINK_LAST should be set for UNLINK changelog if the
last link is removed.

This flag is not set if the file is open on a client.
If the file open, Lustre will re-link the file in the PENDING
MDT directory. So, la_nlink == 1 after mdd_finish_unlink() and
CLF_UNLINK_LAST will not be set.

Check if the object is dead instead of relying on la_nlink to set the
flag.

Update the sanity 161c for that use case.

Test-Parameters: testlist=sanity env=ONLY=161c,ONLY_REPEAT=20
Test-Parameters: testlist=sanity env=ONLY=161
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I35ef530cd55cd5e07ad79a7cdae056de95735f61
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58578
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-16518 mgs: remove dt2msg_obj/dev() and friends 53/58553/3
Timothy Day [Thu, 27 Mar 2025 02:29:43 +0000 (22:29 -0400)]
LU-16518 mgs: remove dt2msg_obj/dev() and friends

Several of these helper functions are helping no one.
Let's remove them from the header.

Fixes: ef0b61b01f0f ("LU-1301 mgs: lu device for mgs")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Idf3a5dfa4549f6882e9c195301f58b90f86bee52
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58553
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-16518 lnet: remove unused lnet_find_peer_net_locked() 52/58552/2
Timothy Day [Thu, 27 Mar 2025 02:17:08 +0000 (22:17 -0400)]
LU-16518 lnet: remove unused lnet_find_peer_net_locked()

This function is no longer used, so let's drop it.

Fixes: 4e48761a5719 ("LU-9120 lnet: refactor lnet_select_pathway()")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I71ab22793e63577f7e0fb88dfc14cddcbc32e17e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58552
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-18788 ptlrpc: cancel PM-QoS delayed work 54/58354/5
Alex Zhuravlev [Sun, 9 Mar 2025 14:27:20 +0000 (17:27 +0300)]
LU-18788 ptlrpc: cancel PM-QoS delayed work

PM-QoS request can be inactive, but this should not prevent cleanup
upon connection finalization.  otherwise the kernel may run the timer
when the module has been unloaded and hit oops:

BUG: unable to handle kernel paging request at 000000000000a578
Oops: 0002 [#1] PREEMPT SMP DEBUG_PAGEALLOC
CPU: 1 PID: 0 Comm: swapper/1
RIP: 0010:expire_timers+0x6a/0x1b0
...
Call Trace:
 <IRQ>
 run_timer_softirq+0x88/0x150
 __do_softirq+0xd2/0x4cd
 irq_exit_rcu+0xda/0xe0
 irq_exit+0x5/0x20
 smp_apic_timer_interrupt+0xbf/0x290
 apic_timer_interrupt+0xf/0x20
 </IRQ>

Fixes: 54a64ea818 ("LU-18446 ptlrpc: lower CPUs latency during client I/O")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I6f93894290eb5aa6497c0dc39ce98dece38f9028
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58354
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bruno Faccini <bfaccini@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-16518 lnet: fix implicit-fallthrough warnings 49/58349/3
Timothy Day [Sat, 8 Mar 2025 21:46:32 +0000 (16:46 -0500)]
LU-16518 lnet: fix implicit-fallthrough warnings

Explicitly lable switch-case intentional fallthroughs
and reorder cases as needed to silence implicit-fallthrough
warnings as reported by Clang.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: If6550d97e9f49a6722f8e9a2ae34ba2338f39e73
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58349
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
2 weeks agoLU-12597 tests: remove comma_list for MDTs part 8 26/58026/3
Andreas Dilger [Wed, 9 Oct 2024 21:56:10 +0000 (15:56 -0600)]
LU-12597 tests: remove comma_list for MDTs part 8

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

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

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I38509872350987564ca560ad93fdaba0443ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58026
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
2 weeks agoLU-18506 ptlrpc: improve lu_env_add error handling 72/57272/12
Shaun Tancheff [Thu, 3 Apr 2025 05:53:33 +0000 (12:53 +0700)]
LU-18506 ptlrpc: improve lu_env_add error handling

Improve error handling for cases when lu_env_add() could fail.

HPE-bug-id: LUS-12726
Fixes: d891becebb ("LU-17668 ptlrpc: create env in few more threads")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ie6627438340196ef50355893c52eacf3322fb2ef
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57272
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-18244 docs: update lfs mkdir description 11/57011/4
Keguang Xu [Thu, 14 Nov 2024 07:20:25 +0000 (15:20 +0800)]
LU-18244 docs: update lfs mkdir description

Accompany with the patch 56925 where "lfs mkdir -C -N" is
supported aiming to align the behavior of OSTs, this patch
adds related description.

Test-Parameters: trivial
Signed-off-by: Keguang Xu <squalfof@gmail.com>
Change-Id: I17f8aa3d5fa7df2c2b419320a0bedd0686ebaee0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57011
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-15834 lfs: rid of global variable "error_loc" 52/56852/12
Bobi Jam [Fri, 1 Nov 2024 11:22:24 +0000 (19:22 +0800)]
LU-15834 lfs: rid of global variable "error_loc"

This patch removes global variable "error_loc", and makes error
string local variables, so that the functions using them are
thread safe.

Test-Parameters: trivial testlist=sanity-flr,sanity-pfl
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ib93ff122e84c94b8363b69281b5ff3fa6abb4164
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56852
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 weeks agoLU-18757 tests: check UID/GID/PROJID are set in sanity-sec 75 28/58728/8
Marc Vef [Tue, 8 Apr 2025 14:09:00 +0000 (16:09 +0200)]
LU-18757 tests: check UID/GID/PROJID are set in sanity-sec 75

This patch extends sanity-sec test 75 testing all RPCs that modify
UID/GID/PROJID on the MDT inode and OST objects with the corresponding
operations. Using debugfs, the test verifies that the IDs are set
correctly.

Test-Parameters: trivial testlist=sanity-sec env=ONLY="75"
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: Iecb69bfe7b938f4fd74f196476bdfdee35197601
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58728
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-18757 client: Set UID/GID/PROJID on OST for OST_PUNCH RPC 47/58647/2
Marc Vef [Wed, 2 Apr 2025 19:49:59 +0000 (21:49 +0200)]
LU-18757 client: Set UID/GID/PROJID on OST for OST_PUNCH RPC

The OST_PUNCH RPC (as generated by "truncate -s" commands) does not
set the UID/GID/PROJID stored on an OST object. This is because the
obdo fields and corresponding valid flags are not set on the client
and OST sides.

This patch adds support for setting UID/GID/PROJID on the
corresponding OST objects for operations that send the OST_PUNCH RPC.

Sanity-sec test_75 is added to check that the IDs are set on the OST
objects.

Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: I9baabbe9e523c98523fa30d387197e1faf38199a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58647
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2 weeks agoLU-18869 dne: mdt migrate to check layout 85/58585/8
Alexander Zarochentsev [Sat, 29 Mar 2025 09:53:41 +0000 (09:53 +0000)]
LU-18869 dne: mdt migrate to check layout

MDT migrate doesn't check that the requested dir
layout already applied or the old layout conforms
the new one.

Adding a check for that allows to avoid unnecessary
fs opeations especially for repeating migration attempts
after a migration failure.

The following condition and the premature exit from
the migrate procedure:

if (spobj == tpobj)
GOTO(out, rc = -EALREADY);

was removed from mdd_migrate_object() due to it
didn't allow repeat of the same migrate command to
try to migrate objects which had been skipped in the
previous migrate attempt as they were open or had
LinkEA overflow.

lod_striping_from_default() should use named
constant of LMV_OFFSET_DEFAULT instead of -1.

HPE-bug-id: LUS-12657
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: Iaacffcc1ecf34c5e01cba57a44c5e3ade97d936a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58585
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
2 weeks agoLU-18878 ptlrpc: improve ping evictor and recovery timeout 20/58620/3
Vitaly Fertman [Mon, 31 Mar 2025 17:51:28 +0000 (20:51 +0300)]
LU-18878 ptlrpc: improve ping evictor and recovery timeout

Let's re-use the logic used for extending the ldlm prolong timeout for
the ping evictor timeout and for recovery timer timeout - use the AT
instead of hard-coded values.

As the AT-based ping timeout is extended on different value each time,
moving an updated export to the end of the timed list is able to make
it not well sorted. Change the list of timed exports, to the rbtree.

Partially revert LUS-11054, tunable ping_evict_timeout_multiplier is
not needed anymore

A minor cleanup of exp_timed flag on connect/reconnect.

Fixes: 8e66f061c ("LU-16002 ptlrpc: adds configurable ping interval”)
HPE-bug-id: LUS-11723
Signed-off-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Change-Id: I97b9795746ccd4242f9798c8192abd4d7a57bbac
Reviewed-on: https://es-gerrit.hpc.amslabs.hpecorp.net/162935
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58620
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoNew tag 2.16.54 2.16.54 v2_16_54
Oleg Drokin [Thu, 10 Apr 2025 07:00:51 +0000 (03:00 -0400)]
New tag 2.16.54

Change-Id: Icd8bc90c1843f6b3fc0489e7b651370362082d3f
Signed-off-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18419 tests: use ior when installed 74/56874/6
Alex Zhuravlev [Mon, 4 Nov 2024 04:41:45 +0000 (07:41 +0300)]
LU-18419 tests: use ior when installed

try to find both ior and IOR.

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ief3effd7cab542195a8f7aff77fb58ea57a71469
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56874
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-13726 build: fix spelling.txt pattern matching 96/58596/2
Andreas Dilger [Sun, 30 Mar 2025 04:11:40 +0000 (22:11 -0600)]
LU-13726 build: fix spelling.txt pattern matching

Fix the overly-broad regexp "%.*s" added for "DNAME" checking,
which matches *all* string format specifiers (since ".*" can be
zero or more characters).  This should be matching the literal
format "%.*s" for fixed-length strings.

Reorder other strings in spelling.txt to (roughly) alphabetical
order to make them easier to find.

Test-Parameters: trivial
Fixes: d097fcc51b ("LU-18810 obd: add a parameter to enable filename encoding")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0009f9470d16c340ebf5bcd2384b477bac500c13
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58596
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18867 kernel: update RHEL 8.10 [4.18.0-553.46.1.el8_10] 79/58579/2
Jian Yu [Sat, 29 Mar 2025 06:28:03 +0000 (23:28 -0700)]
LU-18867 kernel: update RHEL 8.10 [4.18.0-553.46.1.el8_10]

Update RHEL 8.10 kernel to 4.18.0-553.46.1.el8_10.

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

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

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

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

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

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

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

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

Change-Id: I3e1a75def1d2856686732c3254e7b0d6128d86e5
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58579
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18834 obdclass: check overflow when doing sum in stats 66/58566/3
Emoly Liu [Fri, 28 Mar 2025 10:30:54 +0000 (18:30 +0800)]
LU-18834 obdclass: check overflow when doing sum in stats

Check overflow when calculating cl_sum and cl_sumsquare in stats.

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Icdf31324ef0f06adc184e6fe5348acad25962d53
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58566
Reviewed-by: Andreas Dilger <adilger@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-18859 quota: show default quota and root squash 63/58563/4
Sergey Cheremencev [Tue, 18 Mar 2025 00:14:37 +0000 (03:14 +0300)]
LU-18859 quota: show default quota and root squash

When show default quotas don't swap ID=0 with squashed ID.
It is not required as default quotas are stored in a ROOT
lqe. Patch is against the following panic:

 (qmt_handler.c:58:qmt_get())
ASSERTION( !is_default || id->qid_uid == 0 ) failed:
 (qmt_handler.c:58:qmt_get()) LBUG
  ...
  dump_stack+0x41/0x60
  lbug_with_loc.cold.8+0x5/0x43 [libcfs]
  qmt_get+0x185/0x3e0 [lquota]
  qmt_quotactl+0x309/0xa10 [lquota]
  mdt_quotactl+0x21f/0x880 [mdt]
  tgt_request_handle+0xc9c/0x1990 [ptlrpc]
  ptlrpc_server_handle_request+0x323/0xbd0 [ptlrpc]
  ptlrpc_main+0xb45/0x13a0 [ptlrpc]
  kthread+0x134/0x150

Cleanup lqes created in sanity-quota_87 "lfs quota -a should
print default quota setting". Without that new default quota
limits are applied to 50 default lqes created in test case 87.
It produces too many useless lustre debug logs.

Add into stack_trap restoring initial nodemap values changed
in tests 1j and 75.

Fixes: 2686838fef ("LU-18240 sec: enforce per-nodemap project quota for root")
Fixes: a4fbe7341b ("LU-14739 quota: nodemap squashed root cannot bypass quota")
Fixes: 115562106b ("LU-18453 quota: show default quota in lfs quota -a")
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: Ieef5f8b99c92d8fef3addcb7d55771c96c82129f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58563
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-18293 test: use direct IO for quota test 33/58533/3
Hongchao Zhang [Tue, 18 Mar 2025 08:40:02 +0000 (16:40 +0800)]
LU-18293 test: use direct IO for quota test

In subtest 1b, 1c, 1d, the quota test should use DD with direct flag
to make sure the over-quota check is correct.

Test-Parameters: trivial testlist=sanity-quota env=ONLY=1,ONLY_REPEAT=100
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ief327fb56fdd2e5911e5f57256d5ec683e5edf8e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58533
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-16134 utils: un-deprecate 'lctl set_param -F' 32/58532/3
Andreas Dilger [Wed, 26 Mar 2025 07:55:11 +0000 (01:55 -0600)]
LU-16134 utils: un-deprecate 'lctl set_param -F'

The "lctl set_param -F" command was accidentally disabled in 2.16 due
to a mis-merge between two in-flight patches.  Restore this command.

Change some functions to use "const char" for string arguments.

Add an example usage of "lctl set_param -F" in the lctl-set_param.8
man page, and update it to match style guidelines.  Add descriptions
of the usage examples in the EXAMPLES section.

Update checkpatch-man.pl to quiet spurious warnings about examples
with client#, mgs#, mds#, or oss# in the command-line prompt text.

Test-Parameters: trivial
Test-Parameters: testlist=conf-sanity env=ONLY=123 combinedmdsmgs=false
Test-Parameters: testlist=conf-sanity env=ONLY=123 combinedmdsmgs=true
Fixes: 8be38f4bd8 ("LU-11077 utils: move get/set/list_param into own file")
Fixes: 29cfdc2f1e ("LU-16134 utils: adds lctl apply_yaml")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I7e8140bf5e1c5747df4785539a6fda491d500c1e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58532
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
3 weeks agoLU-16049 llite: struct cleanup and option ordering 15/58515/3
Andreas Dilger [Fri, 21 Mar 2025 23:09:03 +0000 (17:09 -0600)]
LU-16049 llite: struct cleanup and option ordering

Reorder some fields in struct ll_file_data and ll_inode_info to
remove holes to save space in these commonly-used structures.
Rename struct ll_file_data ll_lock_no_expand->lfd_lock_no_expand.

Alphabetize LL_SBI_ enum to be in alphabetical order (by option
type) so that it is easier to find options, and to deconflict
future field insertions so that they are not always at the end.
These values are only used in memory on the client.

Partly alphabetize the llite_attrs table to make it easier to
find entries, and deconflict future field insertions.  Not fully
ordered to avoid conflicts with in-flight patches.

There should not be any functional changes in this patch.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8b58e59bc7e5d4ab7422303edcac0036c82540e5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58515
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18837 tests: fix numeric comparison in sanity/101a 69/58469/3
Andreas Dilger [Thu, 20 Mar 2025 00:22:45 +0000 (18:22 -0600)]
LU-18837 tests: fix numeric comparison in sanity/101a

Use (( ... )) instead of [[ ... ]] for numeric comparisons.

Test-Parameters: trivial
Fixes: ff78e1aa33 ("LU-4322 tests: re-enable 101a in dne config")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I5e210e0ca6495df4497ef7071086ef5928c267eb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58469
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.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>
3 weeks agoLU-18803 lmv: add statfs stats to LMV device 32/58432/5
Andreas Dilger [Mon, 17 Mar 2025 08:11:33 +0000 (02:11 -0600)]
LU-18803 lmv: add statfs stats to LMV device

Enable the statfs stats for LMV to show aggregate stats, including
the marged (minimum) os_namelen from all MDTs.

Merge os_state together from targets.  Merge "downgrade" flags if
any target has a problem, mask "upgrade" flags if any target does
not have this improvement.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I07451e65b04e5570a025bd9ff2e72f34a00273c7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58432
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18752 obd: standardize error handling in obd_class.h 23/58223/4
Timothy Day [Wed, 26 Feb 2025 04:26:13 +0000 (23:26 -0500)]
LU-18752 obd: standardize error handling in obd_class.h

Remove OBD_CHECK_DEV_ACTIVE in favor of adding the same
checks obd_check_dev(). Convert all callers to use
obd_check_dev(). At the same time, cleanup imp_check_ops()
and fix Lustre macro usage.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I270799dd36ca5e312f1d3257bdd9aa68fdd1e835
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58223
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>
3 weeks agoLU-18687 doc: move man pages to Documentation [0] 21/58021/7
Timothy Day [Sat, 29 Mar 2025 22:28:57 +0000 (18:28 -0400)]
LU-18687 doc: move man pages to Documentation [0]

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

Start by setting up the initial directory
structure in Documentation/.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I15ed0687803513a7726cc5bd53b5ee5eb8f699f0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58021
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Ellis Wilson <elliswilson@microsoft.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18475 build: compatibility updates for kernel 6.13 06/57906/10
Shaun Tancheff [Wed, 19 Feb 2025 09:38:10 +0000 (16:38 +0700)]
LU-18475 build: compatibility updates for kernel 6.13

Linux v5.8-2483-gc0842fbc1b18
  random32: move the pseudo-random 32-bit definitions to prandom.h
Include prandom.h when available

Linux v6.13-rc1-2-gcdd30ebb1b9f
  module: Convert symbol namespace to string literal
__stringify macros used by MODULE_IMPORT_NS()

Linux v6.12-rc1-5-gfd15ba4cb00a
  ceph: Remove call to PagePrivate2()
PagePrivate2 removed, provide a replacement for older kernels.

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I6e1e43bad2fff967bbfce2e3df0f0f6ff251e413
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57906
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
3 weeks agoLU-7021 osd: fix credits optimization 70/57570/5
Alex Zhuravlev [Mon, 23 Dec 2024 05:35:09 +0000 (08:35 +0300)]
LU-7021 osd: fix credits optimization

as object's uid/gid can change after declaration in a concurrent
thread, we can't really trust them to optimaze credits calculation.
so only target uid/gid (what we declare to change to) can be used
for optimization.

Fixes: 9f79d4488  ("LU-10048 ofd: take local locks within transaction")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If859e64033487574ebb670e80f11c968f1595d00
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57570
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
3 weeks agoLU-17055 ldiskfs: add falloc(zero) for OST/ext 63/57763/6
Keguang Xu [Wed, 15 Jan 2025 05:57:30 +0000 (13:57 +0800)]
LU-17055 ldiskfs: add falloc(zero) for OST/ext

This patch implements falloc(FALLOC_FL_ZERO_RANGE)
on the ldiskfs backend.

Here, we just follow the implementation of "LU-10048 osd:
async truncate" where we as well execute zeroing outside
of main transaction handle, to avoids restarting zeroing
transaction handles in main transaction.

NOTE: this is the 1st part of falloc(zero) where it functions
only on ldiskfs-extend. To address DoM/indirect part another
patch will be added.

Signed-off-by: Keguang Xu <squalfof@gmail.com>
Change-Id: I76310546715f96872bf4dd441beb453ee4ac0abe
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57763
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17431 nodemap: introduce child_raise_privileges property 39/55539/14
Sebastien Buisson [Tue, 25 Jun 2024 11:02:55 +0000 (13:02 +0200)]
LU-17431 nodemap: introduce child_raise_privileges property

The new 'child_raise_privileges' property is a mask of nodemap
properties. It is set to 'none' by default, meaning child nodemaps can
only lower privileges established by their parent nodemap.
Parent nodemaps can grant permission for child nodemaps to raise
privilege associated with a nodemap property by adding it to
child_raise_privileges. Possible values (multiple can be specified,
comma separated) are:
- admin, defining whether root is squashed;
- trusted, permitting to see the file system's canonical identifiers;
- deny_unknown, denying all access to users not explicitly mapped;
- readonly_mount, forcing clients to read-only mount;
- forbid_encryption, preventing use of encryption by clients;
- subnm_raise_privs, for the raise privileges property itself;
- and any roles accepted by the rbac property, defining admin roles.
To allow all privileges to be raised, use 'all' value.
Any privilege not explicitly specified by the parent cannot be raised
in the child nodemap.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ifac5e3ea2f47ea3910e7cd0de6379b0e9ada8d18
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55539
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-17431 tests: exercise dynamic nodemap on MDS 02/55002/18
Sebastien Buisson [Fri, 12 Apr 2024 09:21:18 +0000 (11:21 +0200)]
LU-17431 tests: exercise dynamic nodemap on MDS

Rename sanity-sec test_72 to test_72a to exercise dynamic nodemaps
on OSS side. And add sanity-sec test_72b to exercise dynamic nodemaps
on MDS side. This supports the case where the MDS runs on the same
node as the MGS, and with a combo MGS/MDS as well.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-sec env=ONLY=72 mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Idb32ee46f8809160ddc4c54960c10d565b3396d7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55002
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-17431 nodemap: make dynamic nodemaps hierarchical 39/54739/18
Sebastien Buisson [Wed, 20 Mar 2024 14:40:56 +0000 (15:40 +0100)]
LU-17431 nodemap: make dynamic nodemaps hierarchical

Introduce a new rn_subtree field in struct lu_nid_range.
This allows to have NID ranges included into other NID ranges,
hence creating a NID range hierarchy. NID ranges are created in
a subtree only if there is already a range in the parent tree
that includes it. Overlapping NID ranges remain forbidden.

Introduce new fields nm_subnodemaps, nm_parent_entry in struct
lu_nodemap to keep track of the sub-nodemaps attached to a given
nodemap. Also use a new nm_parent_nm field that points to the parent
nodemap. This allows to create a nodemap hierarchy, based on the
NID ranges.

Introduce a new -p|--parent option to lctl nodemap_add to specify
the parent nodemap of a dynamic nodemap at creation time. The NID
ranges of the child nodemap must be included in the ranges of the
parent nodemap. A dynamic nodemap can have only one parent.

Make a sub-nodemap inherit all the parent nodemap's properties,
and the id mapping as well. And expose parent name as part of nodemap
properties. This is valid for dynamic nodemaps only.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I04a14db92c068f3cb5b6b39e75feb802cebacd8a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54739
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-17431 nodemap: modify all properties of a dynamic nm 88/58088/6
Sebastien Buisson [Fri, 14 Feb 2025 16:41:54 +0000 (17:41 +0100)]
LU-17431 nodemap: modify all properties of a dynamic nm

All properties of a dynamic nodemap must be taken into account. So
move the check for dynamic in nodemap_idx_* functions, except for
nodemap_activate which is independent of any nodemap.
Update sanity-sec test_72 to correctly exercise this.

Fixes: db818bd040 ("LU-17431 nodemap: allow modifying properties of a dynamic nm")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I5fb7877669fdf7689b1be1f065006644f0a3f15c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58088
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-18751 lnet: test lnetctl fault reset directly 23/58623/4
Shaun Tancheff [Wed, 2 Apr 2025 00:53:07 +0000 (07:53 +0700)]
LU-18751 lnet: test lnetctl fault reset directly

Using 'do_lnetctl' confounds the required command line arguments
when calling:

    lnetctl fault reset <None>

So avoid the helper function for this case.

Test-Parameters: trivial testlist=sanity-lnet env=ONLY=410,ONLY_REPEAT=50
Fixes: dc54ff3310 ("LU-18751 lnet: fix sanity-lnet/410 test case")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I72ab8a06bbf1a95fd51aac4fb13955c0c03f8dd0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58623
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.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>
3 weeks agoLU-14438 ldiskfs: backport ldiskfs mballoc patches 72/51472/22
Bobi Jam [Tue, 3 Sep 2024 15:42:43 +0000 (23:42 +0800)]
LU-14438 ldiskfs: backport ldiskfs mballoc patches

This contains following kernel patches:

cfd732377221 ("ext4: add prefetching for block allocation bitmaps")
3d392b2676bf ("ext4: add prefetch_block_bitmaps mount option")
dddcd2f9ebde ("ext4: optimize the implementation of
     ext4_mb_good_group()")
67d251860461 ("ext4: drop s_mb_bal_lock and convert protected fields
                     to atomic")
a6c75eaf1103 ("ext4: add mballoc stats proc file")
4b68f6df1059 ("ext4: add MB_NUM_ORDERS macro")
196e402adf2e ("ext4: improve cr 0 / cr 1 group scanning")
21175ca434c5 ("ext4: make prefetch_block_bitmaps default")
077d0c2c78df ("ext4: make mb_optimize_scan performance mount option
                     work with extents")
3fa5d23e68a3 ("ext4: reflect mb_optimize_scan value in options file")
4fca50d440cc ("ext4: make mballoc try target group first even with
                     mb_optimize_scan")
1940265ede66 ("ext4: avoid unnecessary spreading of allocations among
                     groups")
a9f2a2931d0e ("ext4: use locality group preallocation for small
                     closed files")
83e80a6e3543 ("ext4: use buckets for cr 1 block scan instead of
                     rbtree")
80fa46d6b9e7 ("ext4: limit the number of retries after discarding
                     preallocations blocks")
a078dff87013 ("ext4: fixup possible uninitialized variable access in
                     ext4_mb_choose_next_group_cr1()")
820897258ad3 ("ext4: Refactor code related to freeing PAs")
5354b2af3406 ("ext4: allow ext4_get_group_info() to fail")
3c6296046c85 ("ext4: Don't skip prefetching BLOCK_UNINIT groups")
4f3d1e4533b0 ("ext4: Ensure ext4_mb_prefetch_fini() is called for all
                     prefetched BGs")

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I079dfb74bd743894934484803cedb683073e4d94
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51472
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-16565 ldlm: Add ldlm_is,set,clear to spelling 30/50030/5
Patrick Farrell [Thu, 16 Feb 2023 23:10:12 +0000 (18:10 -0500)]
LU-16565 ldlm: Add ldlm_is,set,clear to spelling

Prior to removing the ldlm flag macros, add them to spelling.txt

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ic0fcfb7603c956010e90812338bec38964e815ce
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50030
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-18873 obdclass: add namelen check in encode_fn_len() 08/58608/3
Emoly Liu [Mon, 31 Mar 2025 11:39:57 +0000 (19:39 +0800)]
LU-18873 obdclass: add namelen check in encode_fn_len()

Add namelen check in function encode_fn_len() to avoid coverity
warnings.

Fixes: d097fcc51b8 ("LU-18810 obd: add a parameter to enable filename encoding")
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Ic1cc7238cd659254e286d8a595dc5203ae7dbc0b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58608
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
3 weeks agoLU-18676 tests: enable sanity-quota_49 97/57997/7
Sergey Cheremencev [Fri, 7 Feb 2025 00:15:46 +0000 (03:15 +0300)]
LU-18676 tests: enable sanity-quota_49

The fix "LU-18676 tests: random write to set file size"
has been landed, so re-enable the test.

Fixes: 149657180e ("LU-18676 tests: random write to set file size")
Test-Parameters: trivial testlist=sanity-quota fstype=zfs
Test-Parameters: testlist=sanity-quota fstype=zfs env=ONLY=49,ONLY_REPEAT=20
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: Ie3171cff03ce957cc88efe81b4c837a1872b139b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57997
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
3 weeks agoLU-13814 lov: remove non-dio handling in lov_dio_submit 07/52107/26
Patrick Farrell [Fri, 23 Feb 2024 16:28:11 +0000 (11:28 -0500)]
LU-13814 lov: remove non-dio handling in lov_dio_submit

lov_dio_submit is now specialized to dio.  Cleanup
accordingly.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I4e293011c77eb1b7b8f2c0ec78565458a6fe047c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52107
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
3 weeks agoLU-13814 clio: add cio_dio_submit 05/52105/29
Patrick Farrell [Fri, 23 Feb 2024 16:27:43 +0000 (11:27 -0500)]
LU-13814 clio: add cio_dio_submit

Add cio_dio_submit method and push it down in to the lov
layer.

Note this part of the series relies on the slightly clever
fact that there is no vvp method for this and the LOV
method calls the OSC method.  This lets us do setup and
teardown of the queue in the lov layer.

The next step is to push the queue handling through this
function to the cl_io_submit_rw call here, which may be
non-trivial.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I3a2a7b7921391be3cc9a157d4351228226016a51
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52105
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-13814 clio: Add cl_dio_submit_rw 04/52104/30
Patrick Farrell [Fri, 23 Feb 2024 16:26:43 +0000 (11:26 -0500)]
LU-13814 clio: Add cl_dio_submit_rw

This pushes the queue handling to the cl_io_submit_rw
level.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I38ca5ff2f497147e8246ebc43ff109eecbd127bb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52104
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: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
3 weeks agoLU-13814 clio: add cdp_cl_pages tracking 03/52103/29
Patrick Farrell [Fri, 12 Jul 2024 15:58:13 +0000 (11:58 -0400)]
LU-13814 clio: add cdp_cl_pages tracking

This enables us start the lengthy process of converting the
DIO path from using lists of cl_pages to using a single
cl_dio_pages array.

We add a temporary cdp_cl_pages array tracking the cl_pages
and a function to convert it to a queue.  Subsequent
patches will push this through the DIO path, gradually
converting each step to use cl_dio_pages until there are no
steps left which use lists of cl_page.

This moves the queue usage to the cl_dio_pages queue for
ll_direct_rw_pages, the first step.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: If7cb5cbb01afd96939b05124358345a0d518c180
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52103
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17305 obdclass: do not link all exports to obd's timed list 92/53192/15
Vladimir Saveliev [Tue, 27 Aug 2024 08:17:30 +0000 (11:17 +0300)]
LU-17305 obdclass: do not link all exports to obd's timed list

Osp device may get class_cleanup()-ed in course of evictor process
where obd->u.cli.cl_import gets zeroed:
ping_evictor_main
  class_fail_export
    obd_disconnect
      osp_obd_disconnect
        class_manual_cleanup
          class_process_config(LCFG_CLEANUP)
            class_cleanup
              obd_precleanup
                osp_device_fini
                  client_obd_cleanup
                    obd_cleanup_client_import
                      obd->u.cli.cl_import = NULL;

osp-pre threads are not stopped by the evictor, which leads to
assertion on:
osp_precreate_thread
  osp_statfs_update
    imp = d->opd_obd->u.cli.cl_import;
    LASSERT(imp);

Test to illustrate the issue is added.

Add to obd's timed list only evictable exports

HPE-bug-id: LUS-11933
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I1aab4a573fc4ef33d53d822bec1a28dd3bcece74
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53192
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18748 tests: fix sanity/56c with flash devices 43/58543/2
Andreas Dilger [Wed, 26 Mar 2025 14:58:04 +0000 (08:58 -0600)]
LU-18748 tests: fix sanity/56c with flash devices

Fix sanity test_56c to fetch the initial "lfs df" state with "-v"
in case some devices are flash ('f') at the start of the test.

Test-Parameters: trivial
Fixes: 0523ed8625 ("LU-18748 class: print statfs_state for OBD devices")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I3a710c876a0918b20f9bbd7e13cf4b2b1e500c1e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58543
Reviewed-by: Alex Zhuravlev <bzzz@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>
5 weeks agoLU-18832 utils: lctl set_param --help segfault 10/58510/4
Giardi Sylwyn [Wed, 19 Mar 2025 10:23:16 +0000 (11:23 +0100)]
LU-18832 utils: lctl set_param --help segfault

Correct a bug when calling lctl. In some cases, using unkown option
made lctl to segfault. Corrected by adding NULL element at the end
of the longpost list to help parsing.

Test-Parameters: trivial
Fixes: e7b8986619 ("LU-17416 utils: option for lctl get_param to skip links")
Signed-off-by: Giardi Sylwyn <sylwyn.giardi@cea.fr>
Change-Id: I50cf97cf132e899a4f5c4a8f079638ecfe9ca6a4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58510
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
5 weeks agoLU-8066 ptlrpc: move simple req_buffer_* to sysfs 98/58498/2
James Simmons [Fri, 21 Mar 2025 16:17:48 +0000 (12:17 -0400)]
LU-8066 ptlrpc: move simple req_buffer_* to sysfs

Some of the ptlrpc req_buffer_* debugfs files are simple
enough to move to sysfs.

Test-Parameters: trivial
Change-Id: I0feb554de2d4cdabe1c9bc4e5cf1fc700d0ea679
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58498
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18846 osd-ldiskfs: fix error handling in iam_lookup_try 89/58489/2
Li Dongyang [Fri, 21 Mar 2025 01:55:06 +0000 (12:55 +1100)]
LU-18846 osd-ldiskfs: fix error handling in iam_lookup_try

We should check the return code from id_node_read(),
frame->bh could be -EIO or NULL, using it with iam_lock_bh()
could end up crashing.

Change-Id: If9899e2650c6949913217656f803db64c3a0c6fa
Test-Parameters: trivial
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58489
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18833 ofd: Set OS_STATE_* flags correctly for read-only devices 88/58488/4
Arshad Hussain [Thu, 20 Mar 2025 20:32:52 +0000 (02:02 +0530)]
LU-18833 ofd: Set OS_STATE_* flags correctly for read-only devices

Set OS_STATE_* flags correctly for read-only devices
which is set via obdfilter.*.readonly params.

sanity/56ca added.

Test-Parameters: trivial
Fixes: 3483556684 ("LU-12515 ofd: allow setting a target to readonly")
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ie35c5e71ced77ebf196d0f4b27e97721e1ea60b1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58488
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18836 utils: lctl SIGSEGV in parser.c 68/58468/2
Frank Sehr [Wed, 19 Mar 2025 19:50:34 +0000 (12:50 -0700)]
LU-18836 utils: lctl SIGSEGV in parser.c

Added additional checks for NULL pointers in execute_line().

Test-Parameters: trivial
Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: I0e470edadd3b4db4c47f0f42f52d34d541290224
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58468
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Manish Regmi <mregmi@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18825 gss: survive improper import at ctx init 54/58454/3
Sebastien Buisson [Tue, 18 Mar 2025 16:14:16 +0000 (17:14 +0100)]
LU-18825 gss: survive improper import at ctx init

GSS context init requests can happen even after a client has been
unmounted, because they are coming from userspace (request-key,
lgss_keyring).
In this case they must be ignored, and code must be robust to survive
improper, already or partially shutdown import.

Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I06d031c28c769d1383d37de1d2c94ef64eb0eda3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58454
Reviewed-by: Aurelien Degremont <adegremont@nvidia.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>
5 weeks agoLU-9633 fid: Add kernel doc style for fid/*.c 19/58419/2
Arshad Hussain [Fri, 14 Mar 2025 09:24:18 +0000 (14:54 +0530)]
LU-9633 fid: Add kernel doc style for fid/*.c

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I1e844495cc9bffba8b6ec065577470075523dccc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58419
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Anjus George <georgea@ornl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-9633 obdclass: Add kernel doc style for obdclass/cl_io.c 15/58415/2
Arshad Hussain [Sat, 15 Mar 2025 20:33:27 +0000 (02:03 +0530)]
LU-9633 obdclass: Add kernel doc style for obdclass/cl_io.c

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ib0a8bc3bdef68a6e894a683f4d79396f081eff61
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58415
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Anjus George <georgea@ornl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-16518 lnet: remove want_large_primary in lnet_peer_merge_data() 53/58353/2
Timothy Day [Sat, 8 Mar 2025 23:15:15 +0000 (23:15 +0000)]
LU-16518 lnet: remove want_large_primary in lnet_peer_merge_data()

This variable is not usused anywhere, so let's remove
it.

Fixes: 57bcd6aa7f5f ("LU-10391 lnet: lnet_peer_merge_data to understand large addr")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: If1f67280b15bb2cd37bd29b6731a7956a83e29ca
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58353
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-16518 lustre: fix implicit-fallthrough warnings 48/58348/2
Timothy Day [Sat, 8 Mar 2025 21:05:27 +0000 (16:05 -0500)]
LU-16518 lustre: fix implicit-fallthrough warnings

Explicitly lable switch-case intentional fallthroughs
and reorder cases as needed to silence implicit-fallthrough
warngins as reported by Clang.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I7322b3e4f37bcd1716ca48a31ce698798b58e6cf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58348
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>
5 weeks agoLU-16518 mdt: implicit truncation to a one-bit field 47/58347/3
Timothy Day [Sat, 8 Mar 2025 20:28:26 +0000 (15:28 -0500)]
LU-16518 mdt: implicit truncation to a one-bit field

Change the uc_rbac one-bit fields to unsigned int
to avoid an implicit truncation error reported by
Clang (-Wsingle-bit-bitfield-constant-conversion).

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I394e71d5d572d4586de55093d4cc60729041a822
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58347
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18753 ldlm: remove unused stub functions 64/58264/3
Timothy Day [Fri, 28 Feb 2025 06:27:50 +0000 (01:27 -0500)]
LU-18753 ldlm: remove unused stub functions

Remove:

ldlm_lock_fail_match()
ldlm_error2errno()
ldlm_pool_get_clv()
ldlm_pool_set_slv()
ldlm_imp2pl()

They are not called anywhere.

Fixes: e536e511c9e6 ("LU-5829 ldlm: remove unnecessary EXPORT_SYMBOL")
Fixes: fce887d1f9e0 ("b=15226")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Iff93740206b1cf295d4500c8135ea1d2343f4b66
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58264
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-16565 ldlm: [2] Remove ldlm is,set,clear macros 49/57549/3
Timothy Day [Fri, 20 Dec 2024 04:16:33 +0000 (23:16 -0500)]
LU-16565 ldlm: [2] Remove ldlm is,set,clear macros

Replaces ldlm_{is,set,clear} macros with the direct flag
names.

The patch has been generated with the coccinelle script in
contrib/cocci/ldlm_flags.cocci.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I30fb07d30f08e84e98d42e2cd11792833ac45c1f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57549
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18420 misc: Use enum mds_ibits_locks instead of __u64 (part 2) 53/56953/17
Arshad Hussain [Mon, 11 Nov 2024 09:44:10 +0000 (04:44 -0500)]
LU-18420 misc: Use enum mds_ibits_locks instead of __u64 (part 2)

This patch is part 2 that uses enum mds_ibits_locks
instead of generic __u64.

Test-Parameters: testlist=runtests serverversion=2.15
Test-Parameters: testlist=runtests clientversion=2.15
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I77ddc7787c61ce4ef6b9d2041490446d20ce691c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56953
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
5 weeks agoLU-18806 dne: migrate to skip non-migratable files 02/58402/7
Alexander Zarochentsev [Thu, 13 Mar 2025 18:17:29 +0000 (18:17 +0000)]
LU-18806 dne: migrate to skip non-migratable files

Allow migrate and dir restripe to skip open files
and files with LinkEA overflow and continue the
migrate operation.

HPE-bug-id: LUS-12783
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I4fa4cbe49d7681cdda9ba1d043f3c0a8a5d0efe9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58402
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18764 tests: fix conf-sanity 123H for interop testing 66/58366/2
Etienne AUJAMES [Tue, 11 Mar 2025 10:45:22 +0000 (11:45 +0100)]
LU-18764 tests: fix conf-sanity 123H for interop testing

conf-sanity 123H failed in interrop with 2.16.1 because this version
does not have LU-18170's patch. The test should be skipped.

Test-Parameters: trivial
Test-Parameters: testlist=conf-sanity serverversion=2.16.1 env=ONLY=123H
Fixes: 5ad117fc6f ("LU-18170 obdclass: fix llog_print_cb()")
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I952d64a87b16dcfc27efeffec3953a3858bf30cf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58366
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-16265 ofd: update projid on OST by Client 01/58301/7
Hongchao Zhang [Tue, 18 Feb 2025 08:42:32 +0000 (16:42 +0800)]
LU-16265 ofd: update projid on OST by Client

Occasionally it is possible that the projid of an OST object
does not get the projid from the MDS, even though the projid
is set correctly on the MDT inode.

This patch checks the projid of the file while writing or
truncating it on OST, and update its projid if it is 0

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: If8bf071341e3b8114add5fc7a2e741d3a101ac99
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58301
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18564 doc: difference between lfs 'osts' and 'check ost' 68/57468/4
Richard Henwood [Mon, 16 Dec 2024 19:04:23 +0000 (14:04 -0500)]
LU-18564 doc: difference between lfs 'osts' and 'check ost'

Update man page for lfs.1 to record commands behave
differently. 'check ost' will perform RPC, 'osts' will not.

Test-Parameters: trivial
Signed-off-by: Richard Henwood <rhenwood@ddn.com>
Change-Id: If7faf0d0108fad2f79486ca1a768a23c99b1dfb3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57468
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mathieu Dube <mdube@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18424 tests: sanity to cleanup files 02/56902/5
Alex Zhuravlev [Tue, 5 Nov 2024 14:33:58 +0000 (17:33 +0300)]
LU-18424 tests: sanity to cleanup files

add stack_trap's to few sanity's subtests to remove files upon
subtest competion.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ibcdafa330ca0db1dc76364e46c4d898c912f4139
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56902
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
5 weeks agoLU-16796 nodemap: Change nm_refcount to refcount 53/58453/2
James Simmons [Mon, 17 Mar 2025 19:45:03 +0000 (13:45 -0600)]
LU-16796 nodemap: Change nm_refcount to refcount

This patch changes struct lu_nodemap to use refcount_t instead
of atomic_t. Using refcount adds new functionally that we can
use with rhashtable which will be done in an follow on patch
for nodemaps.

Test-Parameters: trivial testlist=sanity-sec
Change-Id: I2651c24740ea43486398a200b76cf9eb29cdcdf7
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58453
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18822 build: fix symbol redeclaration error in socklnd_lib.c 41/58441/2
Jian Yu [Mon, 17 Mar 2025 18:30:57 +0000 (11:30 -0700)]
LU-18822 build: fix symbol redeclaration error in socklnd_lib.c

This patch fixes the following symbol redeclaration errors
in socklnd_lib.c:

  lnet/klnds/socklnd/socklnd_lib.c: In function 'ksocknal_lib_recv_kiov':
  lnet/klnds/socklnd/socklnd_lib.c:314:23: error: 'scratchiov' redeclared as different kind of symbol
    314 |         struct kvec  *scratchiov = &scratch;
        |                       ^~~~~~~~~~
  lnet/klnds/socklnd/socklnd_lib.c:310:37: note: previous definition of 'scratchiov' with type 'struct kvec *'
    310 |                        struct kvec *scratchiov)
        |                        ~~~~~~~~~~~~~^~~~~~~~~~
  lnet/klnds/socklnd/socklnd_lib.c:315:24: error: 'pages' redeclared as different kind of symbol
    315 |         struct page  **pages      = NULL;
        |                        ^~~~~
  lnet/klnds/socklnd/socklnd_lib.c:309:63: note: previous definition of 'pages' with type 'struct page **'
    309 | ksocknal_lib_recv_kiov(struct ksock_conn *conn, struct page **pages,
        |                                                 ~~~~~~~~~~~~~~^~~~~

Fixes: 89df5e712f ("LU-11415 socklnd: improve scheduling algorithm")
Change-Id: I047746e93ef1b4421f0bf7ff0c39848996698331
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58441
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: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18821 build: fix [-Werror=pointer-to-int-cast] error 40/58440/2
Jian Yu [Mon, 17 Mar 2025 17:11:17 +0000 (10:11 -0700)]
LU-18821 build: fix [-Werror=pointer-to-int-cast] error

This patch fixes the following error on 32-bit architectures
by replacing the __u64 cast with uintptr_t, which is either
32-bit or 64-bit:

  lustre/include/obd_class.h: In function 'obd_quota_iter':
  lustre/include/obd_class.h:1289:39: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   1289 |                 oqctl->qc_iter_list = (__u64)list;
        |                                       ^
  cc1: all warnings being treated as errors

Change-Id: I5938a4c09a50010ce3b99bc6f978fed5cc32a5d6
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58440
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>
5 weeks agoLU-18357 test: fix sanity-sec 27a interop with long fileset 36/58436/2
Marc Vef [Mon, 17 Mar 2025 12:57:08 +0000 (13:57 +0100)]
LU-18357 test: fix sanity-sec 27a interop with long fileset

The fileset length in sanity-sec 27a was signficantly increased to
test multiple fileset fragments on the IAM. This long fileset is also
used in interop with "lctl set_param -P" with older servers instead of
"lctl nodemap_set_fileset".

However, running "lctl get_param" with this long fileset on older
servers (<=2.15) causes a line break (due to the output being longer
than 80 characters) which results in "wait_nm_sync" to fail when
comparing the expected vs. the actual output.

This patch modifies sanity-sec test 27a and reverts the fileset to its
original much shorter path in the interop case when "lctl set_param
-P" must be used. When "lctl nodemap_set_fileset" is used, the long
fileset is still set to test multiple fileset fragments.

Test-Parameters: trivial testlist=sanity-sec
Test-Parameters: trivial testlist=sanity-sec serverversion=2.15
Fixes: da3536da22ab ("LU-18357 ptlrpc: Use nodemap IAM for persisting filesets")
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: Ie1d39f3f986675133fd9d4c294e7af186f2ed1b9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58436
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>
5 weeks agoLU-18810 misc: filename encoding for remaining files 35/58435/3
Emoly Liu [Mon, 17 Mar 2025 04:21:24 +0000 (12:21 +0800)]
LU-18810 misc: filename encoding for remaining files

Apply filename encoding feature to the remaining files.
Also, sanity.sh test_170b is added to verify this feature.

This is a port of
Lustre-change: https://review.whamcloud.com/58125
Lustre-commit: TBD (from a9aac92b92ce9b7bb115da6b3d5bc513240972c8)
EX-bug-id: EX-11415

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I8b7a007844e068bd0db7ee9c2bc0309ccd5c656a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58435
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18810 llite: apply filename encoding to llite/* 34/58434/3
Emoly Liu [Mon, 17 Mar 2025 04:18:48 +0000 (12:18 +0800)]
LU-18810 llite: apply filename encoding to llite/*

Apply filename encoding feature to the files under llite.

This is a port of
Lustre-change: https://review.whamcloud.com/58124
Lustre-commit: TBD (from b00f33574f6fbb3cbad290c3eb6bf63d97b27bb0)
EX-bug-id: EX-11415

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I38c4e5b62b8bc72cb3990a80792dd2907b8b26a8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58434
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18810 obd: add a parameter to enable filename encoding 33/58433/3
Emoly Liu [Mon, 17 Mar 2025 04:14:53 +0000 (12:14 +0800)]
LU-18810 obd: add a parameter to enable filename encoding

This patch adds a parameter "enable_fname_encoding" to encode
filename in the logs, uses 64-bit FNV-1a to hash filename and
uses function gss_base64url_encode() to encode the hashed
filename to the printable characters.
The following functions and macros are defined for different
pattens:
- encode_fn_len(fname, len)
- encode_fn(fname)
- encode_fn_dname(len, fname)
- encode_fn_luname(lname)
- encode_fn_opdata(op)
- encode_fn_oied(ent)
- encode_fn_qstr(qstr)
- encode_fn_dentry(dentry)
- encode_fn_file(file)

This is a port of
Lustre-change: https://review.whamcloud.com/57985
Lustre-commit: TBD (from c582a55e791fdb2967c36dbbc95fb0e8d48e6b39)
EX-bug-id: EX-11415

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Icf258dc3eb10b915eb7eff970bc20822daa79777
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58433
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-9633 lmv: Add kernel doc style for lmv/lmv_obd.c 18/58418/3
Arshad Hussain [Fri, 14 Mar 2025 10:28:05 +0000 (15:58 +0530)]
LU-9633 lmv: Add kernel doc style for lmv/lmv_obd.c

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I42b80cd0db819f8abc3db6114a8769dd772d2784
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58418
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Anjus George <georgea@ornl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-9633 mgc: Add kernel doc style for mgc/mgc_request.c 17/58417/2
Arshad Hussain [Fri, 14 Mar 2025 08:02:12 +0000 (13:32 +0530)]
LU-9633 mgc: Add kernel doc style for mgc/mgc_request.c

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

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I0b498281acd9f5d5f48f02d436e2add8df4021ae
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58417
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: Anjus George <georgea@ornl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-16518 lu: remove unused functions in lu_object.h 14/58414/2
Timothy Day [Sat, 15 Mar 2025 05:28:53 +0000 (01:28 -0400)]
LU-16518 lu: remove unused functions in lu_object.h

Remove lu_object_ops() and lu_object_assert_not_exists()
since they have no callers. Replace lu_object_assert_exists()
with lu_object_exists(), since it's just a thin wrapper.

Fixes: d2d56f38da01 ("- make HEAD from b_post_cmd3")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I74136a0c5283beaf77fdbc6df19387209e1c03f4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58414
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: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-16518 osc: remove osc_lock_at(), osc_is_object(), and more 13/58413/2
Timothy Day [Sat, 15 Mar 2025 05:14:44 +0000 (01:14 -0400)]
LU-16518 osc: remove osc_lock_at(), osc_is_object(), and more

These functions no longer have any callers.

Fixes: 036d987c6d71 ("LU-3285 osc: prepare OSC code to be used from MDC")
Fixes: 5ad00e36eca1 ("LU-14838 osc: Remove client contention support")
Fixes: 9fe4b52ad2ff ("LU-1030 osc: new IO engine implementation")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I3273031227b894f751584241a6fc6f04dcd915af
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58413
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-16518 osp: remove unused osp_txn_info() and friends 12/58412/2
Timothy Day [Sat, 15 Mar 2025 05:06:19 +0000 (01:06 -0400)]
LU-16518 osp: remove unused osp_txn_info() and friends

The 'struct osp_txn_info' is no longer used anywhere. So
we no longer need to store this on OSP threads.

Fixes: 0ba690a526be ("LU-7251 osp: do not assign commit callback to every thandle")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I8dd5c20c8a9e667aa1ff98cc53430f44f8376ef9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58412
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18807 utils: SIGSEGV in jt_obd_setattr 03/58403/3
Frank Sehr [Thu, 13 Mar 2025 19:36:43 +0000 (12:36 -0700)]
LU-18807 utils: SIGSEGV in jt_obd_setattr

Wrong argument comparison causes crash. Also unchecked
yaml_scalar_event_initialize() causes a double free problem.
This should be done for all variable based event initialization.

Test-Parameters: trivial
Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: Id90aec86d0779316dd7ca3d1d926a3db5503d2c1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58403
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Manish Regmi <mregmi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-11971 utils: add 'lfs find -crtime' alias 98/58398/3
Andreas Dilger [Thu, 13 Mar 2025 08:26:19 +0000 (02:26 -0600)]
LU-11971 utils: add 'lfs find -crtime' alias

Add "-crtime" as an alias for "-btime" since this field is
also commonly called file creation time.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Id136561ec37756caf29e20e8a548171496be0e72
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58398
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18803 class: add namelen_max and maxbytes params 97/58397/6
Andreas Dilger [Thu, 13 Mar 2025 08:07:29 +0000 (02:07 -0600)]
LU-18803 class: add namelen_max and maxbytes params

Add parameters for all OSD/OBD devices to print the statfs
os_namelen and os_maxbytes values from the respective devices.
This allows checking these values more easily from test scripts.

Update test_79 to print the values (for functionality) and test
that the llite.*.namelen_max matches the value of sbi->ll_statfs.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I613b364e62f729c033a0ece29e18507caa869122
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58397
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18751 lnet: fix sanity-lnet/410 test case 76/58376/5
Frank Sehr [Wed, 26 Feb 2025 00:24:17 +0000 (16:24 -0800)]
LU-18751 lnet: fix sanity-lnet/410 test case

The use of '\0' is not supported in all versions of bash.
Using "" as a NUL input serves the same purpose.

Test-Parameters: trivial
Fixes: 30868de940 ("LU-18751 lnet: Segfault in lnetctl fault command")
Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: I2caafee1b3e00f1921a7bb2675187353797a0570
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58376
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18799 utils: mount with maximum NIDs 75/58375/7
Mikhail Pershin [Wed, 5 Mar 2025 11:26:08 +0000 (14:26 +0300)]
LU-18799 utils: mount with maximum NIDs

Patch allows mount with maxumum NIDs in parameters.
- reserve space for mandatory mount options: 'device', etc.
- remove duplicate mgsnode list as parameter in mount options
- update 73b test to check mount is working too

Fixes: f9d346f0c1 ("LU-18587 utils: allow large NID lists in mount tools")
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I46c296694a053c710310bced94ec95afae76b800
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58375
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18793 gss: coverity issue in prepare_krb5_rfc4121_buffer 71/58371/2
Sebastien Buisson [Tue, 11 Mar 2025 16:06:19 +0000 (17:06 +0100)]
LU-18793 gss: coverity issue in prepare_krb5_rfc4121_buffer

Fix issue found by Coverity in prepare_krb5_rfc4121_buffer():

CoverityID 457079:    (RESOURCE_LEAK)
   Variable "derived_key" going out of scope leaks the storage
   "derived_key.data" points to.

Fixes: c7cf297687 ("LU-18256 gss: deprecate insecure enctypes")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I1a2924555814ca6ce643b9e7cad217a7f6725765
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58371
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17000 mgs: check lcfg parameters 60/58360/7
Andreas Dilger [Tue, 11 Mar 2025 00:17:59 +0000 (18:17 -0600)]
LU-17000 mgs: check lcfg parameters

Check lcfg parameters in mgs_iocontrol() and mgs_iocontrol_pool().
Make the callers more consistent with buffer access and error checks.
REC_DATA_LEN() should be used instead of "rec_len" for lcfg size,
since "rec_len" is the full llog record size including hdr/tail.

CoverityID: 397130 ("Passing tainted expression lcfg->lcfg_buflens")
CoverityID: 397132 ("Passing tainted expression lcfg->lcfg_buflens")
CoverityID: 425252 ("Untrusted value as argument")

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9a7052a24d77124582df61340e520c1db6433892
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58360
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18791 lmv: report an overflowed nlink correctly 57/58357/9
coreytesdahl [Wed, 4 Dec 2024 22:37:06 +0000 (16:37 -0600)]
LU-18791 lmv: report an overflowed nlink correctly

inode nlink count should be set to 1 if any component
stripe in stripped dir has overflowed and been set to 1

HPE-bug-id: LUS-12747
Signed-off-by: Corey Tesdahl <corey.tesdahl@hpe.com>
Change-Id: I2a3b6f5bd846d11d768ee1979b7f11f0e7cf1c88
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58357
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.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>
5 weeks agoLU-16518 mgc: remove mne_swab from mgc_process_nodemap_log() 50/58350/3
Timothy Day [Sat, 8 Mar 2025 21:53:33 +0000 (16:53 -0500)]
LU-16518 mgc: remove mne_swab from mgc_process_nodemap_log()

mne_swab is no longer used and can be removed.

Fixes: 41610e6207ef ("LU-8837 mgc: move server-only code out of mgc_request.c")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I86f966ba03fcfcec7d91952cc126c1a008c5e26f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58350
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18758 tests: test lfs migrate --block on changing file 99/58299/5
Feng Lei [Wed, 5 Mar 2025 02:51:09 +0000 (10:51 +0800)]
LU-18758 tests: test lfs migrate --block on changing file

Run 'lfs migrate --block' on a continously changing file
to check wether '--block' option is broken.

Test-Parameters: trivial env="ONLY=56xab,ONLY_REPEAT=500"
Signed-off-by: Lei Feng <flei@whamcloud.com>
Change-Id: I48492b6296f81d0cbe3bc83fad2ffeb855dff1aa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58299
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18748 class: print statfs_state for OBD devices 59/58259/21
Andreas Dilger [Thu, 27 Feb 2025 02:36:01 +0000 (19:36 -0700)]
LU-18748 class: print statfs_state for OBD devices

In addition to the regular os_filesfree, os_kbytesfree, etc.
parameters available for each OBD device, add os_state as
a "statfs_state" parameter that contain a single character
fir each of the OS_STATE_* flags that indicate an uncommon
aspec of the target, so that it can be checked.

This allows checking if an OST is read-only ('R' character),
out of blocks ('B'), or inodes ('I'), degraded ('D'),
or is flash-based (non-rotational) storage decoce ('f').

Remove old procfs wrappers for printing statfs data, since
they are no longer used in any parts of the code.

Modify sanity test_56c() to verify that the new statfs_state
is matching the state printed by "lfs df -v".  Allow this
subtest to be run on flash devices that already have 'f' set.
Remove hard-coded waits. Clean up properly in case of errors.

Fix up the code style of sanity test_79 to match current rules.

Allow restore_lustre_params() to accept a filename argument, and
remove it after restore, rather than needing this in all callers.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0462acdb7b9b7ec76792c9ff50206af2ae2540e5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58259
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18720 quota: check for project quota 66/58066/8
Alex Zhuravlev [Thu, 13 Feb 2025 13:27:14 +0000 (16:27 +0300)]
LU-18720 quota: check for project quota

lqi_ignore_root_proj_quota should be checked only with project quota,
otherwise it's state is undefined and can lead to undefined results.

Fixes: 2686838fef ("LU-18240 sec: enforce per-nodemap project quota for root")
Test-Parameters: testlist=sanity-quota,sanity-quota,sanity-quota
Test-Parameters: fstype=zfs testlist=sanity-quota,sanity-quota,sanity-quota
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I02896639ed375ddd314fa44dc9cddb008b1dbb0b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58066
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
5 weeks agoLU-18690 tests: sanity-quota/79 should return 0 47/57947/4
Alex Zhuravlev [Mon, 3 Feb 2025 03:25:56 +0000 (06:25 +0300)]
LU-18690 tests: sanity-quota/79 should return 0

the test should not return a result of background process trying
to access pool's information.

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib9446b222c3be721e9ec5e9a4da67f249ac46aa0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57947
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18524 utils: Improve lctl nodemap_modify interface 48/57448/8
Marc Vef [Sun, 15 Dec 2024 18:21:13 +0000 (19:21 +0100)]
LU-18524 utils: Improve lctl nodemap_modify interface

"lctl nodemap_modify" uses two separate parameters for the property
name and the corresponding value. This patch slightly improves this
interface by allowing "=value" as part of --property similar to "lctl
set_param" commands:

lctl nodemap_modify --name nm_0 --property admin=1

instead of (which is still allowed):

lctl nodemap_modify --name nm_0 --property admin --value 1

sanity-sec fileset_test_setup() was modified to exercise this
interface.

Test-Parameters: trivial testlist=sanity-sec
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: I030e1602a67c066e6daf4187589a77c1b49ee855
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57448
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18454 utils: 'lfs migrate' can read filenames from file 04/57104/9
Feng Lei [Fri, 22 Nov 2024 01:18:53 +0000 (09:18 +0800)]
LU-18454 utils: 'lfs migrate' can read filenames from file

Enhance 'lfs migrate' and 'lfs mirror extend' command to
be able to read filenames from a file or pipeline and handle
all the files in one process.

When -0 or --null is specified, read filenames from stdin by
default. Each filename is ended with a NUL char. So it can work
together with 'lfs find -0' very well. For example:

  # lfs find /mnt/lustre --ost 0 -0 | lfs migrate -0 --ost 1

When --files-from=LISTFILE is specified, read filenames from
LISTFILE. One line for each filename. If LISTFILE is -, read
from stdin. If --null is specified at the same time, filenames
are separated by NUL char in LISTFILE.

Filenames can be specified on command line directly as before.

Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial
Change-Id: Id12aaba2b52a8a541a4d552d37facf6fb0fadc57
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57104
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18462 nodemap: sanity checks for positional parameters 87/57087/14
Sebastien Buisson [Wed, 20 Nov 2024 14:31:15 +0000 (15:31 +0100)]
LU-18462 nodemap: sanity checks for positional parameters

A number of nodemap commands just take positional parameters instead
of options:
- nodemap_activate
- nodemap_add
- nodemap_del
- nodemap_test_nid
In this case, we need to check manually that we got the correct number
of arguments, and return a proper error message otherwise.

These commands are also modified to grok named options, in addition to
positional parameters that we will have to keep for some time for
backward compatibility reasons.

Test-Parameters: trivial testlist=sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ie515e8e03f30581c7fb84efa3f881769fc02a397
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57087
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18114 llog: split "lctl llog_*" group into subcommands 40/56040/8
Emoly Liu [Wed, 11 Dec 2024 09:23:38 +0000 (17:23 +0800)]
LU-18114 llog: split "lctl llog_*" group into subcommands

Split "lctl llog_*" command group into subcommands, e.g.
"lctl llog_info" to "lctl llog info".
Also, conf-sanity.sh test_123ad is modified to verify
this patch.

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Iea1cbfac61ff807d793a7a48dafa73915b06639d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56040
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
5 weeks agoLU-17843 build: mount.lustre_tgt as symlink 79/55079/5
Patrick Farrell [Sat, 11 May 2024 19:10:51 +0000 (15:10 -0400)]
LU-17843 build: mount.lustre_tgt as symlink

mount.lustre_tgt was always intended to be a symlink to the
main mount.lustre, but instead it's an identical build item.

This results in this rpmbuild warning (an error on some systems):
    Duplicate build-ids .../mount.lustre and .../mount.lustre_tgt

This patch resolves this by making it a proper symlink as was
originally intended.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Id5f90df94fcc5c73a93fd6c1311b09af429c1440
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55079
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>
5 weeks agoLU-18792 tests: fix sanity-hsm test_26e for interop testing 73/58373/3
Etienne AUJAMES [Tue, 11 Mar 2025 15:51:02 +0000 (16:51 +0100)]
LU-18792 tests: fix sanity-hsm test_26e for interop testing

sanity-hsm test_26e fails in interop with 2.15.x version.
The test needs to be skipped for interop testing.

Test-Parameters: trivial
Test-Parameters: testlist=sanity serverversion=2.15.6 env=ONLY=26e
Fixes: 241cf3c6d0 ("LU-16235 hsm: get a valid cookie for RAoLU request")
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I56bafcfb2617637a88e328995aefb6ffa9785b37
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58373
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Guillaume Courrier <guillaume.courrier@cea.fr>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18528 test: wait for quota pool nr 09/58409/2
Hongchao Zhang [Fri, 14 Mar 2025 08:54:56 +0000 (16:54 +0800)]
LU-18528 test: wait for quota pool nr

In test_68 in sanity_quota, the number of the quota pool in QMT
could be delayed to update, then it should wait for its update.

Test-Parameters: trivial testlist=sanity-quota fstype=zfs env=ONLY=68,ONLY_REPEAT=50
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: I2e1964cf39a493d68ddd6463aaa28cf173951979
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58409
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-17950 ldiskfs: race in ext4_inode_attach_jinode 81/58381/4
Li Dongyang [Wed, 12 Mar 2025 09:28:53 +0000 (20:28 +1100)]
LU-17950 ldiskfs: race in ext4_inode_attach_jinode

A race condition could happen when multiple threads
trying to attach jinode for the same inode:

Thread 1:
ext4_map_blocks
  ext4_inode_attach_jinode
    spin_lock(&inode->i_lock)
    ei->jinode = jinode
->
    jbd2_journal_init_jbd_inode(ei->jinode, inode)

Thread 2:
ext4_map_blocks
  ext4_inode_attach_jinode
    if (ei->jinode || !EXT4_SB(inode->i_sb)->s_journal)
    return 0;
  ext4_jbd2_inode_add_write
->  jbd2_journal_file_inode

The problem is in ext4_inode_attach_jinode() the initial check
of ei->jinode is not protected by inode->i_lock,
thread 2 could go ahead and use the not yet initialized jinode
in jbd2_journal_file_inode(), and thread 1 later will
use jbd2_journal_init_jbd_inode, corrupting the jinode.

Note this issue is specific to ldiskfs because of
ext4-attach-jinode-in-writepages.patch added
ext4_inode_attach_jinode() to make sure jinode is initialized
before calling ext4_jbd2_inode_add_write().

Change-Id: Iafd7aa9537505afbf4bc53fef40ea3aa0a94b7da
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58381
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
5 weeks agoLU-18779 lnet: lnetctl SIGSEGV in lnetctl.c getopt_internal() 22/58322/7
Frank Sehr [Thu, 6 Mar 2025 20:19:38 +0000 (12:19 -0800)]
LU-18779 lnet: lnetctl SIGSEGV in lnetctl.c getopt_internal()

Variable optindex was out of range. The whole check could be
simplified (only check optarg) if no negative values for verbose
 are expected. Also modified for peer.

Test-Parameters: trivial
Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: I64aad7527377b098479e93040a84b0865b02de28
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58322
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Manish Regmi <mregmi@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
5 weeks agoLU-18676 tests: random write to set file size 83/58083/9
Hongchao Zhang [Sat, 15 Mar 2025 19:14:58 +0000 (03:14 +0800)]
LU-18676 tests: random write to set file size

The sanity-quota.sh test_49 is using "createmany -S 4k"
to set the size of a new file instead of writing all the
actual file data.  Add a new "-W SIZE" option to write
the specified number of random bytes instead of only
writing a few bytes at the end of the file.

This avoids issues with sparse files or data compression
resulting in less space being allocated than expected.

Test-Parameters: testlist=sanity-quota fstype=zfs env=ONLY=49,ONLY_REPEAT=50
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ida93da881b48e6fdd85b64e90991b85f28de63d4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58083
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
5 weeks agoLU-17777 tests: Exclude Files when comparing dir structure 29/58129/8
Arshad Hussain [Wed, 19 Feb 2025 11:04:37 +0000 (16:34 +0530)]
LU-17777 tests: Exclude Files when comparing dir structure

This patch Excludes /etc/yum* and /etc/pki* as corner case
which is updated by RHEL asynchronously breaking the test-case.

Moves search folder from "/etc /bin" to "/etc /usr/bin" as
/bin can be a symlink

Removes arbitrary return code of 18 and 22 with $?. For
diff this should be 1 for mismatch and 2 for files not found

Renames constant error message with unique message when
rebuilding dir structure before and after remount

Test-Parameters: trivial testlist=runtests
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I8f7824b930f6286e7e5744ff403a02cec280075d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58129
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>