I am designing a file system (implemented using FUSE). I am considering enforcing exclusive locks on files while they are being written to (preventing concurrent reads). I understand that Linux is generally fine with allowing concurrent reads and writes, so I'm wondering if there are common applications or classes of applications which would break if they weren't able to read from a file that was being written to.

closed as too broad by Michael Homer, sebasth, Satō Katsura, Kusalananda, GAD3R Sep 17 '17 at 10:54

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Log files. It would be impossible to read some of them if the applications that wrote to them didn't close the file between each write (which some does not do). Oh, and tail -f in general, I suppose. – Kusalananda Sep 16 '17 at 20:42
  • 2
    The mbox mail file, though maildir is another option for mail clients such as mutt, or anything that opens a file with read and write access, or ... – thrig Sep 16 '17 at 21:32
  • Anything databasey. – roaima Sep 16 '17 at 21:43
  • 1
    It’s not clear from the question whether the lock would prevent all concurrent reads, or just concurrent reads from other processes (so databases etc. would typically be OK). I imagined the latter but that might be wrong... – Stephen Kitt Sep 17 '17 at 6:08