public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* JFFS2_RESERVED_BLOCKS_*
@ 2001-10-02 16:14 Larry Doolittle
  2001-10-02 16:35 ` JFFS2_RESERVED_BLOCKS_* David Woodhouse
  0 siblings, 1 reply; 7+ messages in thread
From: Larry Doolittle @ 2001-10-02 16:14 UTC (permalink / raw)
  To: linux-mtd

I'm still fumbling around with MTD/JFFS2, but it does
seem to work.  I have a file system mounted that is
persistent across reboots, which is of course the goal.

Out of 4M Flash on this board, I set aside 1 M for JFFS2.
The rest is supposed to be used for the kernel and initrd,
and I guess I can now program that directly from Linux
instead of from the boot loader.

I have just a few kBytes of junk in that test filesystem, 
as confirmed by du:

/ # du /mnt/test
1       /mnt/test/ssh
0       /mnt/test/html
3       /mnt/test/init.d
11      /mnt/test
/ # 

Imagine my surprise when I read the df output:

/ # df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/ram0                 3835      2359      1476  62% /
/dev/mtdblock2            1024       328       696  32% /mnt/test

Tracing through the source, I discover this is because there
are JFFS2_RESERVED_BLOCKS_WRITE == 5 blocks reserved.  The
Intel 28F320B3 I have has 64 kB erase blocks, so this
reservation accounts for 320 kB.

Maybe my use is atypical, and maybe 5 blocks is a theoretical
minimum.  I don't want to sound like a complainer, either --
this file system certainly looks like it meets my needs.
I guess I just want to point out the superficial imbalance
between the amount of sweat people pour out on projects like
busybox to reduce code size by a few kB, when there is 320 kB
"just lying around" on any JFFS2 on a 64 kB erase block chip.

Maybe the 5-block reservation could be pointed out in the
documentation, and some explanation given as to why this
is reasonable.  Other people may have less wiggle-room in
their design, and we wouldn't want them to be surprised
and get angry with embedded Linux.

      - Larry

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

end of thread, other threads:[~2001-10-04  9:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-02 16:14 JFFS2_RESERVED_BLOCKS_* Larry Doolittle
2001-10-02 16:35 ` JFFS2_RESERVED_BLOCKS_* David Woodhouse
2001-10-02 19:45   ` JFFS2_RESERVED_BLOCKS_* dennis noermann
2001-10-02 19:56     ` JFFS2_RESERVED_BLOCKS_* David Woodhouse
2001-10-03 16:29   ` JFFS2_RESERVED_BLOCKS_* Jörn Engel
2001-10-03 22:44     ` JFFS2_RESERVED_BLOCKS_* dennis noermann
2001-10-04  9:34     ` JFFS2_RESERVED_BLOCKS_* David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox