diff options
author | Christoph Hellwig <hch@lst.de> | 2017-06-03 03:38:06 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-06-09 11:27:32 -0400 |
commit | 4e4cbee93d56137ebff722be022cae5f70ef84fb (patch) | |
tree | 4fa7345155599fc6bdd653fca8c5224ddf90a5be /drivers/md/multipath.c | |
parent | fc17b6534eb8395f0b3133eb31d87deec32c642b (diff) |
block: switch bios to blk_status_t
Replace bi_error with a new bi_status to allow for a clear conversion.
Note that device mapper overloaded bi_error with a private value, which
we'll have to keep arround at least for now and thus propagate to a
proper blk_status_t value.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index e95d521d93e9..68d036e64041 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -73,12 +73,12 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh) | |||
73 | * operation and are ready to return a success/failure code to the buffer | 73 | * operation and are ready to return a success/failure code to the buffer |
74 | * cache layer. | 74 | * cache layer. |
75 | */ | 75 | */ |
76 | static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err) | 76 | static void multipath_end_bh_io(struct multipath_bh *mp_bh, blk_status_t status) |
77 | { | 77 | { |
78 | struct bio *bio = mp_bh->master_bio; | 78 | struct bio *bio = mp_bh->master_bio; |
79 | struct mpconf *conf = mp_bh->mddev->private; | 79 | struct mpconf *conf = mp_bh->mddev->private; |
80 | 80 | ||
81 | bio->bi_error = err; | 81 | bio->bi_status = status; |
82 | bio_endio(bio); | 82 | bio_endio(bio); |
83 | mempool_free(mp_bh, conf->pool); | 83 | mempool_free(mp_bh, conf->pool); |
84 | } | 84 | } |
@@ -89,7 +89,7 @@ static void multipath_end_request(struct bio *bio) | |||
89 | struct mpconf *conf = mp_bh->mddev->private; | 89 | struct mpconf *conf = mp_bh->mddev->private; |
90 | struct md_rdev *rdev = conf->multipaths[mp_bh->path].rdev; | 90 | struct md_rdev *rdev = conf->multipaths[mp_bh->path].rdev; |
91 | 91 | ||
92 | if (!bio->bi_error) | 92 | if (!bio->bi_status) |
93 | multipath_end_bh_io(mp_bh, 0); | 93 | multipath_end_bh_io(mp_bh, 0); |
94 | else if (!(bio->bi_opf & REQ_RAHEAD)) { | 94 | else if (!(bio->bi_opf & REQ_RAHEAD)) { |
95 | /* | 95 | /* |
@@ -102,7 +102,7 @@ static void multipath_end_request(struct bio *bio) | |||
102 | (unsigned long long)bio->bi_iter.bi_sector); | 102 | (unsigned long long)bio->bi_iter.bi_sector); |
103 | multipath_reschedule_retry(mp_bh); | 103 | multipath_reschedule_retry(mp_bh); |
104 | } else | 104 | } else |
105 | multipath_end_bh_io(mp_bh, bio->bi_error); | 105 | multipath_end_bh_io(mp_bh, bio->bi_status); |
106 | rdev_dec_pending(rdev, conf->mddev); | 106 | rdev_dec_pending(rdev, conf->mddev); |
107 | } | 107 | } |
108 | 108 | ||
@@ -347,7 +347,7 @@ static void multipathd(struct md_thread *thread) | |||
347 | pr_err("multipath: %s: unrecoverable IO read error for block %llu\n", | 347 | pr_err("multipath: %s: unrecoverable IO read error for block %llu\n", |
348 | bdevname(bio->bi_bdev,b), | 348 | bdevname(bio->bi_bdev,b), |
349 | (unsigned long long)bio->bi_iter.bi_sector); | 349 | (unsigned long long)bio->bi_iter.bi_sector); |
350 | multipath_end_bh_io(mp_bh, -EIO); | 350 | multipath_end_bh_io(mp_bh, BLK_STS_IOERR); |
351 | } else { | 351 | } else { |
352 | pr_err("multipath: %s: redirecting sector %llu to another IO path\n", | 352 | pr_err("multipath: %s: redirecting sector %llu to another IO path\n", |
353 | bdevname(bio->bi_bdev,b), | 353 | bdevname(bio->bi_bdev,b), |