Index: linux-2.6.18-128.1.6/drivers/md/raid5.c =================================================================== --- linux-2.6.18-128.1.6.orig/drivers/md/raid5.c 2009-06-02 23:24:55.000000000 -0600 +++ linux-2.6.18-128.1.6/drivers/md/raid5.c 2009-06-02 23:27:21.000000000 -0600 @@ -1456,6 +1456,8 @@ bi->bi_next = *bip; *bip = bi; bi->bi_phys_segments ++; + if (bio_sync(bi) && !forwrite) + clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); /* force to read from disk. */ spin_unlock_irq(&conf->device_lock); spin_unlock(&sh->lock); @@ -3012,6 +3014,8 @@ bi->bi_size = 0; bi->bi_end_io(bi, bytes, 0); } + if (bio_sync(bi)) + raid5_unplug_device(q); return 0; }