Whamcloud - gitweb
LU-10897 kernel: kernel upgrade RHEL7.5 [3.10.0-862.2.3.el7]
[fs/lustre-release.git] / lustre / kernel_patches / patches / raid5-mmp-unplug-dev-3.9.patch
1 Index: linux-3.10.0-799.el7.x86_64/drivers/md/raid5.c
2 ===================================================================
3 --- linux-3.10.0-799.el7.x86_64.orig/drivers/md/raid5.c
4 +++ linux-3.10.0-799.el7.x86_64/drivers/md/raid5.c
5 @@ -3096,7 +3096,9 @@ static int add_stripe_bio(struct stripe_
6                 bi->bi_next = *bip;
7         *bip = bi;
8         raid5_inc_bi_active_stripes(bi);
9         md_write_inc(conf->mddev, bi);
10 +       if ((bi->bi_rw & REQ_SYNC) && !forwrite)
11 +               clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); /* force to read from disk. */
12  
13         if (forwrite) {
14                 /* check if page is covered */
15 @@ -5548,6 +5550,9 @@ static void raid5_make_request(struct md
16                                          bi, 0);
17                 bio_endio(bi, 0);
18         }
19 +
20 +       if (bi->bi_rw & REQ_SYNC)
21 +               md_wakeup_thread(mddev->thread);
22  }
23  
24  static sector_t raid5_size(struct mddev *mddev, sector_t sectors, int raid_disks);