JFFS3 & performance

Jörn Engel joern at wohnheim.fh-wedel.de
Wed Jan 19 10:24:27 EST 2005


On Wed, 19 January 2005 13:07:39 +0000, Artem B. Bityuckiy wrote:
> On Tue, 18 Jan 2005, Joakim Tjernlund wrote:
> 
> > Another idea is to calculate the checksum while reading/writing(much like
> > the networking code does). That would probably require support from the MTD layer
> > and that the checksum is stored at the end of the JFFS3 node.
> Hmm. How to do this? In case of NAND we issue 
> read command and provide buffer, and it is up to driver/hw how to read. 
> One may use DMA.

Something like this?

int jffs3_write_with_checksum(void *data, ...)
{
	...
	if (mtd->write_with_checksum)
		return mtd->write_with_checksum(data, ...);
	mtd->write(data, ...);
	mtd->write(checksum(data), ...);
}

Jörn

-- 
Data dominates. If you've chosen the right data structures and organized
things well, the algorithms will almost always be self-evident. Data
structures, not algorithms, are central to programming.
-- Rob Pike




More information about the linux-mtd mailing list