[RFC] Volatile data device vor jffs2

David Woodhouse dwmw2 at infradead.org
Sun Aug 1 08:33:01 EDT 2004


On Sat, 2004-07-31 at 15:59 +0200, Jörn Engel wrote:
> With a ram based volatile device, there is danger of data loss, so
> garbage collection would have to be forced from time to time, similar
> to the current wbuf approach for nand.

I wouldn't do it like this -- why have a separate nvram device with
JFFS2 nodes in it, when we could just use the page cache and inode
cache. It's going to be _very_ hard to get fsync() et al right if we
implement our own caching.

The reason this hasn't been done is because it requires space
reservations, and that's not trivial. You have to ensure that you have
enough free flash space to make room for everything that's currently
outstanding in the cache. It shouldn't be _that_ hard though.

Doing this right should fix the problem you describe, of extremly
short-lived files hitting the medium when ideally they wouldn't ever get
written out. It would also help a lot with coalescing frequent short
writes to log files into larger nodes, and it would help us with
implementing shared writable mmap too.

-- 
dwmw2






More information about the linux-mtd mailing list