Skip to content

Commit

Permalink
[SCSI] Ensure discard failure gets treated as a target problem
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin K. Petersen authored and James Bottomley committed Feb 19, 2012
1 parent c834b1c commit 66a651a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 66a651a

Please sign in to comment.