dect
/
linux-2.6
Archived
13
0
Fork 0

[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>
This commit is contained in:
Martin K. Petersen 2012-02-13 15:38:22 -05:00 committed by James Bottomley
parent c834b1c4ec
commit 66a651aa7a
1 changed files with 1 additions and 0 deletions

View File

@ -880,6 +880,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
cmd->cmnd[0] == WRITE_SAME)) {
description = "Discard failure";
action = ACTION_FAIL;
error = -EREMOTEIO;
} else
action = ACTION_FAIL;
break;