Re: O_DIRECT read and holes in 2.5.26

From: Andrew Morton (akpm@zip.com.au)
Date: Sun Jul 21 2002 - 21:26:31 EST


Stephen Lord wrote:
>
> Andrew,
>
> Did you realize that the new O_DIRECT code in 2.5 cannot read over holes
> in a file.

Well that was intentional, although I confess to not having
put a lot of thought into the decision. The user wants
O_DIRECT and we cannot do that. The CPU has to clear the
memory by hand. Bad.

Obviously it's easy enough to put in the code to clear the
memory out. Do you think that should be done?
  
> The old code filled the user buffer with zeros, the new code
> returned EINVAL if the getblock function returns an unmapped buffer.
> With this exception, XFS does work with the new code - with more cpu
> overhead than before due to the once per page getblock calls.

OK, thanks. Presumably XFS has a fairly heavyweight get_block()?

I'd be interested in seeing just how expensive that O_DIRECT
I/O is, and whether we need to get down and implement a
many-block get_block() interface. Any numbers/profiles
available?

-
-
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/



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:37 EST