JFFS2 an nodes checking

David Woodhouse dwmw2 at infradead.org
Tue Sep 28 12:58:19 EDT 2004


On Tue, 2004-09-28 at 20:48 +0400, Artem B. Bityuckiy wrote:
> > Yes, he does. The problem is that each time you access a FIFO you update
> > its ctime and mtime on the flash... which leads to a _lot_ of nodes,
> > only one of which is non-obsolete. That's a problem on NAND flash.
> 
> Things are same for regular files. This is from SUSv3 for write() call:
> 
> "Upon successful completion, where nbyte is greater than 0, write() 
> shall mark for update the st_ctime and st_mtime fields of the file"

Yeah, but we _know_ we're going to write to the flash when we write to
regular files. That's not necessarily intuitively true for FIFOs. You
expect your data to get to the other end of the FIFO... you don't
necessarily expect anything to be written to the flash.

> This is from SUSv3 fore read() call:
> 
> "Upon successful completion, where nbyte is greater than 0, read() shall 
> mark for update the st_atime field of the file, and shall return the 
> number of bytes read."

We don't do atime on JFFS2.

> Why that's a problem on NAND flash especially ?

On NOR we can scribble over the old nodes with the old mtime/ctime. On
NAND we can't so we end up with lots of nodes which are _potentially_
valid and which all have to be compared.

-- 
dwmw2





More information about the linux-mtd mailing list