On Tue, Jul 27, 2010 at 01:42:45PM -0500, James Bottomley wrote: > I hope not ... I hope that if the drive reports write through or no > cache that we don't enable (flush) barriers by default. drivers/scsi/sd.c:sd_revalidate_disk() if (sdkp->WCE) ordered = sdkp->DPOFUA ? QUEUE_ORDERED_DRAIN_FUA : QUEUE_ORDERED_DRAIN_FLUSH; else ordered = QUEUE_ORDERED_DRAIN; blk_queue_ordered(sdkp->disk->queue, ordered); Documentation/block/barrier.txt: QUEUE_ORDERED_DRAIN Requests are ordered by draining the request queue and cache flushing isn't needed. Sequence: drain => barrier > The problem case is NV cache arrays (usually an array with a battery > backed cache). There's no consistency issue since the array will > destage the cache on power fail but it reports a write back cache and we > try to use barriers. This is wrong because we don't need barriers for > consistency and they really damage throughput. The arrays I have access to (various Netapp, IBM and LSI) never report write cache enabled. I've only heard about the above issue from historic tales. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html