[EMAIL PROTECTED] writes:
> Why require two separate fsync() calls when one
> will do?
Because it's faster to only do the one. What is the point of spending
10% of your disk throughput taking steps to prevent something that
never happens? Your machine is more likely to be destroyed in a
terrorist attack than to lose a file on an ext2 filesystem due to a
system crash. Call out the National Guard!
> Further, what is the point if the first fsync() call
> is useless without the second, and vice versa?
Because the ext2 filesystem has the ability to rebuild the file from
the data. That's why I've been running the same filesystem for the
last five years with *NO* lost files. I've outgrown that disk, but I
still keep it mounted. And I've done device driver development on my
system and crashed it a number of times. And my current system
suffers from insufficient cooling, so if I'm playing an MP3 and doing
disk activity at the same time, it crashes. It's gotten a lot better
since I put silicone grease on the heat sink.
Crashing used to scare the bejeezus out of me until I realized that
the bad reputation for losing Unix filesystems in crashes came from
SYS V, not Linux.
--
-russ nelson <[EMAIL PROTECTED]> http://russnelson.com
Crynwr sells support for free software | PGPok | "Ask not what your country
521 Pleasant Valley Rd. | +1 315 268 1925 voice | can force other people to
Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | do for you..." -Perry M.