JFFS & MTDBLOCK
Hi,
Just re-reading the mtd-jffs HOWTO to see if I can glean any additional information from it and I noticed the paragraphs that read,
"You must use (for all practical purposes that involve writing) JFFS on raw flash MTD devices. This is because JFFS provides a robust writing and wear leveling mechanism. See FAQ for more info.
If you only want the file-system to be writable while you're developing, but will ship the units read-only, it's acceptable to use the MTDBLOCK device, which performs writes by reading the entire erase block, erasing it, changing the range of bytes which were written to, and writes it back to the flash. Obviously that's not something you want happening in production, but for development it's OK."
I'm not sure that I understand what this means...
Does it mean that for production units where you want the filesystem to be writeable you should use JFFS on a non-MTDBLOCK device?
Or does it mean that using a filesystem other than JFFS for writing to a MTDBLOCK device is probably a bad idea?
Thanks,
Chris
Quoted 6 lines · [email protected] said:
I'm not sure that I understand what this means...
Does it mean that for production units where you want the filesystem to be writeable you should use JFFS on a non-MTDBLOCK device?Or does it mean that using a filesystem other than JFFS for writing to a MTDBLOCK device is probably a bad idea?
It means the latter. When you mount JFFS/JFFS2 on an mtdblock device, it doesn't actually _use_ the read/modify/erase/writeback algorithm described -- or indeed use the mtdblock driver at all -- it just uses the minor number of the mtdblock device you specified to get a handle on the real underlying MTD device.
Using any _other_ file system than JFFS/JFFS2 on the mtdblock device other than in read-only mode is a bad idea.
--
dwmw2