aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-09-11 08:26:40 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-09-11 08:33:30 -0400
commitda6c5c720c52cc717124f8f0830b710ea6a092fd (patch)
treef54c880aec9289895721e707d4b22e456b277127 /drivers/scsi/scsi_lib.c
parent80a761fd33cf812f771e212139157bf8f58d4b3f (diff)
scsi,block: update SCSI to handle mixed merge failures
Update scsi_io_completion() such that it only fails requests till the next error boundary and retry the leftover. This enables block layer to merge requests with different failfast settings and still behave correctly on errors. Allow merge of requests of different failfast settings. As SCSI is currently the only subsystem which follows failfast status, there's no need to worry about other block drivers for now. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Niel Lambrechts <niel.lambrechts@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index f3c40898fc7d..90c94da8baa4 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -897,8 +897,10 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
897 if (driver_byte(result) & DRIVER_SENSE) 897 if (driver_byte(result) & DRIVER_SENSE)
898 scsi_print_sense("", cmd); 898 scsi_print_sense("", cmd);
899 } 899 }
900 blk_end_request_all(req, -EIO); 900 if (blk_end_request_err(req, -EIO))
901 scsi_next_command(cmd); 901 scsi_requeue_command(q, cmd);
902 else
903 scsi_next_command(cmd);
902 break; 904 break;
903 case ACTION_REPREP: 905 case ACTION_REPREP:
904 /* Unprep the request and put it back at the head of the queue. 906 /* Unprep the request and put it back at the head of the queue.