[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <459E62FF.4010404@aitel.hist.no>
Date: Fri, 05 Jan 2007 15:38:55 +0100
From: Helge Hafting <helge.hafting@...el.hist.no>
To: Hugh Dickins <hugh@...itas.com>
CC: Hua Zhong <hzhong@...il.com>,
Christoph Hellwig <hch@...radead.com>,
'Bill Davidsen' <davidsen@....com>,
'Linux-kernel' <linux-kernel@...r.kernel.org>
Subject: Re: open(O_DIRECT) on a tmpfs?
Hugh Dickins wrote:
> On Thu, 4 Jan 2007, Hua Zhong wrote:
>
>> So I'd argue that it makes more sense to support O_DIRECT
>> on tmpfs as the memory IS the backing store.
>>
>
> A few more voices in favour and I'll be persuaded. Perhaps I'm
> out of date: when O_DIRECT came in, just a few filesystems supported
> it, and it was perfectly normal for open O_DIRECT to be failed; but
> I wouldn't want tmpfs to stand out now as a lone obstacle.
>
Having tmpfs suppoting O_DIRECT makes sense.
For me, O_DIRECT says "write directly to the device
and don't return till its done." Which is what tmpfs
always do anyway.
The support could probably be as simple as ignoring
the flag entirely, mask it away in open() or something like that.
Arguments about "O_DIRECT says don't cache it and tmpfs
_is_ the cache" don't work. O_DIRECT says "write straight
to the device" and the device just happens to be pagecache
memory. The tmpfs file sure isn't cached elsewhere in
addition to its tmpfs pages.
Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists