PATCH: Forcible delaying of UFS (soft)updates

Kirk McKusick mckusick at mckusick.com
Sun Apr 13 10:55:10 PDT 2003


I am of the opinion that fsync should work. Applications like
`vi' use fsync to ensure that the write of the new file is on
stable store before removing the old copy. If that semantic
is broken, it would be possible to have neither the old nor
the new copy of your file after a crash. I do not consider
that acceptable behavior. Further, the fsync call is used
to ensure that link/unlink/rename have been completed. So
more than just fsync is being affected by your change. Lastly,
I often write out a file when I am about to suspend my laptop
(for low battery or other reasons) and I really want that file
on the disk now. I do not want to have to wait for it to decide
at some future time to spin up the disk.

I suggest that you make the disabling of fsync a separate
option from the rest of your change so that people can
decide for themselves whether they want partial savings
with working semantics, or greater savings with broken
semantics. I am also intrigued by the changes proposed by
Ian Dowse that may better accomplish the same goals with
less breakage.

	Kirk McKusick


More information about the freebsd-fs mailing list