JFFS2 and block size for writing

Ari Saastamoinen mtd at oh3mqu.pp.vip.fi
Mon Jul 29 18:11:20 EDT 2002


Hello,

First I must be sorry if that subject has discussed before and/or this    
situation is already supported, but only thing what I found was with 
suvject "Does MTD include support for STM M58LW064?"  And the answer was  
no.  I have the project what have that chip, and I tried to use that
command set 0001 with the chip and it seems to be working somehow (using
linux kernel 2.4.18-rmk7).  When I tried to dd something to the
/dev/mtdblock/0 it seems to appear to the chip, but the JFFS2 writing do  
not work.

I tried to debug what went wrong and it seems that problem might be in    
write alignments.  On some chips it is possible to write zeros to the chip
at any time, but with this chip writing to the 4*16 bit page is allowed   
only once after erase.  Is there any configuration parameters for JFFS2 to
make it perform writes only with that kind of alignment?

And if there is no currently supporting for that I will make it by myself.
What is your suggestions?

1) Should I patch mtdblock so it caches all the writes and writes only 64
at the time?  I believe that file system is not safe agaings power
failures any more with that patch.

2) Should I patch mtdblock like: if I write 1 byte to it and it will
report that 8 bytes were written?  Can JFFS2 recognize that and next write
will go to the right place?

3) Or should I patch JFFS2 so it will do all needed alignment by itself?

4) Does anyone have any other suggestions?


PS. Sorry about my bad english too 8-)

--
Ari Saastamoinen






More information about the linux-mtd mailing list