summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-08-19 18:45:30 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-13 09:28:52 -0400
commit6000a368cd8e6da1caf101411bdb494cd6fb8b09 (patch)
tree4cd3333af00182e915aa96ffa49069f5f76976dc /block
parent056a44834950ffa51fafa6c76a720fa32e86851a (diff)
downloadop-kernel-dev-6000a368cd8e6da1caf101411bdb494cd6fb8b09.zip
op-kernel-dev-6000a368cd8e6da1caf101411bdb494cd6fb8b09.tar.gz
[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 'block')
-rw-r--r--block/blk-core.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 2d053b5..9e79a48 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1075,8 +1075,15 @@ void init_request_from_bio(struct request *req, struct bio *bio)
/*
* inherit FAILFAST from bio (for read-ahead, and explicit FAILFAST)
*/
- if (bio_rw_ahead(bio) || bio_failfast(bio))
- req->cmd_flags |= REQ_FAILFAST;
+ if (bio_rw_ahead(bio))
+ req->cmd_flags |= (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
+ REQ_FAILFAST_DRIVER);
+ if (bio_failfast_dev(bio))
+ req->cmd_flags |= REQ_FAILFAST_DEV;
+ if (bio_failfast_transport(bio))
+ req->cmd_flags |= REQ_FAILFAST_TRANSPORT;
+ if (bio_failfast_driver(bio))
+ req->cmd_flags |= REQ_FAILFAST_DRIVER;
/*
* REQ_BARRIER implies no merging, but lets make it explicit
OpenPOWER on IntegriCloud