aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/device_handler/scsi_dh_hp_sw.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-08-19 19:45:30 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-13 09:28:52 -0400
commit6000a368cd8e6da1caf101411bdb494cd6fb8b09 (patch)
tree4cd3333af00182e915aa96ffa49069f5f76976dc /drivers/scsi/device_handler/scsi_dh_hp_sw.c
parent056a44834950ffa51fafa6c76a720fa32e86851a (diff)
[SCSI] block: separate failfast into multiple bits.
Multipath is best at handling transport errors. If it gets a device error then there is not much the multipath layer can do. It will just access the same device but from a different path. This patch breaks up failfast into device, transport and driver errors. The multipath layers (md and dm mutlipath) only ask the lower levels to fast fail transport errors. The user of failfast, read ahead, will ask to fast fail on all errors. Note that blk_noretry_request will return true if any failfast bit is set. This allows drivers that do not support the multipath failfast bits to continue to fail on any failfast error like before. Drivers like scsi that are able to fail fast specific errors can check for the specific fail fast type. In the next patch I will convert scsi. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/device_handler/scsi_dh_hp_sw.c')
-rw-r--r--drivers/scsi/device_handler/scsi_dh_hp_sw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
index 5e93c88ad66..9aec4ca64e5 100644
--- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c
+++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
@@ -112,7 +112,8 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
112 return SCSI_DH_RES_TEMP_UNAVAIL; 112 return SCSI_DH_RES_TEMP_UNAVAIL;
113 113
114 req->cmd_type = REQ_TYPE_BLOCK_PC; 114 req->cmd_type = REQ_TYPE_BLOCK_PC;
115 req->cmd_flags |= REQ_FAILFAST; 115 req->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
116 REQ_FAILFAST_DRIVER;
116 req->cmd_len = COMMAND_SIZE(TEST_UNIT_READY); 117 req->cmd_len = COMMAND_SIZE(TEST_UNIT_READY);
117 req->cmd[0] = TEST_UNIT_READY; 118 req->cmd[0] = TEST_UNIT_READY;
118 req->timeout = HP_SW_TIMEOUT; 119 req->timeout = HP_SW_TIMEOUT;
@@ -204,7 +205,8 @@ static int hp_sw_start_stop(struct scsi_device *sdev, struct hp_sw_dh_data *h)
204 return SCSI_DH_RES_TEMP_UNAVAIL; 205 return SCSI_DH_RES_TEMP_UNAVAIL;
205 206
206 req->cmd_type = REQ_TYPE_BLOCK_PC; 207 req->cmd_type = REQ_TYPE_BLOCK_PC;
207 req->cmd_flags |= REQ_FAILFAST; 208 req->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
209 REQ_FAILFAST_DRIVER;
208 req->cmd_len = COMMAND_SIZE(START_STOP); 210 req->cmd_len = COMMAND_SIZE(START_STOP);
209 req->cmd[0] = START_STOP; 211 req->cmd[0] = START_STOP;
210 req->cmd[4] = 1; /* Start spin cycle */ 212 req->cmd[4] = 1; /* Start spin cycle */