mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
3777c775c70ab903551e4f80f372f0f02db1390e
When pr_dump_dir is set to a directory path, each dev_disk device writes its PR state to <dir>/<serial> on detach, using the same text format as the pr_state sysfs attribute. The default is an empty string, which disables the feature entirely. This provides a race-free way to capture PR state at the point of device teardown, after all in-flight commands have completed, for use cases that need to preserve PR state across a device transition. The dump must happen before scst_pr_clear_dev() wipes the in-memory registrant list during device unregistration. To achieve this, a new optional pre_unregister() callback is added to struct scst_dev_type, called from both scst_unregister_device() and scst_unregister_virtual_device() before scst_pr_clear_dev(). The disk handler registers this callback (disk_pre_unregister) to perform the dump at the correct moment. The work is split across two phases to avoid filesystem I/O while scst_mutex is held. disk_pre_unregister() (called under scst_mutex) captures the PR state into a heap buffer and records the destination path. disk_detach() (called after scst_mutex is released) writes the buffer to the filesystem. To carry state between the two phases, dh_priv is changed from a bare serial-number string to a struct disk_dh_priv containing the serial plus the captured dump fields.
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:
- The SCST core in the scst/ subdirectory.
- A tool for loading, saving and modifying the SCST configuration in directory scstadmin/.
- Several SCSI target drivers in the directories iscsi-scst/, qla2x00t/, srpt/, scst_local/ and fcst/.
- User space programs in the usr/ subdirectory, e.g. fileio_tgt.
- 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
Languages
C
90.1%
Perl
4.2%
Shell
1.8%
HTML
1.7%
Makefile
1.2%
Other
0.9%
