Enhanced Unit Attention handling
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest10 patches 6 repliesIn review
- v36 patches 13 repliesSuperseded
- v28 patches 4 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 RFC | 9 patches | 39 replies | Superseded |
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | scsi: Fix incorrect function name in commentdrivers/ | +1 | 0 replies | |
| 2/10 | scsi: Correct size of envp[]drivers/ | +1 | 0 replies | |
| 3/10 | scsi: Add missing newline to scsi_sysfs.cdrivers/ | +2 | 0 replies | |
| 4/10 | scsi: Change to use list_for_each_entry_safedrivers/ | +2 | 0 replies | |
| 5/10 | scsi: Rename scsi_evt_thread() to scsi_evt_work()drivers/ drivers/ drivers/ | +4 | 0 replies | |
| 6/10 | scsi: Move schedule_work() call to be outside lockdrivers/ | +1 | 0 replies | |
| 7/10 | scsi: Clear expecting_cc_ua on successful commandsdrivers/ | +7 | 0 replies | |
| 8/10 | scsi: Generate uevents on certain unit attention codesdrivers/ drivers/ drivers/ +1 more | +156 | 5 replies | |
| 9/10 | scsi_debug: Add optional unit attention reportingdrivers/ | +131 | 0 replies | |
| 10/10 | scsi: Added scsi_target rescan capability to sysfsdrivers/ drivers/ drivers/ | +67 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 00/10] Enhanced Unit Attention handling
From: "Ewan D. Milne" <[email protected]>
This patch set adds changes to the SCSI mid-layer, sysfs and scsi_debug to provide enhanced support for Unit Attention conditions.
There was some discussion about this a couple of years ago on the linux-scsi mailing list: http://marc.info/?l=linux-scsi&m=129702506514742&w=2
Although one approach is to send all SCSI sense data to a userspace daemon for processing, this patch set does not take that approach due to the difficulty in reliably delivering all of the data. An interesting UA condition might not be delivered due to a flood of media errors, for example.
The mechanism used is to flag when certain UA ASC/ASCQ codes are received that report asynchronous changes to the storage device configuration. An appropriate uevent is then generated for the scsi_device or scsi_target object. The expecting_cc_ua flag is used for REPORTED LUNS DATA HAS CHANGED unit attention conditions to avoid generating duplicate events on multiple LUNs.
Changes made since earlier v3 version:
- Put fixes to existing code in separate individual patches
- Removed UA queue overflow condition reporting
- Removed delayed_work aggregation mechanism for events
- Eliminated separate scsi_device and scsi_target mechanisms
- Changed to use a single environment variable for uevents
- Clear expecting_cc_ua on successful commands
- Added use of expecting_cc_ua for REPORTED LUNS DATA HAS CHANGED
Changes made since earlier v2 version:
- Remove patch 1/8 "Generate uevent on sd capacity change"
- Remove patch 8/8 "Streamline detection of FM/EOM/ILI status"
- Changed scsi_debug to not generate UA on INQUIRY or REPORT_LUNS
- Changed scsi_debug to only report UA queue overflow condition if dsense=1, as descriptor format sense data is needed
Changes made since earlier RFC version:
- Remove patch 1/9 "Detect overflow of sense data buffer" Some scsi_debug changes in this patch were moved to patch 7/8
- Corrected Kconfig help text
- Change name of "sdev_evt_thread" to "sdev_evt_work"
- Change name of "starget_evt_thread" to "starget_evt_work"
- Pull code out of scsi_check_sense() that handles UAs into an exported function so that drivers can report conditions received asynchronously
Thanks to everyone for the comments on this patch series.
Ewan D. Milne (10):
scsi: Fix incorrect function name in comment
scsi: Correct size of envp[]
scsi: Add missing newline to scsi_sysfs.c
scsi: Change to use list_for_each_entry_safe
scsi: Rename scsi_evt_thread() to scsi_evt_work()
scsi: Move schedule_work() call to be outside lock
scsi: Clear expecting_cc_ua on successful commands
scsi: Generate uevents on certain unit attention codes
scsi_debug: Add optional unit attention reporting
scsi: Added scsi_target rescan capability to sysfs
drivers/scsi/scsi_debug.c | 131 +++++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/scsi_error.c | 125 ++++++++++++++++++++++++++++++++++-------- drivers/scsi/scsi_lib.c | 52 +++++++++++++++--- drivers/scsi/scsi_priv.h | 5 +- drivers/scsi/scsi_scan.c | 33 ++---------- drivers/scsi/scsi_sysfs.c | 81 +++++++++++++++++++++++++--- include/scsi/scsi_device.h | 11 +++- 7 files changed, 372 insertions(+), 66 deletions(-)
Signature · 1 line
1.7.11.7