aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2011-01-18 04:13:11 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-12 11:33:08 -0500
commit63583cca745f440167bf27877182dc13e19d4bcf (patch)
treec1eb3ec5d35cd71c6373e82992710c91f2cb8bdd /include/scsi
parent7a1e9d829f8bd821466c5ea834ad6f378740d2be (diff)
[SCSI] Add detailed SCSI I/O errors
Instead of just passing 'EIO' for any I/O error we should be notifying the upper layers with more details about the cause of this error. Update the possible I/O errors to: - ENOLINK: Link failure between host and target - EIO: Retryable I/O error - EREMOTEIO: Non-retryable I/O error - EBADE: I/O error restricted to the I_T_L nexus 'Retryable' in this context means that an I/O error _might_ be restricted to the I_T_L nexus (vulgo: path), so retrying on another nexus / path might succeed. 'Non-retryable' in general refers to a target failure, so this error will always be generated regardless of the I_T_L nexus it was send on. I/O errors restricted to the I_T_L nexus might be retried on another nexus / path, but they should _not_ be queued if no paths are available. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 648d23358038..ead8dd054480 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -434,6 +434,10 @@ static inline int scsi_is_wlun(unsigned int lun)
434 * recover the link. Transport class will 434 * recover the link. Transport class will
435 * retry or fail IO */ 435 * retry or fail IO */
436#define DID_TRANSPORT_FAILFAST 0x0f /* Transport class fastfailed the io */ 436#define DID_TRANSPORT_FAILFAST 0x0f /* Transport class fastfailed the io */
437#define DID_TARGET_FAILURE 0x10 /* Permanent target failure, do not retry on
438 * other paths */
439#define DID_NEXUS_FAILURE 0x11 /* Permanent nexus failure, retry on other
440 * paths might yield different results */
437#define DRIVER_OK 0x00 /* Driver status */ 441#define DRIVER_OK 0x00 /* Driver status */
438 442
439/* 443/*
@@ -463,6 +467,7 @@ static inline int scsi_is_wlun(unsigned int lun)
463#define TIMEOUT_ERROR 0x2007 467#define TIMEOUT_ERROR 0x2007
464#define SCSI_RETURN_NOT_HANDLED 0x2008 468#define SCSI_RETURN_NOT_HANDLED 0x2008
465#define FAST_IO_FAIL 0x2009 469#define FAST_IO_FAIL 0x2009
470#define TARGET_ERROR 0x200A
466 471
467/* 472/*
468 * Midlevel queue return values. 473 * Midlevel queue return values.