Whamcloud - gitweb
LU-1812 kernel: 3.7/FC18 server patches
[fs/lustre-release.git] / lustre / kernel_patches / patches / raid5-mmp-unplug-dev-3.7.patch
1 --- linux-3.6.0-0.3.fc.el6.x86_64/drivers/md/raid5.c.orig       2012-11-21 08:51:15.312175089 -0500
2 +++ linux-3.6.0-0.3.fc.el6.x86_64/drivers/md/raid5.c            2012-11-21 09:02:38.415174560 -0500
3 @@ -2394,6 +2394,8 @@ static int add_stripe_bio(struct stripe_
4                 bi->bi_next = *bip;
5         *bip = bi;
6         raid5_inc_bi_active_stripes(bi);
7 +       if ((bi->bi_rw & REQ_SYNC) && !forwrite)
8 +               clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); /* force to read from disk. */
9
10         if (forwrite) {
11                 /* check if page is covered */
12 @@ -4217,6 +4222,9 @@ static void make_request(struct mddev *m
13
14                 bio_endio(bi, 0);
15         }
16 +
17 +       if (bi->bi_rw & REQ_SYNC)
18 +               md_wakeup_thread(mddev->thread);
19  }
20
21  static sector_t raid5_size(struct mddev *mddev, sector_t sectors, int raid_disks);