Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH v4 00/10] Enhanced Unit Attention handling
@ 2013-08-01 20:57 Ewan D. Milne
  2013-08-01 20:57 ` [PATCH v4 01/10] scsi: Fix incorrect function name in comment Ewan D. Milne
                   ` (10 more replies)
  0 siblings, 11 replies; 17+ messages in thread
From: Ewan D. Milne @ 2013-08-01 20:57 UTC (permalink / raw)
  To: linux-scsi

From: "Ewan D. Milne" <emilne@redhat.com>

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(-)

-- 
1.7.11.7


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

end of thread, other threads:[~2013-08-09 15:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 20:57 [PATCH v4 00/10] Enhanced Unit Attention handling Ewan D. Milne
2013-08-01 20:57 ` [PATCH v4 01/10] scsi: Fix incorrect function name in comment Ewan D. Milne
2013-08-01 20:57 ` [PATCH v4 02/10] scsi: Correct size of envp[] Ewan D. Milne
2013-08-01 20:57 ` [PATCH v4 03/10] scsi: Add missing newline to scsi_sysfs.c Ewan D. Milne
2013-08-01 20:57 ` [PATCH v4 04/10] scsi: Change to use list_for_each_entry_safe Ewan D. Milne
2013-08-01 20:57 ` [PATCH v4 05/10] scsi: Rename scsi_evt_thread() to scsi_evt_work() Ewan D. Milne
2013-08-01 20:57 ` [PATCH v4 06/10] scsi: Move schedule_work() call to be outside lock Ewan D. Milne
2013-08-01 20:57 ` [PATCH v4 07/10] scsi: Clear expecting_cc_ua on successful commands Ewan D. Milne
2013-08-01 20:57 ` [PATCH v4 08/10] scsi: Generate uevents on certain unit attention codes Ewan D. Milne
2013-08-02 17:06   ` James Bottomley
2013-08-08 16:08     ` Ewan Milne
2013-08-09  1:15       ` James Bottomley
2013-08-09 14:50         ` Ewan Milne
2013-08-09 15:04           ` James Bottomley
2013-08-01 20:57 ` [PATCH v4 09/10] scsi_debug: Add optional unit attention reporting Ewan D. Milne
2013-08-01 20:57 ` [PATCH v4 10/10] scsi: Added scsi_target rescan capability to sysfs Ewan D. Milne
2013-08-02 17:05 ` [PATCH v4 00/10] Enhanced Unit Attention handling James Bottomley

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