public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] blktests: use patient module remover
@ 2025-11-26 17:11 Luis Chamberlain
  2025-11-26 17:11 ` [PATCH v4 1/2] blktests: replace module removal with patient module removal Luis Chamberlain
  2025-11-26 17:11 ` [PATCH v4 2/2] tests/srp/rc: " Luis Chamberlain
  0 siblings, 2 replies; 10+ messages in thread
From: Luis Chamberlain @ 2025-11-26 17:11 UTC (permalink / raw)
  To: shinichiro.kawasaki
  Cc: linux-block, patches, gost.dev, sw.prabhu6, kernel, bvanassche,
	mcgrof

This rebases the patient module remover series onto the current blktests
tree and addresses all the feedback from v3 from a long time ago [0]. This
came up recently as Swarna noticed the same flaky bug and I got reminded
to re-send a new iteraiton.

We now have the modprobe --wait upstream so use that if avaiable.

The patient module remover addresses race conditions where module removal
can fail due to userspace temporarily bumping the refcount (e.g., via
blkdev_open() calls). If your version of kmod supports modprobe --wait,
we use that. Otherwise we implement our own patient module remover.

[0] https://lore.kernel.org/all/20221220235324.1445248-2-mcgrof@kernel.org/T/#u

Changes in v4:
  - Rebased onto current blktests master
  - Fixed built-in module handling: _patient_rmmod() now checks for
    the existence of /sys/module/$module_sys/refcnt to detect built-in
    modules and returns success early (Shinichiro Kawasaki)
  - Fixed timeout parameter timing issue: MODPROBE_PATIENT_RM_TIMEOUT_SECONDS
    is now evaluated dynamically inside _patient_rmmod() rather than at
    source time, allowing tests to override the timeout value
    (Shinichiro Kawasaki)
  - Preserved SKIP_REASONS logic in _init_null_blk() when modprobe fails,
    so tests requiring loadable modules are properly skipped rather than
    failing (Shinichiro Kawasaki)
  - Fixed typo in comment: "modprobe -p" -> "modprobe --wait"
    (Luis Chamberlain)
  - Fixed path reference bug: used $module_sys instead of $module for
    /sys/module path checks (Luis Chamberlain)
  - Combined nested while conditions for cleaner code style
    (Shinichiro Kawasaki)
  - Removed redundant $module printing in error messages
    (Shinichiro Kawasaki)
  - Updated to use --wait=TIMEOUT_MSEC syntax (with =) to match the
    upstream kmod implementation


Luis Chamberlain (2):
  blktests: replace module removal with patient module removal
  tests/srp/rc: replace module removal with patient module removal

 common/multipath-over-rdma |  11 +---
 common/null_blk            |   6 +-
 common/nvme                |   9 +--
 common/rc                  | 126 +++++++++++++++++++++++++++++++++++++
 common/scsi_debug          |  14 ++---
 tests/srp/rc               |  19 ++----
 6 files changed, 148 insertions(+), 37 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-12-25 12:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-26 17:11 [PATCH v4 0/2] blktests: use patient module remover Luis Chamberlain
2025-11-26 17:11 ` [PATCH v4 1/2] blktests: replace module removal with patient module removal Luis Chamberlain
2025-11-26 17:44   ` Bart Van Assche
2025-12-19  5:29     ` Shinichiro Kawasaki
2025-12-22 18:11       ` Swarna Prabhu
2025-12-25 12:00         ` Shinichiro Kawasaki
2025-12-18 10:44   ` Shinichiro Kawasaki
2025-12-19  3:06     ` Luis Chamberlain
2025-12-25 12:05   ` Shinichiro Kawasaki
2025-11-26 17:11 ` [PATCH v4 2/2] tests/srp/rc: " Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox