Question about mkfs.jffs2 "-s" option
Shmulik Ladkani
shmulik.ladkani at gmail.com
Thu May 3 14:13:34 EDT 2012
Hi Ricard,
On Thu, 3 May 2012 09:35:14 +0200 (CEST) Ricard Wanderlof <ricard.wanderlof at axis.com> wrote:
>
> On Wed, 2 May 2012, Grant Edwards wrote:
>
> > The NAND flash I'm using has to be written in 4K blocks -- isn't that
> > the "page size"?
>
> The smallest writable unit in a NAND flash is called a 'page', but AFAIK
> this is not what the -s option in mkfs.jffs2 is for. Instead, it is
> related for the kernel memory managament page size, which is 4k for most
> architectures.
According to MKFS.JFFS2(1),
-s, --pagesize=SIZE
Use page size SIZE. The default is 4 KiB. This size is
the maximum size of a data node.
And according to http://linux-mtd.infradead.org/~dwmw2/jffs2.pdf
In order to facilitate rapid decompression of
data upon readpage() requests, nodes contain
no more than a single page of data, according to
the hardware page size on the target platform.
Wow.
I always assumed I had to set it according to NAND's page size, not
according to target system's mm page size.
Can you tell what's the effect of incorrectly setting it to values such
as: 512 or 2048 bytes (instead of 4KiB)?
Well, I guess as data is written during runtime by the jffs2 itself, and
as the GC gets working, new inodes will be correctly created, and their
sizes will be up to system's page size.
However what happens with these small inodes initially created by
mkfs.jffs2? "Only" a performance penalty or something worse?
Thanks,
Shmulik
More information about the linux-mtd
mailing list