Thread (8 messages) 8 messages, 5 authors, 2016-04-27

Re: O_DIRECT as a hint, was: Re: [PATCH] ext4: refuse O_DIRECT opens for mode where DIO doesn't work

flat view

From: Theodore Ts'o <hidden>
Date: 2016-04-27 02:16:54
Also in: linux-ext4, linux-fsdevel

On Tue, Apr 26, 2016 at 01:14:51AM -0700, Christoph Hellwig wrote:
I've been doing an audit of our direct I/O implementations, and most
of them does some form of transparent fallback, including some that
only pretend to support O_DIRECT, but do anything special for it at all,
while at the same time we go through greast efforts to check a file
system actualy supports direct I/O, leading to nasty no-op ->direct_IO
implementations as we even got that abstraction wrong.

At this point I wonder if we should simply treat O_DIRECT as a hint
and always allow it, and just let the file system optimize for it
(skip buffering, require alignment, relaxed Posix atomicy requirements)
if it is set.
That's fine with me, but there ought to be some way for a program to
query whether a particular file / file system is one where DIO is
supported, and if so, what the alignment requirements would be.  That
way applications who care can get the information they need (and we
can use it for xfstests's _require_odirect :-).

						- Ted
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help