diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-28 15:24:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-28 15:24:21 -0400 |
commit | 9583f1c99fe5a11b3f294ac8093e93f008bea29e (patch) | |
tree | 21a9b44d5e3b4e210559dd94c5e8b55c4d97c105 /drivers/md/raid5.c | |
parent | 1731a47444e7bf66d5cf9415bbd6ac5e3903d719 (diff) | |
parent | ed9b66d21866ae3bf16557406258ebe6c00a9a84 (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
Pull MD fixes from Shaohua Li:
"This fixes several bugs, three of them are marked for stable:
- an initialization issue fixed by Ming
- a bio clone race issue fixed by me
- an async tx flush issue fixed by Ofer
- other cleanups"
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
MD: fix warnning for UP case
md/raid5: add thread_group worker async_tx_issue_pending_all
md: simplify code with bio_io_error
md/raid1: fix writebehind bio clone
md: raid1-10: move raid1/raid10 common code into raid1-10.c
md: raid1/raid10: initialize bvec table via bio_add_page()
md: remove 'idx' from 'struct resync_pages'
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 11 |
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"); |