flush on close

Eno Thereska eno at andrew.cmu.edu
Wed Sep 10 18:24:07 PDT 2003

In FreeBSD 4.4, I am noticing a huge number of calls
to ffs_fsync() (in /sys/ufs/ffs/ffs_vnops.c)
when running a benchmark like Postmark.

ffs_fsync() flushes all dirty buffers with an open file
to disk. Normally this function would be called
either because the application writer explicitly
flushes the file, or if the syncer daemon or buffer daemon
decide it's time for the dirty blocks to go to disk.

Neither of these two options is happening. Files are opened and closed
very frequently though. I have a  suspicion that BSD is using the 
"flush-on-close" semantic.

Could someone confirm or reject this claim?
If confirmed, I am wondering how to get rid of it...


More information about the freebsd-fs mailing list