Re: [Lsf] Preliminary Agenda and Activities for LSF

Joel Becker
2011-04-01T21:43:18Z

On Fri, Apr 01, 2011 at 11:19:07AM -0400, Ted Ts'o wrote:
> The closest place that we have to any official documentation about
> O_DIRECT semantics is the open(2) man page in the Linux manpages, and
> it doesn't say anything about this. It does give a recommendation
> against not mixing buffered and O_DIRECT accesses to the same file,
> but it does promise that things will work in that case. (Even if it
> does, do we really want to make the promise that it will always work?)

No, we do not. Some OSes will silently turn buffered I/O into
direct I/O if another file already has it opened O_DIRECT. Some OSes
will fail the write, or the open, or both, if it doesn't match the mode
of an existing fd. Some just leave O_DIRECT and buffered access
inconsistent.
I think that Linux should strive to make the mixed
buffered/direct case work; it's the nicest thing we can do. But we
should not promise it.

Joel

--

Life's Little Instruction Book #24

"Drink champagne for no reason at all."

http://www.jlbec.org/
jlbec@evilplan.org