linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC] [MTD-utils] mkfs.jffs2: JFFS2 and minimal erase block size
@ 2010-09-01 15:36 Yegor Yefremov
  2010-09-02 11:38 ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Yegor Yefremov @ 2010-09-01 15:36 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

Hello,

I'm using a NOR flash SST39VF3201. According to its data sheet the
erase size is 2 Kword. That corresponds to -e 0x1000 value. But the
mkfs.jffs2 utility has a limit of 0x2000 bytes. If I change this limit
to 0x1000 and create an image, I can successfully mount and use it,
with 8KiB value the jffs2 driver fails to work with such an image. I
have found some similar complains like this one
http://lists.infradead.org/pipermail/linux-mtd/2009-February/024523.html,
but no one seems to have asked this question on the list.

Is there any reason for limiting erase block to 0x2000?

I've created a patch to decrease this value to 0x1000, but perhaps
there are any other way?

Regards,
Yegor

[-- Attachment #2: jffs2-erase-block-fix.patch --]
[-- Type: application/octet-stream, Size: 774 bytes --]

Set minimal erase block value to 0x1000 to support flashes
with such erase block

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Index: b/mkfs.jffs2.c
===================================================================
--- a/mkfs.jffs2.c	2010-09-01 16:07:53.000000000 +0200
+++ b/mkfs.jffs2.c	2010-09-01 16:08:36.000000000 +0200
@@ -1765,10 +1765,10 @@
 						  erase_block_size *= units;
 
 						  /* If it's less than 8KiB, they're not allowed */
-						  if (erase_block_size < 0x2000) {
+						  if (erase_block_size < 0x1000) {
 							  fprintf(stderr, "Erase size 0x%x too small. Increasing to 8KiB minimum\n",
 									  erase_block_size);
-							  erase_block_size = 0x2000;
+							  erase_block_size = 0x1000;
 						  }
 						  break;
 					  }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-07  9:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-01 15:36 [RFC] [MTD-utils] mkfs.jffs2: JFFS2 and minimal erase block size Yegor Yefremov
2010-09-02 11:38 ` Artem Bityutskiy
2010-09-07  9:16   ` Yegor Yefremov
2010-09-07  9:21     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).