summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-mpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r--drivers/md/dm-mpath.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 39262e344ae1..a7d2e0840cc5 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -565,7 +565,7 @@ static int __multipath_map_bio(struct multipath *m, struct bio *bio, struct dm_m
565 mpio->pgpath = pgpath; 565 mpio->pgpath = pgpath;
566 mpio->nr_bytes = nr_bytes; 566 mpio->nr_bytes = nr_bytes;
567 567
568 bio->bi_error = 0; 568 bio->bi_status = 0;
569 bio->bi_bdev = pgpath->path.dev->bdev; 569 bio->bi_bdev = pgpath->path.dev->bdev;
570 bio->bi_opf |= REQ_FAILFAST_TRANSPORT; 570 bio->bi_opf |= REQ_FAILFAST_TRANSPORT;
571 571
@@ -623,10 +623,10 @@ static void process_queued_bios(struct work_struct *work)
623 r = __multipath_map_bio(m, bio, get_mpio_from_bio(bio)); 623 r = __multipath_map_bio(m, bio, get_mpio_from_bio(bio));
624 switch (r) { 624 switch (r) {
625 case DM_MAPIO_KILL: 625 case DM_MAPIO_KILL:
626 r = -EIO; 626 bio->bi_status = BLK_STS_IOERR;
627 /*FALLTHRU*/ 627 bio_endio(bio);
628 case DM_MAPIO_REQUEUE: 628 case DM_MAPIO_REQUEUE:
629 bio->bi_error = r; 629 bio->bi_status = BLK_STS_DM_REQUEUE;
630 bio_endio(bio); 630 bio_endio(bio);
631 break; 631 break;
632 case DM_MAPIO_REMAPPED: 632 case DM_MAPIO_REMAPPED:
@@ -1510,7 +1510,8 @@ static int multipath_end_io(struct dm_target *ti, struct request *clone,
1510 return r; 1510 return r;
1511} 1511}
1512 1512
1513static int multipath_end_io_bio(struct dm_target *ti, struct bio *clone, int *error) 1513static int multipath_end_io_bio(struct dm_target *ti, struct bio *clone,
1514 blk_status_t *error)
1514{ 1515{
1515 struct multipath *m = ti->private; 1516 struct multipath *m = ti->private;
1516 struct dm_mpath_io *mpio = get_mpio_from_bio(clone); 1517 struct dm_mpath_io *mpio = get_mpio_from_bio(clone);
@@ -1518,7 +1519,7 @@ static int multipath_end_io_bio(struct dm_target *ti, struct bio *clone, int *er
1518 unsigned long flags; 1519 unsigned long flags;
1519 int r = DM_ENDIO_DONE; 1520 int r = DM_ENDIO_DONE;
1520 1521
1521 if (!*error || noretry_error(errno_to_blk_status(*error))) 1522 if (!*error || noretry_error(*error))
1522 goto done; 1523 goto done;
1523 1524
1524 if (pgpath) 1525 if (pgpath)
@@ -1527,7 +1528,7 @@ static int multipath_end_io_bio(struct dm_target *ti, struct bio *clone, int *er
1527 if (atomic_read(&m->nr_valid_paths) == 0 && 1528 if (atomic_read(&m->nr_valid_paths) == 0 &&
1528 !test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) { 1529 !test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) {
1529 dm_report_EIO(m); 1530 dm_report_EIO(m);
1530 *error = -EIO; 1531 *error = BLK_STS_IOERR;
1531 goto done; 1532 goto done;
1532 } 1533 }
1533 1534