jffs2 on a 32k partition.

Ricard Wanderlof ricard.wanderlof at axis.com
Fri Apr 3 07:14:21 EDT 2009


On Fri, 3 Apr 2009, Manish D wrote:

> I have a 32k flash partition that is used with jffs2. (4k * 8
> eraseblock). [linux kernel 2.4.32]
> ...
> Problem i am facing is, I am not able to use more than 10-12k of flash
> ...
> I am not really sure why so much of flash space is not allowed to be
> used. I understand 32k is a really small partition for any filesystem,
> ...

First of all Linux 2.4 is no longer supported by the mtd developers. But 
the basic problem would be the same with a more up-to-date kernel and mtd 
subtree.

Basically, JFFS2 needs several eraseblocks of overhead. A long time ago, 
it was fixed at 5, but it's no longer a fixed figure and can vary 
depending on flash size and other parameters. With the old kernel you 
have, 5 blocks is probably in the right ballpark, which would give you 3 
eraseblocks or 12 kbytes usable data.

> I plan to move to raw read-write now without wear-levelling (with a
> smarter write algorithm to even out writes to one of 8 blocks).

Yes, that might be a good solution if you have a very simple file 
structure (i.e. one single file that needs updating).

> Would really appreciate inputs and pointers on how i can go about
> using jffs2 (disabling gcd / wear levelling ? ) on such a small
> partition.

I don't think any of that can be disabled in any useful way, JFFS2 would 
not function properly if you did. So writing directly to the flash is 
probably a better option than trying to get JFFS2 to work with such a 
small partition.

/Ricard
--
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30



More information about the linux-mtd mailing list