Wear Leveling in JFFS2 NOT working!(?)

David Woodhouse dwmw2 at infradead.org
Tue May 1 08:35:29 EDT 2001

Tim at Rikers.org said:
> > The 'jiffies mod' trick would give repeatable results.

> RTC should not be relied on as some hardware has this broken (iPAQ at
> present ;-) What about totaling the checksums for each block as we
> scan them at mount time and then mod that by numblocks? This would
> also be repeatable given the same original filesystem.

By 'repeatable' I meant it would give a badly-distributed pattern, which is
a bad thing. It's not at all necessary that it's predictable given the 
filesystem state before mount.

Totalling the checksums as you suggest would work, but I'm a little 
reluctant to do that because of the layering implications. It would be 
nicer if we could use information which is already available to the code at 
that point. How about just rotating the lists by (highest_inode + 
highest_version_in_it) ?

Over the lifetime of the filesystem, the range of 
	(highest_inode + highest_ver) % nr_blocks
is going to be fairly evenly distributed, isn't it?


More information about the linux-mtd mailing list