Brian M c259c7abb8 scst: park async LUN-replace cleanup until async_lun_replace clears
Follow-up to commit a4a55aab41 ("scst: add async_lun_replace to defer
tgt_dev cleanup after LUN replace"), which moved the slow drain of
old tgt_devs off the LUN-replace management write path.

That defers the drain. It does not defer the free - the asynchronous
worker still acquires scst_mutex to call scst_free_tgt_dev, and that
function's first action, scst_clear_reservation -> scst_dlm_res_lock,
does a DLM round-trip. When the peer node has just died and has not
yet been evicted from the lockspace, that round-trip stalls in
scst_dlm_lock_wait. With scst_mutex held by the stalled worker,
every subsequent LUN-replace management write queues behind it.

When async_lun_replace=1, scst_acg_repl_lun() now parks the deferred
cleanup of old tgt_devs on a list instead of scheduling it on the
workqueue immediately. Writing 0 to the async_lun_replace sysfs knob
releases the parked work in a batch.

This lets the orchestrating layer hold cleanup until any cluster
coordination it depends on (e.g. DLM peer eviction during HA failover)
has completed.

Module unload calls scst_async_lun_replace_set(false) as a safety net.
2026-05-13 00:27:09 +03:00
2025-12-29 13:06:44 +03:00
2026-04-12 15:38:24 +03:00
2025-12-29 13:06:44 +03:00

SCST

Coverity Downloads

Overview

This is the source code repository of the SCST project. SCST is a collection of Linux kernel drivers that implement SCSI target functionality. The SCST project includes:

  1. The SCST core in the scst/ subdirectory.
  2. A tool for loading, saving and modifying the SCST configuration in directory scstadmin/.
  3. Several SCSI target drivers in the directories iscsi-scst/, qla2x00t/, srpt/, scst_local/ and fcst/.
  4. User space programs in the usr/ subdirectory, e.g. fileio_tgt.
  5. Various documentation in the doc/ subdirectory.

Instructions for building and installing SCST are available in the INSTALL.md file.

QLogic target driver

Two QLogic target drivers are included in the SCST project.

The default driver is located in qla2x00t-32gbit directory and it supports up to 32 Gb/s FC. It is the newer one.

May anyone wish to switch back to the older driver that only supported up to 16 Gb/s adapters, it is located in qla2x00t directory. To make use of the older driver build scst with environment variable QLA_32GBIT=no set.

Vladislav Bolkhovitin vst@vlnb.net, http://scst.sourceforge.net

Sourceforge achievements

Description
No description provided
Readme 33 MiB
Languages
C 90.1%
Perl 4.2%
Shell 1.8%
HTML 1.7%
Makefile 1.2%
Other 0.9%