aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorJörn Engel <joern@logfs.org>2013-03-18 18:30:31 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2013-04-25 04:05:25 -0400
commitad6732820c56664be7d022002907ba62b981bd85 (patch)
treed16fd0f287972312c608a948b62d971fb0e410b5 /drivers/target
parent0463a3fefda4cf0591edc685d4fb215a33315e01 (diff)
target: Change default sense key of NOT_READY
As the comment sais, this allows Solaris initiators to survive intermittent errors. The comment from someone reading the Solaris sources seem to imply that multipathing would be broken without this patch as well. Signed-off-by: Joern Engel <joern@logfs.org> Cc: Brian Bunker <brian@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_transport.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 3243ea790eab..493e9e589059 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2765,8 +2765,13 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd,
2765 /* CURRENT ERROR */ 2765 /* CURRENT ERROR */
2766 buffer[0] = 0x70; 2766 buffer[0] = 0x70;
2767 buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; 2767 buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10;
2768 /* ILLEGAL REQUEST */ 2768 /*
2769 buffer[SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; 2769 * Returning ILLEGAL REQUEST would cause immediate IO errors on
2770 * Solaris initiators. Returning NOT READY instead means the
2771 * operations will be retried a finite number of times and we
2772 * can survive intermittent errors.
2773 */
2774 buffer[SPC_SENSE_KEY_OFFSET] = NOT_READY;
2770 /* LOGICAL UNIT COMMUNICATION FAILURE */ 2775 /* LOGICAL UNIT COMMUNICATION FAILURE */
2771 buffer[SPC_ASC_KEY_OFFSET] = 0x08; 2776 buffer[SPC_ASC_KEY_OFFSET] = 0x08;
2772 break; 2777 break;