diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ec0f951ae19f..62c965be97e1 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -2476,7 +2476,7 @@ static void raid5_end_read_request(struct bio * bi) | |||
2476 | 2476 | ||
2477 | pr_debug("end_read_request %llu/%d, count: %d, error %d.\n", | 2477 | pr_debug("end_read_request %llu/%d, count: %d, error %d.\n", |
2478 | (unsigned long long)sh->sector, i, atomic_read(&sh->count), | 2478 | (unsigned long long)sh->sector, i, atomic_read(&sh->count), |
2479 | bi->bi_error); | 2479 | bi->bi_status); |
2480 | if (i == disks) { | 2480 | if (i == disks) { |
2481 | bio_reset(bi); | 2481 | bio_reset(bi); |
2482 | BUG(); | 2482 | BUG(); |
@@ -2496,7 +2496,7 @@ static void raid5_end_read_request(struct bio * bi) | |||
2496 | s = sh->sector + rdev->new_data_offset; | 2496 | s = sh->sector + rdev->new_data_offset; |
2497 | else | 2497 | else |
2498 | s = sh->sector + rdev->data_offset; | 2498 | s = sh->sector + rdev->data_offset; |
2499 | if (!bi->bi_error) { | 2499 | if (!bi->bi_status) { |
2500 | set_bit(R5_UPTODATE, &sh->dev[i].flags); | 2500 | set_bit(R5_UPTODATE, &sh->dev[i].flags); |
2501 | if (test_bit(R5_ReadError, &sh->dev[i].flags)) { | 2501 | if (test_bit(R5_ReadError, &sh->dev[i].flags)) { |
2502 | /* Note that this cannot happen on a | 2502 | /* Note that this cannot happen on a |
@@ -2613,7 +2613,7 @@ static void raid5_end_write_request(struct bio *bi) | |||
2613 | } | 2613 | } |
2614 | pr_debug("end_write_request %llu/%d, count %d, error: %d.\n", | 2614 | pr_debug("end_write_request %llu/%d, count %d, error: %d.\n", |
2615 | (unsigned long long)sh->sector, i, atomic_read(&sh->count), | 2615 | (unsigned long long)sh->sector, i, atomic_read(&sh->count), |
2616 | bi->bi_error); | 2616 | bi->bi_status); |
2617 | if (i == disks) { | 2617 | if (i == disks) { |
2618 | bio_reset(bi); | 2618 | bio_reset(bi); |
2619 | BUG(); | 2619 | BUG(); |
@@ -2621,14 +2621,14 @@ static void raid5_end_write_request(struct bio *bi) | |||
2621 | } | 2621 | } |
2622 | 2622 | ||
2623 | if (replacement) { | 2623 | if (replacement) { |
2624 | if (bi->bi_error) | 2624 | if (bi->bi_status) |
2625 | md_error(conf->mddev, rdev); | 2625 | md_error(conf->mddev, rdev); |
2626 | else if (is_badblock(rdev, sh->sector, | 2626 | else if (is_badblock(rdev, sh->sector, |
2627 | STRIPE_SECTORS, | 2627 | STRIPE_SECTORS, |
2628 | &first_bad, &bad_sectors)) | 2628 | &first_bad, &bad_sectors)) |
2629 | set_bit(R5_MadeGoodRepl, &sh->dev[i].flags); | 2629 | set_bit(R5_MadeGoodRepl, &sh->dev[i].flags); |
2630 | } else { | 2630 | } else { |
2631 | if (bi->bi_error) { | 2631 | if (bi->bi_status) { |
2632 | set_bit(STRIPE_DEGRADED, &sh->state); | 2632 | set_bit(STRIPE_DEGRADED, &sh->state); |
2633 | set_bit(WriteErrorSeen, &rdev->flags); | 2633 | set_bit(WriteErrorSeen, &rdev->flags); |
2634 | set_bit(R5_WriteError, &sh->dev[i].flags); | 2634 | set_bit(R5_WriteError, &sh->dev[i].flags); |
@@ -2649,7 +2649,7 @@ static void raid5_end_write_request(struct bio *bi) | |||
2649 | } | 2649 | } |
2650 | rdev_dec_pending(rdev, conf->mddev); | 2650 | rdev_dec_pending(rdev, conf->mddev); |
2651 | 2651 | ||
2652 | if (sh->batch_head && bi->bi_error && !replacement) | 2652 | if (sh->batch_head && bi->bi_status && !replacement) |
2653 | set_bit(STRIPE_BATCH_ERR, &sh->batch_head->state); | 2653 | set_bit(STRIPE_BATCH_ERR, &sh->batch_head->state); |
2654 | 2654 | ||
2655 | bio_reset(bi); | 2655 | bio_reset(bi); |
@@ -3381,7 +3381,7 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh, | |||
3381 | sh->dev[i].sector + STRIPE_SECTORS) { | 3381 | sh->dev[i].sector + STRIPE_SECTORS) { |
3382 | struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); | 3382 | struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); |
3383 | 3383 | ||
3384 | bi->bi_error = -EIO; | 3384 | bi->bi_status = BLK_STS_IOERR; |
3385 | md_write_end(conf->mddev); | 3385 | md_write_end(conf->mddev); |
3386 | bio_endio(bi); | 3386 | bio_endio(bi); |
3387 | bi = nextbi; | 3387 | bi = nextbi; |
@@ -3403,7 +3403,7 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh, | |||
3403 | sh->dev[i].sector + STRIPE_SECTORS) { | 3403 | sh->dev[i].sector + STRIPE_SECTORS) { |
3404 | struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector); | 3404 | struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector); |
3405 | 3405 | ||
3406 | bi->bi_error = -EIO; | 3406 | bi->bi_status = BLK_STS_IOERR; |
3407 | md_write_end(conf->mddev); | 3407 | md_write_end(conf->mddev); |
3408 | bio_endio(bi); | 3408 | bio_endio(bi); |
3409 | bi = bi2; | 3409 | bi = bi2; |
@@ -3429,7 +3429,7 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh, | |||
3429 | struct bio *nextbi = | 3429 | struct bio *nextbi = |
3430 | r5_next_bio(bi, sh->dev[i].sector); | 3430 | r5_next_bio(bi, sh->dev[i].sector); |
3431 | 3431 | ||
3432 | bi->bi_error = -EIO; | 3432 | bi->bi_status = BLK_STS_IOERR; |
3433 | bio_endio(bi); | 3433 | bio_endio(bi); |
3434 | bi = nextbi; | 3434 | bi = nextbi; |
3435 | } | 3435 | } |
@@ -5154,7 +5154,7 @@ static void raid5_align_endio(struct bio *bi) | |||
5154 | struct mddev *mddev; | 5154 | struct mddev *mddev; |
5155 | struct r5conf *conf; | 5155 | struct r5conf *conf; |
5156 | struct md_rdev *rdev; | 5156 | struct md_rdev *rdev; |
5157 | int error = bi->bi_error; | 5157 | blk_status_t error = bi->bi_status; |
5158 | 5158 | ||
5159 | bio_put(bi); | 5159 | bio_put(bi); |
5160 | 5160 | ||
@@ -5731,7 +5731,7 @@ static void raid5_make_request(struct mddev *mddev, struct bio * bi) | |||
5731 | release_stripe_plug(mddev, sh); | 5731 | release_stripe_plug(mddev, sh); |
5732 | } else { | 5732 | } else { |
5733 | /* cannot get stripe for read-ahead, just give-up */ | 5733 | /* cannot get stripe for read-ahead, just give-up */ |
5734 | bi->bi_error = -EIO; | 5734 | bi->bi_status = BLK_STS_IOERR; |
5735 | break; | 5735 | break; |
5736 | } | 5736 | } |
5737 | } | 5737 | } |
@@ -6943,7 +6943,7 @@ static struct r5conf *setup_conf(struct mddev *mddev) | |||
6943 | goto abort; | 6943 | goto abort; |
6944 | } | 6944 | } |
6945 | 6945 | ||
6946 | conf->bio_split = bioset_create(BIO_POOL_SIZE, 0); | 6946 | conf->bio_split = bioset_create(BIO_POOL_SIZE, 0, 0); |
6947 | if (!conf->bio_split) | 6947 | if (!conf->bio_split) |
6948 | goto abort; | 6948 | goto abort; |
6949 | conf->mddev = mddev; | 6949 | conf->mddev = mddev; |