aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2012-02-13 15:38:22 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 10:38:01 -0500
commit66a651aa7a48b7c6181aff556937454c87bb9feb (patch)
treef4a737d1d6bdf2d18bf159c31a30d3705c59f66b
parentc834b1c4ec8ccc9c2d814bd78264b509708fe6dd (diff)
[SCSI] Ensure discard failure gets treated as a target problem
The error reported up the stack for a discard failure did not clearly indicate that the command was processed and subsequently failed by the target device. Return -EREMOTEIO so multipathing does not classify this condition as a path failure. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/scsi_lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 5b770e9e82c2..b4833deffd3b 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -880,6 +880,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
880 cmd->cmnd[0] == WRITE_SAME)) { 880 cmd->cmnd[0] == WRITE_SAME)) {
881 description = "Discard failure"; 881 description = "Discard failure";
882 action = ACTION_FAIL; 882 action = ACTION_FAIL;
883 error = -EREMOTEIO;
883 } else 884 } else
884 action = ACTION_FAIL; 885 action = ACTION_FAIL;
885 break; 886 break;