On Wed, Oct 29, 2008 at 05:51:09PM -0400, Thor Lancelot Simon wrote: > I'd like to propose a new buffer flag, B_ARRIER. This flag would be > defined to cause a write barrier at whatever I/O request carries it. > > In practice, this would mean using an ordered tag with SCSI disks > (because ordered tags do not complete until all prior simple-tagged > commands complete) and causing a cache flush for IDE disks (at least > until we get tagged queueing support for them). I don't know how FUA > works for IDE disks but it's been suggested to me that FUA commands > cause all pending I/O to finish before they do -- that would suffice > too. The problem is that this won't help. Ordered tags will relate the sequencing of commands relative to each other. The journal, however, doesn't care about the relative ordering of operations, it wants to know when the writes to the journal have hit stable storage. The key problem is that, on SCSI disks with the write cache enabled, a write command can complete by writing to the cache. The journal needs a way to turn the cache off for one operation. That's what FUA is. That's what we need. I don't mind B_BARRIER, but it won't help WAPBL. Take care, Bill
Attachment:
pgpHnDo_dOl3Y.pgp
Description: PGP signature