Database on JFFS2?

Jörn Engel joern at wohnheim.fh-wedel.de
Tue Apr 22 04:24:07 EDT 2003


On Tue, 22 April 2003 10:07:59 +0200, Esben Nielsen wrote:
> On Wednesday 16 April 2003 13:35, Thomas Gleixner wrote:
> >
> > Erase is always a full block (e.g. 128K), but writes happen in small
> > chunks.
> 
> Ah! Now I get it: You have erase a block as a whole and then you can write 
> parts of it until it is full? I always believed you had to write a full block 
> just to write a single byte, but this does make much more sense to me. We 
> have been through similar discussions with TFFS under vxWorks where we 
> couldn't find out how many times we were actually allowed to write.

:)

> > JFSS2 does no write on fsync, as data are already written.
> 
> Doesn't Linux per default for any filesystem hold a write cache which needs to 
> be flushed with fsync()?

Linux is designed for disk io, it holds a buffer cache that is flushed
to disk as a whole on sync, for any mount point on umount and for any
file on fsync. Sync also happens regularly every 30s.

With flash, many things are different. Latency is very small, compared
to disks, and it doesn't (usually) make sense to hold any writes back
from the medium. No cache -> no need for (f)sync.

The cache came back with NAND flash, but you don't use it and don't
need to worry about it.

Jörn

-- 
Write programs that do one thing and do it well. Write programs to work
together. Write programs to handle text streams, because that is a
universal interface. 
-- Doug MacIlroy



More information about the linux-mtd mailing list