Re: [PATCH 1/7] block: Add block_flush_device()

Mark Lord
2009-03-31T19:25:43Z

Ric Wheeler wrote:
..
> As Mark pointed out, most S-ATA/SAS drives will flush the write cache
> when they see a bus reset so even without barriers, the cache will be
> preserved (or flushed) after a reboot or panic. Power outages are the
> problem barriers/flushes are meant to help with.
..

I still see barriers as a separate issue from flushes.
Flushes are there for power failures and hot-removable devices.

Barriers are there for that, but also for better odds of data integrity
in the even of a filesystem or kernel crash.

Even if I don't want the kernel needlessly flushing my battery-backed
write caches, I still do want the barrier ordering that improves the
odds of filesystem consistency in the event of a kernel crash.

Cheers