Chris's Wiki :: blog/unix/WhyFileSyncStandardNeeded Commentshttps://utcc.utoronto.ca/~cks/space/blog/unix/WhyFileSyncStandardNeeded?atomcommentsDWiki2016-04-17T15:10:22ZRecent comments in Chris's Wiki :: blog/unix/WhyFileSyncStandardNeeded.By Anon on /blog/unix/WhyFileSyncStandardNeededtag:CSpace:blog/unix/WhyFileSyncStandardNeeded:9f1a9cb09662abf0f234fb1366547c5ce84c7dd9Anon<div class="wikitext"><p>Whether you need to sync on the directory depends on the filesystem: <a href="http://danluu.com/file-consistency/#filesystem-semantics">http://danluu.com/file-consistency/#filesystem-semantics</a> .</p>
<p>To an extent it's too late - we've already got lots of filesystems which require the fsync-fusion-ha dance and you never know when you'll encounter one. Even if a new set of calls turns up all it takes is for you to access something over a network file share and you might have to fallback to doing the dance to keep your data safe.</p>
<p>It's worth noting you also can't make things weaker than what the dance requires and still be POSIX compliant. However, it's worth noting that a lot of new distributed filesystem-like things popping up aren't trying for POSIX compliance so there's a wrinkle there...</p>
<p>Assuming POSIX and and a disk which plays ball it <em>is</em> possible to test if you got things by analysing the syscalls being made relative to what you need to happen but it's not easy (see the ALICE discussion in <a href="https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-pillai.pdf">https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-pillai.pdf</a> ).</p>
<p>The LWN comments discussing the Dan Luu article cover some of your wishlist items: <a href="https://lwn.net/Articles/667788/">https://lwn.net/Articles/667788/</a> .</p>
<p>I would say my original point is that folks should use an up-to-date SQLite if they want someone else to take care of the problem today (as opposed to saying "people can just look it up")...</p>
</div>2016-04-17T15:10:22Z