From f6fc8b7d2a27e10dfe2891a157f04d558ff87823 Mon Sep 17 00:00:00 2001 From: Brian M Date: Wed, 11 Mar 2026 17:32:57 -0700 Subject: [PATCH] scst: document pr_state and pr_dump_dir sysfs attributes in README pr_state is a common device attribute for save/restore of Persistent Reservation state. pr_dump_dir is a dev_disk handler attribute that triggers an automatic kernel-side PR state dump at unregistration time. --- scst/README | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scst/README b/scst/README index a9367bd76..841338908 100644 --- a/scst/README +++ b/scst/README @@ -608,6 +608,12 @@ SCST dev handlers can have the following common entries: - dump_prs - allows to dump persistent reservations information in the kernel log. + - pr_state - allows to save and restore the complete Persistent + Reservation state (registrants, active reservation, generation + counter). On read, serialises the state to a text format. On write, + restores state into the device; this should be done before the device + starts serving I/O. + - type - SCSI type of this device - max_tgt_dev_commands - maximum number of SCSI commands any session to @@ -2525,6 +2531,15 @@ host:channel:id:lun numbers from this dev handler. As usually, on read the "mgmt" file returns small help about available commands. +The dev_disk handler also exposes the following attribute in its root +subdirectory: + + - pr_dump_dir - when set to a directory path, causes each dev_disk + device to write its PR state to / at unregistration + time, after all in-flight commands have completed. The default value + is an empty string (dump disabled). The filename is the device's + SCSI Unit Serial Number. The file format is the same as pr_state. + You need to manually assign each your real SCSI device to the corresponding pass-through dev handler using the "add_device" command, otherwise the real SCSI devices will not be visible remotely. The