|| ||Christoph Hellwig <hch-AT-infradead.org> |
|| ||Jamie Lokier <jamie-AT-shareable.org>, Ulrich Drepper <drepper-AT-redhat.com> |
|| ||adding proper O_SYNC/O_DSYNC, was Re: O_DIRECT and barriers |
|| ||Thu, 27 Aug 2009 13:10:44 -0400|
|| ||linux-fsdevel-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org|
|| ||Article, Thread
On Thu, Aug 27, 2009 at 03:34:59PM +0100, Jamie Lokier wrote:
> Christoph Hellwig wrote:
> > Then again they already don't get what they expect and never did,
> > so if we clear document and communicate the O_SYNC (that is Linux
> > O_SYNC) requirement we might be able to go with this.
> I'm thinking, while we're looking at this, that now is a really good
> time to split up O_SYNC and O_DSYNC.
> We have separate fsync and fdatasync, so it should be quite tidy now.
> Then we can document using O_DSYNC on Linux, which is fine for older
> versions because it has the same value as O_SYNC at the moment.
Technically we could easily make O_SYNC really mean O_SYNC and implement
a seaprate O_DSYNC at the kernel level.
The question is how to handle this at the libc level. Currently glibc
defines O_DSYNC to be O_SYNC. We would need to update glibc to pass
through O_DSYNC for newer kernels and make sure it falls back to O_SYNC
for olders. I'm not sure how feasible this is, but maybe Ulrich has
some better ideas.
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
to post comments)