PATCH: Forcible delaying of UFS (soft)updates

David Schultz das at FreeBSD.org
Fri Apr 18 17:36:06 PDT 2003


On Fri, Apr 18, 2003, Fred Clift wrote:
> There have been many objections about various databases not getting
> updates, qmail/sendmail loosing mail, vi removing/overwirting a file, etc,
> but aparently these are not the cases for which this patch was designed.
> If a person cared about these possiblities, he wouldn't turn this
> functionality on.
> 
> If on the other hand, a person were stuck at the doctor's office waiting
> room, with low battery, playing nethack, then perhaps this patch is just
> what you want.

If you're in the doctor's office writing a long letter, and
following a crash you find that not only the latest changes but
the *entire* *file* just vanished, you might not be such a happy
camper.  If you leave fsync() alone, your computer will do exactly
what you want it to do.  It will guarantee that *some* version of
the file is on disk, and when you tell your editor to save, it
will guarantee that the *latest* version is on disk.  So if you
want the disk to stay in power save mode, you just don't ask your
editor to write it to disk.

If you're playing nethack, on the other hand, you won't be
fsyncing anyway because nethack doesn't have state that's vitally
important.


More information about the freebsd-fs mailing list