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-71.18.1.el6-master/drivers/md/raid5.c
7 ===================================================================
8 --- linux-2.6.32-71.18.1.el6-master.orig/drivers/md/raid5.c 2011-02-28 16:57:31.222666050 +0800
9 +++ linux-2.6.32-71.18.1.el6-master/drivers/md/raid5.c 2011-02-28 16:58:27.011983275 +0800
13 bi->bi_phys_segments++;
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. */
16 spin_unlock_irq(&conf->device_lock);
17 spin_unlock(&sh->lock);
20 wait_event(mddev->thread->wqueue,
21 atomic_read(&conf->preread_active_stripes) == 0);
23 + if (bio_rw_flagged(bi, BIO_RW_SYNCIO))
24 + raid5_unplug_device(mddev->queue);