[<prev] [next>] [day] [month] [year] [list]
Message-Id: <E1H2TsG-0000h9-0Z@be1.lrz>
Date: Thu, 04 Jan 2007 15:47:19 +0100
From: Bodo Eggert <7eggert@....de>
To: Michael Tokarev <mjt@....msk.ru>,
Linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: open(O_DIRECT) on a tmpfs?
Michael Tokarev <mjt@....msk.ru> wrote:
> I wonder why open() with O_DIRECT (for example) bit set is
> disallowed on a tmpfs (again, for example) filesystem,
> returning EINVAL.
>
> Yes, the question may seems strange a bit, because of two
> somewhat conflicting reasons. First, there's no reason to
> use O_DIRECT with tmpfs in a first place, because tmpfs does
> not have backing store at all, so there's no place to do
> direct writes to. But on another hand, again due to the very
> nature of tmpfs, there's no reason not to allow O_DIRECT
> open and just ignore it, -- exactly because there's no
> backing store for this filesystem.
I'm using a tmpfs as a mostly-ramdisk, that is I've set up a large swap
partition in case I need the RAM instead of using it for a filesystem.
Therefore it will sometimes have a backing store.
OTOH, ramfs does not have this property (the cache is the backing store),
so it would make sense to allow it at least there.
BTW: Maybe you could use a ramdisk instead of the loop-on-tmpfs.
--
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
http://david.woodhou.se/why-not-spf.html
-
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