mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
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>
This commit is contained in:
parent
fc17b6534e
commit
4e4cbee93d
106 changed files with 625 additions and 603 deletions
|
@ -294,7 +294,7 @@ static void dio_aio_complete_work(struct work_struct *work)
|
|||
dio_complete(dio, 0, true);
|
||||
}
|
||||
|
||||
static int dio_bio_complete(struct dio *dio, struct bio *bio);
|
||||
static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio);
|
||||
|
||||
/*
|
||||
* Asynchronous IO callback.
|
||||
|
@ -473,11 +473,11 @@ static struct bio *dio_await_one(struct dio *dio)
|
|||
/*
|
||||
* Process one completed BIO. No locks are held.
|
||||
*/
|
||||
static int dio_bio_complete(struct dio *dio, struct bio *bio)
|
||||
static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio)
|
||||
{
|
||||
struct bio_vec *bvec;
|
||||
unsigned i;
|
||||
int err = bio->bi_error;
|
||||
blk_status_t err = bio->bi_status;
|
||||
|
||||
if (err)
|
||||
dio->io_error = -EIO;
|
||||
|
@ -536,7 +536,7 @@ static inline int dio_bio_reap(struct dio *dio, struct dio_submit *sdio)
|
|||
bio = dio->bio_list;
|
||||
dio->bio_list = bio->bi_private;
|
||||
spin_unlock_irqrestore(&dio->bio_lock, flags);
|
||||
ret2 = dio_bio_complete(dio, bio);
|
||||
ret2 = blk_status_to_errno(dio_bio_complete(dio, bio));
|
||||
if (ret == 0)
|
||||
ret = ret2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue