lkml.org 
[lkml]   [2006]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: O_DIRECT, ext3fs, kernel 2.4.32... again
On Wed, May 03, 2006 at 07:27:52AM +0200, DervishD wrote:
> ...
> Are the differences too large?

Yep.

> I know that this change would be intrusive and probably large,
> but IMHO is a quite important bug, because it prevents apps to
> selectively disable O_DIRECT (the flag is accepted by open(), so
> there's no reason the app should bother about which caused the
> read()/write() failures. In fact, is very difficult to know that
> those failures are caused by partial/buggy support of O_DIRECT flag).

You could open for direct, do a direct read, and see if it fails.
If it fails, clear O_DIRECT on the fd via fcntl(F_SETFL) then do
regular buffered IO instead... a bit hacky, but should work fine
I think.

cheers.

--
Nathan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-03 08:38    [from the cache]
©2003-2011 Jasper Spaans