Re: O_DIRECT fails in some kernel and FS

From: Stephen Lord (lord@sgi.com)
Date: Sun Feb 03 2002 - 10:05:04 EST


Chris Wedgwood wrote:

>On Sun, Feb 03, 2002 at 07:40:57AM -0600, Stephen Lord wrote:
>
> What we had were two flags, one which indicated use direct I/O,
> and another which indicated return an error to user space rather
> than go through buffers. So lie to me and make it work, or don't
> lie to me options I suppose.
>
>This seems way to complex in the case of reiserfs... you're only going
>to see tails for small files (typically under 16k) and for the tail
>part when less than a block.
>
>Since O_DIRECT much be blocked sized and block aligned, I'm not sure
>if this is a problem at present...
>

I agree is is not a big issue in this case - my interpretation of tails
was the end
of any file could be packed, but if it is only small files.....

>
>
> I suspect the reason XFS never did small files in the inode was
> because of the problems with implementing mmap and O_DIRECT.
>
>How does IRIX deal with O_DIRECT read/writes of a mapped area?
>Invalidate them or just accept things as being incoherent?
>

They are invalidated at the start of the I/O, but page faults are not
blocked
out for the duration of the I/O, so the coherency is weak. However, if an
application is doing a combination of mmapped and direct I/O to a file
at the same time, then it should generally have some form of user space
synchronization anyway. For an application doing its own synchronization
of different I/Os they are coherent.

>
>
>
> --cw
>

Steve

-
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 : Thu Feb 07 2002 - 21:00:28 EST