Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!ames!oliveb!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.unix.wizards Subject: Re: O_SYNC and filesystem updating Message-ID: <13321@sun.uucp> Date: Sat, 14-Feb-87 17:15:04 EST Article-I.D.: sun.13321 Posted: Sat Feb 14 17:15:04 1987 Date-Received: Sun, 15-Feb-87 07:38:41 EST References: <11470@gatech.EDU> <12946@sun.uucp> <413@yabbie.rmit.oz> Sender: news@sun.uucp Reply-To: guy@sun.UUCP (Guy Harris) Organization: Sun Microsystems, Mountain View Lines: 10 Keywords: O_SYNC, System V, reliability? What reliability? Summary: O_SYNC is controllable with "fcntl" as well as "open" >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.