aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@suse.de>2010-08-06 16:17:24 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-08-11 00:58:33 -0400
commit67110dfd45442e70753c575cf0509eaed237b749 (patch)
treeae341419e616d3e44f1ab40675bbee5692c2cdfa /drivers/scsi
parent3deee42088ddcf5b23021aa089b53444797e565d (diff)
[SCSI] make error handling more robust in the face of reservations
commit 5f91bb050ecc4ff1d8d3d07edbe550c8f431c5e1 Author: Michael Reed <mdr@sgi.com> Date: Mon Aug 10 11:59:28 2009 -0500 [SCSI] reservation conflict after timeout causes device to be taken offline Flipped us from always returning failed to always returning success in the name of fixing the problem where reservation conflict returns from test unit ready cause the device always to be taken offline. Unfortuantely, it also introduced a problem whereby for commands other than test unit ready, the eh dispatcher thinks they succeeded when reservation conflict is returned, whereas in reality they failed. Fix this by only returning success for the test unit ready case. Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_error.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index cfd01ef8a9d4..0bd88381c1e1 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -473,10 +473,12 @@ static int scsi_eh_completed_normally(struct scsi_cmnd *scmd)
473 */ 473 */
474 return SUCCESS; 474 return SUCCESS;
475 case RESERVATION_CONFLICT: 475 case RESERVATION_CONFLICT:
476 /* 476 if (scmd->cmnd[0] == TEST_UNIT_READY)
477 * let issuer deal with this, it could be just fine 477 /* it is a success, we probed the device and
478 */ 478 * found it */
479 return SUCCESS; 479 return SUCCESS;
480 /* otherwise, we failed to send the command */
481 return FAILED;
480 case QUEUE_FULL: 482 case QUEUE_FULL:
481 scsi_handle_queue_full(scmd->device); 483 scsi_handle_queue_full(scmd->device);
482 /* fall through */ 484 /* fall through */