Index: linux-4.4.59-1/drivers/md/raid5.c =================================================================== --- linux-4.4.59-1.orig/drivers/md/raid5.c +++ linux-4.4.59-1/drivers/md/raid5.c @@ -3041,6 +3041,8 @@ static int add_stripe_bio(struct stripe_ bi->bi_next = *bip; *bip = bi; raid5_inc_bi_active_stripes(bi); + if ((bi->bi_opf & REQ_SYNC) && !forwrite) + clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); /* force to read from disk. */ if (forwrite) { /* check if page is covered */ @@ -5192,6 +5194,9 @@ static void make_discard_request(struct md_write_end(mddev); bio_endio(bi); } + + if (bi->bi_opf & REQ_SYNC) + md_wakeup_thread(mddev->thread); } static void raid5_make_request(struct mddev *mddev, struct bio * bi)