Messages in this thread | | | From | "Stephen C. Tweedie" <> | Date | Fri, 7 Jan 2000 17:27:16 +0000 (GMT) | Subject | Re: O_SYNC: How well do we support it? |
| |
Hi,
On Fri, 07 Jan 2000 09:47:54 -0500, Peter Rival <frival@zk3.dec.com> said:
> Yup, I was only looking at the O_SYNC code, as that's the only sync > work that AIM does. I'll take a peek at the fdatasync() stuff as > well. BTW, I believe that the O_SYNC flag also requires that (for > strict POSIX compliance) we write out the updated metadata (mtime, > etc.) synchronously as well as the data. However, I also know that > some operating systems don't do this unless specifically requested by > the user due to the additional performance overhead.
All updated metadata is always by O_SYNC/fsync, with the _only_ exception of the timestamps. Strictly, even timestamp flush is required by POSIX, but it's just too slow in most cases. In POSIX, O_DATASYNC and fdatasync() are explicitly allowed to omit the timestamp updates if that is the only dirty metadata involved.
> Should we add in the capacity to perform synchronous metadata updating > as well?
We have to, there's no choice about metadata in general. timestamps are a special case where it is legitimate to consider relaxing the flush rule for the fdatasync variants, or even for fsync if specified by a sysctl parameter (which is what at least one other Unix does).
--Stephen
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |