aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
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/md
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/md')
-rw-r--r--drivers/md/dm-mpath.c2
-rw-r--r--drivers/md/multipath.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 103304c1e3b0..9bf3460c5540 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -849,7 +849,7 @@ static int multipath_map(struct dm_target *ti, struct bio *bio,
849 dm_bio_record(&mpio->details, bio); 849 dm_bio_record(&mpio->details, bio);
850 850
851 map_context->ptr = mpio; 851 map_context->ptr = mpio;
852 bio->bi_rw |= (1 << BIO_RW_FAILFAST); 852 bio->bi_rw |= (1 << BIO_RW_FAILFAST_TRANSPORT);
853 r = map_io(m, bio, mpio, 0); 853 r = map_io(m, bio, mpio, 0);
854 if (r < 0 || r == DM_MAPIO_REQUEUE) 854 if (r < 0 || r == DM_MAPIO_REQUEUE)
855 mempool_free(mpio, m->mpio_pool); 855 mempool_free(mpio, m->mpio_pool);
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 8bb8794129b3..7ae33ebaf7ec 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -176,7 +176,7 @@ static int multipath_make_request (struct request_queue *q, struct bio * bio)
176 mp_bh->bio = *bio; 176 mp_bh->bio = *bio;
177 mp_bh->bio.bi_sector += multipath->rdev->data_offset; 177 mp_bh->bio.bi_sector += multipath->rdev->data_offset;
178 mp_bh->bio.bi_bdev = multipath->rdev->bdev; 178 mp_bh->bio.bi_bdev = multipath->rdev->bdev;
179 mp_bh->bio.bi_rw |= (1 << BIO_RW_FAILFAST); 179 mp_bh->bio.bi_rw |= (1 << BIO_RW_FAILFAST_TRANSPORT);
180 mp_bh->bio.bi_end_io = multipath_end_request; 180 mp_bh->bio.bi_end_io = multipath_end_request;
181 mp_bh->bio.bi_private = mp_bh; 181 mp_bh->bio.bi_private = mp_bh;
182 generic_make_request(&mp_bh->bio); 182 generic_make_request(&mp_bh->bio);
@@ -402,7 +402,7 @@ static void multipathd (mddev_t *mddev)
402 *bio = *(mp_bh->master_bio); 402 *bio = *(mp_bh->master_bio);
403 bio->bi_sector += conf->multipaths[mp_bh->path].rdev->data_offset; 403 bio->bi_sector += conf->multipaths[mp_bh->path].rdev->data_offset;
404 bio->bi_bdev = conf->multipaths[mp_bh->path].rdev->bdev; 404 bio->bi_bdev = conf->multipaths[mp_bh->path].rdev->bdev;
405 bio->bi_rw |= (1 << BIO_RW_FAILFAST); 405 bio->bi_rw |= (1 << BIO_RW_FAILFAST_TRANSPORT);
406 bio->bi_end_io = multipath_end_request; 406 bio->bi_end_io = multipath_end_request;
407 bio->bi_private = mp_bh; 407 bio->bi_private = mp_bh;
408 generic_make_request(bio); 408 generic_make_request(bio);