1 Force MD devices to pass SYNC reads directly to the disk
2 instead of handling from cache. This is needed for MMP
3 on MD RAID devices, and in theory could be accepted in
4 the upstream kernel. Not needed for DMU.
6 Index: linux-2.6.32-131.0.15.el6.x86_64/drivers/md/raid5.c
7 ===================================================================
8 --- linux-2.6.32-131.0.15.el6.x86_64.orig/drivers/md/raid5.c 2011-05-10 21:38:35.000000000 +0300
9 +++ linux-2.6.32-131.0.15.el6.x86_64/drivers/md/raid5.c 2011-05-20 08:26:04.000000000 +0300
10 @@ -2177,6 +2177,8 @@ static int add_stripe_bio(struct stripe_
13 raid5_inc_bi_active_stripes(bi);
14 + if (bio_rw_flagged(bi, BIO_RW_SYNCIO) && !forwrite)
15 + clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); /* force to read from disk. */
18 /* check if page is covered */
19 @@ -4132,6 +4134,9 @@ static int make_request(mddev_t *mddev,
23 + if (bio_rw_flagged(bi, BIO_RW_SYNCIO))
24 + md_raid5_unplug_device(conf);