LWN.net Logo

Where the the correctness go?

Where the the correctness go?

Posted Mar 15, 2009 8:14 UTC (Sun) by Pc5Y9sbv (guest, #41328)
In reply to: Where the the correctness go? by nix
Parent article: Ts'o: Delayed allocation and the zero-length file problem

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.


(Log in to post comments)

Write barriers

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().

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds