:According to kirk FSYNC() does the right thing and 'sync()' doesn't.
:
Lets see... well, it will sync the file state, but it will not
necessarily sync the related directory entry (as far as I can tell).
So if you take a case such as sendmail creating a queue file, fsync
will succeed and the file itself will be consistent, but the directory
entry for the file may not yet have been created and synced. A crash
at that point would result in a missing file.
Kirk would know for sure.
-
At some point we need to extend the kernel VOP_FSYNC API to include
a file offset/range so NFS can conditionally fsync part of a file and
know for sure that it's data and metadata have gone to the platter.
And its directory entry as well in the case of a newly created file.
-Matt
Matthew Dillon
<[EMAIL PROTECTED]>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message