Whamcloud - gitweb
LU-14075 kernel: kernel update RHEL8.2 [4.18.0-193.28.1.el8_2]
[fs/lustre-release.git] / lustre / kernel_patches / patches / raid5-mmp-unplug-dev-rhel7.6.patch
1 Index: linux-3.10.0-957.el7.x86_64/drivers/md/raid5.c
2 ===================================================================
3 --- linux-3.10.0-957.el7.x86_64.orig/drivers/md/raid5.c
4 +++ linux-3.10.0-957.el7.x86_64/drivers/md/raid5.c
5 @@ -3266,6 +3266,8 @@ static int add_stripe_bio(struct stripe_
6         *bip = bi;
7         bio_inc_remaining(bi);
8         md_write_inc(conf->mddev, bi);
9 +       if ((bi->bi_rw & 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 @@ -5753,6 +5755,10 @@ static bool raid5_make_request(struct md
15         if (rw == WRITE)
16                 md_write_end(mddev);
17         bio_endio(bi, 0);
18 +
19 +       if (bi->bi_rw & REQ_SYNC)
20 +               md_wakeup_thread(mddev->thread);
21 +
22         return true;
23  }
24