7

what is 'erase block' in the mkfs.jffs2 utility?

I couldn't find anything by googling, maybe because of my deficient search skills. Can anybody tell me what it is?

Can anybody can describe what 'erase block' is?

ArjunShankar
  • 23,020
  • 5
  • 61
  • 83
Young Hyun Yoo
  • 598
  • 10
  • 21
  • Something related to the flash erase block size, presumably. – janneb Jul 12 '12 at 08:37
  • Good question; like janneb, I assumed it was related to flash cell preservation but it seems to be a FS performance improvement (see http://www.linux-mtd.infradead.org/doc/jffs2.html) but I don't understand the text, either. – Aaron Digulla Jul 12 '12 at 08:39
  • Then, what is flash erase block size @janneb?? can you describe it to me please? :) – Young Hyun Yoo Jul 12 '12 at 09:11
  • Is it simular to block size so that if you need to erase a data, it will erase only by 'eraseblock size' unit? as an example ) If I need to erase 10 but erase block size is 4, I need to erase 12?? – Young Hyun Yoo Jul 12 '12 at 09:19
  • I think I should change the question... I'm not even sure if what erase block is?? T_T – Young Hyun Yoo Jul 12 '12 at 09:27
  • 1
    @YoungHyunYoo: See e.g. https://lwn.net/Articles/428584/ – janneb Jul 12 '12 at 10:42

1 Answers1

8

JFFS2 runs on raw flash, not on devices like USB sticks that have firmware that makes them look like traditional disks. Raw NAND flash can only erase (i.e. set bits to 1) in very large blocks. The "erase block" is the size of a block that the device can erase.

Look in /proc/mtd to see what your system thinks each device's erase block size is. (You'll need an MTD (memory technology device, i.e. raw flash) device to use /proc/mtd and for JFFS2 to be useful.)

Andy Lutomirski
  • 1,343
  • 12
  • 15
  • Thanks, good unterstandable explanation, helped a lot. How do I find out the erasesize configuration of a running JFFS2 filesystem. I have the gut feeling that there ist a mismatch on my system – Achim Oct 08 '14 at 11:13