linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Question about mkfs.jffs2 "-s" option
@ 2012-05-02 16:08 Grant Edwards
  2012-05-03  6:51 ` Shmulik Ladkani
  2012-05-03  7:35 ` Ricard Wanderlof
  0 siblings, 2 replies; 9+ messages in thread
From: Grant Edwards @ 2012-05-02 16:08 UTC (permalink / raw)
  To: linux-mtd

[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            

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

end of thread, other threads:[~2012-05-04 12:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-02 16:08 Question about mkfs.jffs2 "-s" option Grant Edwards
2012-05-03  6:51 ` Shmulik Ladkani
2012-05-03 14:11   ` Grant Edwards
2012-05-03  7:35 ` Ricard Wanderlof
2012-05-03 14:12   ` Grant Edwards
2012-05-03 18:13   ` Shmulik Ladkani
2012-05-03 18:21     ` Grant Edwards
2012-05-04  7:15     ` Artem Bityutskiy
2012-05-04 12:00       ` Shmulik Ladkani

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).