From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org
Subject: [PATCH 07 of 10] scsi: Do not retry a request whose data integrity check failed
Date: Wed, 25 Jun 2008 11:22:46 -0400 [thread overview]
Message-ID: <3fc00dbcb8b66bbf06ef.1214407366@sermon.lab.mkp.net> (raw)
In-Reply-To: <patchbomb.1214407359@sermon.lab.mkp.net>
If initiator or target reject the I/O due to DIF errors there is no
point in retrying.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
2 files changed, 7 insertions(+)
drivers/scsi/scsi_error.c | 3 +++
drivers/scsi/scsi_lib.c | 4 ++++
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -333,6 +333,9 @@ static int scsi_check_sense(struct scsi_
return /* soft_error */ SUCCESS;
case ABORTED_COMMAND:
+ if (sshdr.asc == 0x10) /* DIF */
+ return SUCCESS;
+
return NEEDS_RETRY;
case NOT_READY:
case UNIT_ATTENTION:
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -945,6 +945,10 @@ void scsi_io_completion(struct scsi_cmnd
scsi_requeue_command(q, cmd);
return;
} else {
+ if (sshdr.asc == 0x10) { /* DIF */
+ scsi_print_result(cmd);
+ scsi_print_sense("", cmd);
+ }
scsi_end_request(cmd, -EIO, this_count, 1);
return;
}
next prev parent reply other threads:[~2008-06-25 15:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-25 15:22 [PATCH 00 of 10] SCSI Data Integrity Support Martin K. Petersen
2008-06-25 15:22 ` [PATCH 01 of 10] sd: Move sd.h header file Martin K. Petersen
2008-06-25 15:22 ` [PATCH 02 of 10] sd: Move scsi_disk() accessor function to sd.h Martin K. Petersen
2008-06-25 15:22 ` [PATCH 03 of 10] lib: Add support for the T10 Data Integrity Field CRC Martin K. Petersen
2008-06-25 15:22 ` [PATCH 04 of 10] scsi: Support devices with protection information (DIF) Martin K. Petersen
2008-06-28 15:07 ` James Bottomley
2008-06-30 15:24 ` Martin K. Petersen
2008-06-25 15:22 ` [PATCH 05 of 10] scsi: Host protection capabilities Martin K. Petersen
2008-06-25 15:22 ` [PATCH 06 of 10] scsi: Command protection operation Martin K. Petersen
2008-06-25 15:22 ` Martin K. Petersen [this message]
2008-06-25 15:22 ` [PATCH 08 of 10] scsi: Documentation for the SCSI protection information/DIF support Martin K. Petersen
2008-06-25 15:22 ` [PATCH 09 of 10] sd: Identify DIF protection type and application tag ownership Martin K. Petersen
2008-06-25 15:22 ` [PATCH 10 of 10] sd: Support for SCSI disk (SBC) Data Integrity Field Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3fc00dbcb8b66bbf06ef.1214407366@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.