Why are write-barriers so difficult here? Is there something special about the filesystem domain, or is it a lack of cross-pollination of ideas between different systems/CS communities?
I know that contemporary disk controller protocols support write-barriers in their command streams. They were intended to make this sort of thing easy. You don't have to micro-manage the requests all the way to the platter, but just decorate them with the correct ordering relations when you issue the commands.
Posted Mar 17, 2009 1:43 UTC (Tue) by xoddam (subscriber, #2322)
[Link]
In the context of a journalling filesystem the application-level guarantee doesn't really need to be implemented with an explicit write barrier at the disk level. Write barriers may or may not be used to maintain the journal; journals can work (perhaps somewhat less effectively) without them.
Because the journal is already able to provide the guarantee of filesystem metadata consistency, it can be used in the same way to ensure an effective ordering between write() and rename().