O_SYNC and filesystem updating

guy at gorodish.UUCP guy at gorodish.UUCP
Sun Feb 15 08:15:04 AEST 1987


>It is not sensible to ensure that *every* write be syncronously updated
>to disk.

The O_SYNC flag is controllable by "fcntl".  You can turn it on when
opening the file (or not - I hope that writes done when *creating* a
file are done so that there won't be any serious file system
inconsistencies *regardless* of whether O_SYNC is set), turn it off
for most writes, and turn it back on when you are about to do a write
that must be flushed to disk at that time.  There's no need to open
two file descriptors.



More information about the Comp.unix.wizards mailing list