All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/9] [SCSI] Enhanced sense and Unit Attention handling
@ 2013-01-18 16:27 Ewan D. Milne
  2013-01-18 16:27 ` [PATCH RFC 1/9] [SCSI] Detect overflow of sense data buffer Ewan D. Milne
                   ` (10 more replies)
  0 siblings, 11 replies; 49+ messages in thread
From: Ewan D. Milne @ 2013-01-18 16:27 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, as well as
detection of reported sense data overflow conditions and some changes
to sense data processing.  It also adds a uevent when the reported
capacity changes on an sd device.

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.  An aggregation mechanism is used to avoid generating uevents at
too high a rate, and to coalesce multiple UAs reported by LUNs on the
same target for a REPORTED LUNS DATA HAS CHANGED sense code.

The changes are (mostly) enabled by a new kernel config option
CONFIG_SCSI_ENHANCED_UA.  If this config option is not used, no new
uevents are generated.  There are some changes to kernel logging messages
if CONFIG_SCSI_ENHANCED_UA is enabled, because the existing messages
explicitly stated that the kernel did not do anything with the information.

Note that checkpatch is reporting errors on patch 7/9 relating to macros
in scsi_sysfs.c -- I believe these errors are incorrect and have sent a
message to the checkpatch maintainer.  The macros were derived from
existing ones already in the file.

Ewan D. Milne (9):
  [SCSI] Detect overflow of sense data buffer
  [SCSI] Generate uevent on sd capacity change
  [SCSI] Add a kernel config option for enhanced Unit Attention support
  [SCSI] Rename scsi_evt_xxx to sdev_evt_xxx and scsi_event to
    sdev_event
  [SCSI] Add support for scsi_target events
  [SCSI] Generate uevents for certain Unit Attention codes
  [SCSI] Add sysfs support for enhanced Unit Attention handling
  [SCSI] Add sense and Unit Attention generation to scsi_debug
  [SCSI] Streamline detection of FM/EOM/ILI status

 drivers/scsi/Kconfig       |  12 +++
 drivers/scsi/scsi_debug.c  | 168 ++++++++++++++++++++++++++++++++++++++
 drivers/scsi/scsi_error.c  | 198 ++++++++++++++++++++++++++++++++++++++++-----
 drivers/scsi/scsi_lib.c    | 178 +++++++++++++++++++++++++++++++++++++---
 drivers/scsi/scsi_priv.h   |  10 ++-
 drivers/scsi/scsi_scan.c   |  54 ++++++-------
 drivers/scsi/scsi_sysfs.c  | 148 ++++++++++++++++++++++++++++++---
 drivers/scsi/sd.c          |   9 +++
 include/scsi/scsi_cmnd.h   |   4 +
 include/scsi/scsi_device.h |  64 ++++++++++++++-
 include/scsi/scsi_eh.h     |   7 ++
 11 files changed, 773 insertions(+), 79 deletions(-)

-- 
1.7.11.7


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

end of thread, other threads:[~2013-01-31 16:27 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-18 16:27 [PATCH RFC 0/9] [SCSI] Enhanced sense and Unit Attention handling Ewan D. Milne
2013-01-18 16:27 ` [PATCH RFC 1/9] [SCSI] Detect overflow of sense data buffer Ewan D. Milne
2013-01-18 16:46   ` James Bottomley
2013-01-21  7:26     ` Hannes Reinecke
2013-01-21  8:58       ` James Bottomley
2013-01-21 17:42       ` Douglas Gilbert
2013-01-22 15:10       ` Ewan Milne
2013-01-23  7:16         ` Hannes Reinecke
2013-01-22 15:08     ` Ewan Milne
2013-01-23 10:44       ` Hannes Reinecke
2013-01-23 13:06       ` James Bottomley
2013-01-23 21:21         ` Ewan Milne
2013-01-18 16:27 ` [PATCH RFC 2/9] [SCSI] Generate uevent on sd capacity change Ewan D. Milne
2013-01-18 16:27 ` [PATCH RFC 3/9] [SCSI] Add a kernel config option for enhanced Unit Attention support Ewan D. Milne
2013-01-18 16:27 ` [PATCH RFC 4/9] [SCSI] Rename scsi_evt_xxx to sdev_evt_xxx and scsi_event to sdev_event Ewan D. Milne
2013-01-22 17:33   ` Bart Van Assche
2013-01-23 21:08     ` Ewan Milne
2013-01-22 17:38   ` Bart Van Assche
2013-01-23 20:39     ` Ewan Milne
2013-01-18 16:27 ` [PATCH RFC 5/9] [SCSI] Add support for scsi_target events Ewan D. Milne
2013-01-18 16:27 ` [PATCH RFC 6/9] [SCSI] Generate uevents for certain Unit Attention codes Ewan D. Milne
2013-01-18 16:27 ` [PATCH RFC 7/9] [SCSI] Add sysfs support for enhanced Unit Attention handling Ewan D. Milne
2013-01-18 16:27 ` [PATCH RFC 8/9] [SCSI] Add sense and Unit Attention generation to scsi_debug Ewan D. Milne
2013-01-19 18:43   ` Douglas Gilbert
2013-01-22 15:12     ` Ewan Milne
2013-01-18 16:27 ` [PATCH RFC 9/9] [SCSI] Streamline detection of FM/EOM/ILI status Ewan D. Milne
2013-01-24  0:19 ` [PATCH RFC 0/9] [SCSI] Enhanced sense and Unit Attention handling Bart Van Assche
2013-01-24 11:38   ` Hannes Reinecke
2013-01-24 14:00     ` Ewan Milne
2013-01-24 14:01     ` Mike Christie
2013-01-24 22:02       ` Ewan Milne
2013-01-24 22:47         ` Mike Christie
2013-01-24 14:38     ` Bart Van Assche
2013-01-24 14:51       ` Hannes Reinecke
2013-01-24 15:00         ` Mike Christie
2013-01-24 15:15           ` Hannes Reinecke
2013-01-24 22:00             ` Ewan Milne
2013-01-26 18:20             ` Mike Christie
2013-01-28  6:56               ` Hannes Reinecke
2013-01-28 15:05       ` Jeremy Linton
2013-01-28 15:44         ` Bart Van Assche
2013-01-28 15:48           ` Hannes Reinecke
2013-01-28 20:26             ` James Bottomley
2013-01-28 15:52           ` Jeremy Linton
2013-01-28 16:04             ` Ewan Milne
2013-01-28 16:18             ` Mike Christie
2013-01-29  5:01         ` Shyam_Iyer
2013-01-24 13:53   ` Ewan Milne
2013-01-31 16:27 ` Ewan Milne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.