JFFS2 porting status

Chris Johns chrisj at rtems.org
Sat Feb 7 04:46:41 UTC 2009


Chris Chelmecki wrote:
> On Fri, Feb 6, 2009 at 5:58 PM, Chris Johns <chrisj at rtems.org> wrote:
>> Chris Chelmecki wrote:
>>> I'm new to RTEMS and am investigating using it in a project on a
>>> powerpc(MPC5121- e300 core).  One of the things we would need is a
>>> robust flash file system.
>> What robust requirements do you need ?
> 
> Our devices are constantly logging data, so we would need some kind of
> wear levelling and would want to have protection against file
> corruption in the event of power loss while logging.
> 

The JFF2 file system has more features than a libblock flash disk because it 
has control of the file system. For example things like JFFS2_COMPR_ZERO and 
even compression (which can have problems). The libblock flash disk is a block 
driver and appears more like a USB stick.

Does JFF2 require a scan of all devices at the time of mounting ?

>> There is a libblock flash driver in RTEMS. This lets any file system
>> supported by libblock be handled by flash. Have you looked at this driver ?
> 
> I just assumed that the MSDOS/FAT file system wouldn't fit the bill.

I am no fan of the FAT file system but it is used in plenty of applications 
where flash is involved, eg camera.

> Does the libblock flash driver support wear levelling?  The File
> Systems wiki page mentioned that journalling could be added to the
> libblock flash driver, any thoughts on difficulty?
> 

The journalling support is the addition of a sequence number in the page 
headers somewhere that allows the changes to a block be tracked so a similar 
block number in 2 places can be handled. For example a block is being updated 
and the old page is not invalidated so we have 2 pages the sequence number is 
used. I also suspect a NOR implementation would have to do something similar.

Also wear leveling could be added. This is just another type of meta-data on 
the segments being used. The free list becomes a sorted list.

Are you using NAND or NOR devices ?

If you see JFF2 is a fit for your application and you port it RTEMS I would 
welcome it. I think there are places for both types implementation.

Regards
Chris



More information about the users mailing list