aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index aeeb8d6854e2..0fc2748aaf95 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3381,9 +3381,8 @@ 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_status = BLK_STS_IOERR;
3385 md_write_end(conf->mddev); 3384 md_write_end(conf->mddev);
3386 bio_endio(bi); 3385 bio_io_error(bi);
3387 bi = nextbi; 3386 bi = nextbi;
3388 } 3387 }
3389 if (bitmap_end) 3388 if (bitmap_end)
@@ -3403,9 +3402,8 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh,
3403 sh->dev[i].sector + STRIPE_SECTORS) { 3402 sh->dev[i].sector + STRIPE_SECTORS) {
3404 struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector); 3403 struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector);
3405 3404
3406 bi->bi_status = BLK_STS_IOERR;
3407 md_write_end(conf->mddev); 3405 md_write_end(conf->mddev);
3408 bio_endio(bi); 3406 bio_io_error(bi);
3409 bi = bi2; 3407 bi = bi2;
3410 } 3408 }
3411 3409
@@ -3429,8 +3427,7 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh,
3429 struct bio *nextbi = 3427 struct bio *nextbi =
3430 r5_next_bio(bi, sh->dev[i].sector); 3428 r5_next_bio(bi, sh->dev[i].sector);
3431 3429
3432 bi->bi_status = BLK_STS_IOERR; 3430 bio_io_error(bi);
3433 bio_endio(bi);
3434 bi = nextbi; 3431 bi = nextbi;
3435 } 3432 }
3436 } 3433 }
@@ -6237,6 +6234,8 @@ static void raid5_do_work(struct work_struct *work)
6237 pr_debug("%d stripes handled\n", handled); 6234 pr_debug("%d stripes handled\n", handled);
6238 6235
6239 spin_unlock_irq(&conf->device_lock); 6236 spin_unlock_irq(&conf->device_lock);
6237
6238 async_tx_issue_pending_all();
6240 blk_finish_plug(&plug); 6239 blk_finish_plug(&plug);
6241 6240
6242 pr_debug("--- raid5worker inactive\n"); 6241 pr_debug("--- raid5worker inactive\n");