jffs2 minimum erase block count

mtd at johnea.net mtd at johnea.net
Wed Jan 16 16:48:32 EST 2013


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;

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

More information about the linux-mtd mailing list