Whamcloud - gitweb
LU-12477 kernel: remove dev_read_only handling
[fs/lustre-release.git] / lustre / kernel_patches / patches / raid5-mmp-unplug-dev-sles12sp3.patch
1 Index: linux-4.4.59-1/drivers/md/raid5.c
2 ===================================================================
3 --- linux-4.4.59-1.orig/drivers/md/raid5.c
4 +++ linux-4.4.59-1/drivers/md/raid5.c
5 @@ -3041,6 +3041,8 @@ static int add_stripe_bio(struct stripe_
6                 bi->bi_next = *bip;
7         *bip = bi;
8         raid5_inc_bi_active_stripes(bi);
9 +       if ((bi->bi_opf & REQ_SYNC) && !forwrite)
10 +               clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); /* force to read from disk. */
11  
12         if (forwrite) {
13                 /* check if page is covered */
14 @@ -5192,6 +5194,9 @@ static void make_discard_request(struct
15                 md_write_end(mddev);
16                 bio_endio(bi);
17         }
18 +
19 +       if (bi->bi_opf & REQ_SYNC)
20 +               md_wakeup_thread(mddev->thread);
21  }
22  
23  static void raid5_make_request(struct mddev *mddev, struct bio * bi)