jffs2 usage question: nandwrite
I'm a newbie to flash file systems and I've spent my day reading. However, I seem to be missing something.
Several sets of instructions encourage me to build my file system using mkfs.jffs2, which I understand creates an image, (akin to mkisofs), rather than operating on a device file. However, once I have the image, they recommend placing the image onto flash using nandwrite.
I can't find any doc on nandwrite, but I'm guessing that it does a "bad block aware" sequential copy, meaning that it simply skips any blocks that it recognizes as bad according to a manufacturer mark. Assuming so, doesn't this hole in my fresh jffs2 file system cause jffs2 grief? I mean, it would cause most other file systems grief to have an extra block inserted in the middle of their block sequence.
What am I missing?
--rich
Hi Rich,
JFFS2 keeps all the relevant information in every block. That is, you can shuffle the erase blocks any way you like and you still have a valid file system.
The holes made by skipping bad blocks are not a problem.
Best regards,
Iwo
________________________________________
From: linux-mtd [[email protected]] On Behalf Of K Richard Pixley [[email protected]]
Sent: Friday, 7 November 2014 1:47 PM
To: [email protected]
Subject: jffs2 usage question: nandwrite
I'm a newbie to flash file systems and I've spent my day reading. However, I seem to be missing something.
Several sets of instructions encourage me to build my file system using mkfs.jffs2, which I understand creates an image, (akin to mkisofs), rather than operating on a device file. However, once I have the image, they recommend placing the image onto flash using nandwrite.
I can't find any doc on nandwrite, but I'm guessing that it does a "bad block aware" sequential copy, meaning that it simply skips any blocks that it recognizes as bad according to a manufacturer mark. Assuming so, doesn't this hole in my fresh jffs2 file system cause jffs2 grief? I mean, it would cause most other file systems grief to have an extra block inserted in the middle of their block sequence.
What am I missing?
--rich
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
______________________________________________________________________
This communication contains information which may be confidential or privileged. The information is intended solely for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this communication in error, please notify me by telephone immediately.
______________________________________________________________________
Quoted 5 lines · Iwo Mergler
JFFS2 keeps all the relevant information in every block. That is, you can shuffle the erase blocks any way you like and you still have a valid file system.
The holes made by skipping bad blocks are not a problem.
Additionally, JFFS2 is bad-block-aware, so it knows that there can be bad blocks in a partition on which a file system is mounted, and avoids trying to use them.
/Ricard
Signature · 3 lines
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