Commit 66a651aa authored by Martin K. Petersen's avatar Martin K. Petersen Committed by James Bottomley

[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: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Acked-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent c834b1c4
...@@ -880,6 +880,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) ...@@ -880,6 +880,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
cmd->cmnd[0] == WRITE_SAME)) { cmd->cmnd[0] == WRITE_SAME)) {
description = "Discard failure"; description = "Discard failure";
action = ACTION_FAIL; action = ACTION_FAIL;
error = -EREMOTEIO;
} else } else
action = ACTION_FAIL; action = ACTION_FAIL;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment