This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

JFFS2 cleanmarker size requirements

Hello,

I was interested in using a smaller JFFS2 cleanmarker size to circumvent a restriction on one of our SLC NANDs, and would like to know exactly what are the requirements for cleanmarker bits. I checked the JFFS design manual (available on the linux-mtd website), but did not find any limitation for  a cleanmarker's size.

I ask this because I tried to generate a JFFS2 image with a 6 bytes long cleanmarker, but the mkfs.jffs2 tool failed, saying that the minimum allowed cleanmarker size is 12 bytes. I also found a TI wiki page that says that a JFFS2 cleanmarker is 8 bytes long. So, what's the rationale behind these numbers?

We are using a MT2F1G08ABBDAH NAND, with 2k pages and 64 bytes OOB. By using the BCH8 ECC, we use 56 bytes of the OOB, with another 2 bytes used for bad block marking. Leaving us with with 6 unused bytes, which I would like to use as cleanmarker bytes. We've come across differing information regarding the need for cleanmarkers on NAND chips: one of Micron's Technical Notes indicates that cleanmarkers are used on NOR chips, and NAND chips do not require this. However, we've seen the unstable bits issue being described on the MTD website, as well as Artem Bityutskiy mentioning this issue as a more recent development, and that previously NAND chips did not have the unstable bits issue.

The decision to use JFFS2 instead of UBIFS is due to our requirements for a robust system on power failures, and with the unstable bits issue on UBIFS, we've decided that JFFS2 with cleanmarker support would be the safest bet. Is this line of thought correct?

Best regards,

Guilherme