Skip to contentSkip to conversation

jffs2 minimum erase block count

DISCUSSION [email protected] 1 participant 1 message Jan 16, 2013 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hello,

While recently debugging an issue mounting an mtdblock device via jffs2, we discovered a minimum erase block count requirement in fs/jffs2/fs.c:

#if 0
	if (c->flash_size < 5*c->sector_size) {
		printk(KERN_ERR "jffs2: Too few erase blocks (%d)\n", c->flash_size / c->sector_size);
		return -EINVAL;
	}

#endif

Which we disabled by wrapping it with #if 0 as shown.

For our particular application, the mounted mtdblock partition is for very rarely written user data, and is implemented over high endurance NOR flash.

After disabling this check the mounted partition seems to be working.

However it would be reassuring to know if violating this minimum erase block count will have other repercussions.

Thank You...

John Andrews