Question about mkfs.jffs2 "-s" option

Grant Edwards grant.b.edwards at gmail.com
Wed May 2 12:08:38 EDT 2012


[apologies if this isn't the right forum for mkfs.jffs2 questions]

According the the mkfs.jffs2 man page (from mtd-utils 1.4.8):

  -s, --pagesize=SIZE
  
     Use page size SIZE.  The default is 4 KiB.  This size is the
     maximum size of a data node.

I'm using NAND flash with an erase size of 128K.

I've got a directory tree with 68 files. A few are largish (100KB),
but most of them small (a few hundred bytes or less).  They contain a
total of 680K bytes of data and take up 900K of space on an ext2
filesystem.

When I do a "mkfs.jffs2 -e128 -l -n" I get a jffs2 image with a size
of 300K.  That seems reasonable.

If I specify a page size of 4K (which according to the man page is the
default) by doing "mkfs.jffs2 -e128 -s4KiB -n -l", I get a jffs2 image
with a size of 12MB.

According to the man page the default page size is 4K, so specifying a
page size of 4K shouldn't change anything, right?

Why does specifying a page size of 4K make the jffs2 image 40X larger?

The NAND flash I'm using has to be written in 4K blocks -- isn't that
the "page size"?

-- 
Grant Edwards               grant.b.edwards        Yow! Either CONFESS now or
                                  at               we go to "PEOPLE'S COURT"!!
                              gmail.com            




More information about the linux-mtd mailing list