Messages in this thread |  | | | Date | Mon, 04 Feb 2002 10:13:37 -0500 | | From | Jeff Garzik <> | | Subject | Re: O_DIRECT fails in some kernel and FS |
| |
Andi Kleen wrote: > > Jeff Garzik <garzik@havoc.gtf.org> writes: > > > On Sat, Feb 02, 2002 at 02:16:41PM -0600, Stephen Lord wrote: > > > Can't you fall back to buffered I/O for the tail? OK it complicates the > > > code, probably a lot, but it keeps things sane from the user's point of > > > view. > > > > For O_DIRECT, IMHO you should fail not fallback. You're simply lying > > to the underlying program otherwise. > > It's just impossible to write a tail which is smaller than a disk block > without another buffer.
I argue, for reiserfs:
For O_DIRECT writes, the preferred behavior is to write disk blocks obtained through the normal methods (get_block, etc.), and fully support inodes for which file tails do not exist.
For O_DIRECT reads, if the data is determined to be in a file tail, ->direct_IO should either (a) fail or (b) dump the file tail to a normal disk block before performing ->direct_IO.
-- Jeff Garzik | "I went through my candy like hot oatmeal Building 1024 | through an internally-buttered weasel." MandrakeSoft | - goats.com - 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/
|  |