need arguments to use JFFS2
Hi everybody,
In the web, I am not sure to see an article which clearly express the advantage of JFFS2.
Can we find any comparison document between all existing Flash FS ? Does it exist ??
Please could someone give me some arguments to use JFFS2 instead of all others Flash FS such as CRAMFS ?
One of the reason could it be in the Flash management : optimization ?
Thanks in advance,
Chantara
Dear Chantara,
Quoted 3 lines · in message <[email protected]> you wrote:
In the web, I am not sure to see an article which clearly express the advantage of JFFS2.
It makes little sense to dicuss "advantages" without specifying requirements.
Quoted 2 lines
Please could someone give me some arguments to use JFFS2 instead of all others Flash FS such as CRAMFS ?
One significant advantage is that JFFS2 provides a _writable_ flash filesystem, while cramfs is read-only. But as stated before: this is an advantage only when you need a writable filesystem.
Quoted 1 line
One of the reason could it be in the Flash management : optimization ?
Yes.
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Every program has at least one bug and can be shortened by at least one instruction - from which, by induction, one can deduce that every program can be reduced to one instruction which doesn't work.
Quoted 2 lines · [email protected] said:
Please could someone give me some arguments to use JFFS2 instead of all others Flash FS such as CRAMFS ?
cramfs is read-only. If you don't want to write to your file system, you should probably be using it instead of JFFS2.
The only other flash file system for Linux is YAFFS, for use on NAND flash. I don't know as much about YAFFS as I should -- the choice between YAFFS and JFFS2 on NAND is basically a tradeoff between the improved speed and mount time of YAFFS, and the increased storage capacity which JFFS2 compression gives, I think. Charles will probably offer more enlightenment.
Other than that, you only have the brain-dead 'translation layer' crap which is a kind of journalling pseudo-filesystem used to emulate a virtual hard drive, on which you need to use put a 'normal' journalling file system. This two-layer approach made some sense in the days of DOS, where you could just provide an INT 13h Disk BIOS IRQ handler and pretend to be a normal hard drive to DOS, but it makes far less sense now. You end up with power-loss safety being implemented in _both_ your 'normal' file system and the underlying pseudo-fs, the pseudo-fs has no way of knowing which blocks on the virtual hard drive are marked as 'free' by the higher file system and so it keep garbage-collecting stale data from one place on the flash to another, and at least at the moment, it means you don't get compression -- although that's not a fundamental design flaw like the others.
--
dwmw2
It is virtually impossible to make any firm statements without understanding your needs a bit better.
A few others have already covered cramfs and JFFSx. I can tell you a bit about YAFFS.
YAFFS only works with NAND flash. YAFFS does not provide compression (like JFFS does). YAFFS is faster than JFFS2 in most situations and uses less RAM. Mileage will vary though. Compression is not necessarily a huge advantage for JFFSx. Some people loop-mount a cramfs image stored on YAFFS to get the benefits of compression as well as the faster speed for other files.
If you have NAND, then most likely YAFFS will serve you better for larger flash arrays (say 16MB and bigger) and JFFS2 for smaller arrays.
YAFFS will do nothing for you if you only have NOR flash.
If you're designing a new board then consider including NAND flash for storage (rather than NOR). NAND is cheaper, smaller (physically), bigger (in bytes) and faster. You can then use YAFFS or JFFS2 (even both - by partitioning the device).
-- Charles