title: How to synchronize file I/O of many independent applications on Linux?
body: <p>I'm writing a software for Linux which would actively work with user's files in background concurrently with other applications that I don't control. I want to make my background application to not overwrite changes made by other applications. But there is a problem - unlike Windows Linux doesn't provide mandatory file locking capability which creates possibility of ruining user's work due to race conditions which I'd like to avoid.  </p>
  
  <p>So I wonder - are there file-systems available on Linux that provide some kind of synchronization mechanisms such as <a href="https://en.wikipedia.org/wiki/Compare-and-swap" rel="noreferrer">compare-and-swap</a> operation, <a href="https://en.wikipedia.org/wiki/Database_transaction" rel="noreferrer">all-or-nothing transactions</a>, mandatory file locking (like in Windows)?</p>