fseek() seems to be documented to do an implicit fflush()
As indicated on the general illumos list,
the attached test file demonstrates an anomaly that seeking doesn't
seem to automatically flush buffers in buffered file opened r/w.
This is a crude reproduction of a situation where the latest mercurial has issues with
certain repositories as reported https://bz.mercurial-scm.org/show_bug.cgi?id=4943