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 /block/bio-integrity.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 'block/bio-integrity.c')
-rw-r--r-- | block/bio-integrity.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c index 5384713d48bc..17b9740e138b 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c | |||
@@ -221,7 +221,7 @@ static inline unsigned int bio_integrity_bytes(struct blk_integrity *bi, | |||
221 | * @bio: bio to generate/verify integrity metadata for | 221 | * @bio: bio to generate/verify integrity metadata for |
222 | * @proc_fn: Pointer to the relevant processing function | 222 | * @proc_fn: Pointer to the relevant processing function |
223 | */ | 223 | */ |
224 | static int bio_integrity_process(struct bio *bio, | 224 | static blk_status_t bio_integrity_process(struct bio *bio, |
225 | integrity_processing_fn *proc_fn) | 225 | integrity_processing_fn *proc_fn) |
226 | { | 226 | { |
227 | struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); | 227 | struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); |
@@ -229,7 +229,7 @@ static int bio_integrity_process(struct bio *bio, | |||
229 | struct bvec_iter bviter; | 229 | struct bvec_iter bviter; |
230 | struct bio_vec bv; | 230 | struct bio_vec bv; |
231 | struct bio_integrity_payload *bip = bio_integrity(bio); | 231 | struct bio_integrity_payload *bip = bio_integrity(bio); |
232 | unsigned int ret = 0; | 232 | blk_status_t ret = BLK_STS_OK; |
233 | void *prot_buf = page_address(bip->bip_vec->bv_page) + | 233 | void *prot_buf = page_address(bip->bip_vec->bv_page) + |
234 | bip->bip_vec->bv_offset; | 234 | bip->bip_vec->bv_offset; |
235 | 235 | ||
@@ -366,7 +366,7 @@ static void bio_integrity_verify_fn(struct work_struct *work) | |||
366 | struct bio *bio = bip->bip_bio; | 366 | struct bio *bio = bip->bip_bio; |
367 | struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); | 367 | struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); |
368 | 368 | ||
369 | bio->bi_error = bio_integrity_process(bio, bi->profile->verify_fn); | 369 | bio->bi_status = bio_integrity_process(bio, bi->profile->verify_fn); |
370 | 370 | ||
371 | /* Restore original bio completion handler */ | 371 | /* Restore original bio completion handler */ |
372 | bio->bi_end_io = bip->bip_end_io; | 372 | bio->bi_end_io = bip->bip_end_io; |
@@ -395,7 +395,7 @@ void bio_integrity_endio(struct bio *bio) | |||
395 | * integrity metadata. Restore original bio end_io handler | 395 | * integrity metadata. Restore original bio end_io handler |
396 | * and run it. | 396 | * and run it. |
397 | */ | 397 | */ |
398 | if (bio->bi_error) { | 398 | if (bio->bi_status) { |
399 | bio->bi_end_io = bip->bip_end_io; | 399 | bio->bi_end_io = bip->bip_end_io; |
400 | bio_endio(bio); | 400 | bio_endio(bio); |
401 | 401 | ||