Well, the barriers happen like so (even if we actually only do one barrier in
submit_bh, it turns into two)
write log blocks
flush #1
write commit block
flush #2
write metadata blocks
I'd agree with Ted, there's a fairly small chance of things get reordered
around flush #1. flush #2 is likely to have lots of reordering though. It
should be easy to create situations where the metadata for a transaction is
written before the log blocks ever see the disk.
EMC did a ton of automated testing around this when Jens and I did the initial
barrier implementations, and they were able to trigger corruptions in fsync
heavy workloads with randomized power offs. I'll dig up the workload they
used.
-chris
--