public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Adrian Hunter <ext-adrian.hunter@nokia.com>
To: "Adam S. Turowski" <a.turowski@wb.com.pl>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [UBIFS] Filesystem capacity
Date: Mon, 16 Feb 2009 17:54:21 +0200	[thread overview]
Message-ID: <49998C2D.7000505@nokia.com> (raw)
In-Reply-To: <49997BBF.7080906@wb.com.pl>

Adam S. Turowski wrote:
> Hi,
> Can anyone explain differences in filesystem capacity between jffs2 and
> ubifs?
> Kernel 2.6.28
> mtd3 29MB nor flash
> mtd4 31MB nand flash
> File created by dd-ing from /dev/urandom:
> jffs2:
> nor: 28361 kB
> nand: 31200 kB
> 
> ubifs:
> one volume created on mtd3
> UBIFS: mounted UBI device 0, volume 0, name "root"
> UBIFS: file system size:   28676736 bytes (28004 KiB, 27 MiB, 219 LEBs)
> UBIFS: journal size:       1440384 bytes (1406 KiB, 1 MiB, 11 LEBs)
> UBIFS: media format:       4 (latest is 4)
> UBIFS: default compressor: LZO
> UBIFS: reserved for root:  1417227 bytes (1384 KiB)
> 
> one volume created on mtd4
> UBIFS: mounted UBI device 1, volume 0, name "data"
> UBIFS: file system size:   31870976 bytes (31124 KiB, 30 MiB, 2008 LEBs)
> UBIFS: journal size:       1603072 bytes (1565 KiB, 1 MiB, 101 LEBs)
> UBIFS: media format:       4 (latest is 4)
> UBIFS: default compressor: LZO
> UBIFS: reserved for root:  1575089 bytes (1538 KiB)
> 
> nor: 26960 kB (I can live with that)
> nand: 23552 kB (With that I cannot)
> 
> Any suggestions?

It is because the LEB size is relatively small, and UBIFS does not
fit data into the ends of eraseblocks the way JFFS2 does.  Your options
are:
	1. use JFFS2
	2. amend your NAND driver to pretend that eraseblocks are bigger
than they really are, by treating 2 (or 4 or 8 etc) as one eraseblock
	3. create another MTD driver that sits on top of the NAND driver
and does the same as 2

The disadvantage of 2 or 3 is that it also multiples the effective number
of bad blocks.

Note that the problem is exacerbated by writing un-compressible (e.g. random)
data because you end up fitting only 3 x 4.1K data nodes per 16K eraseblock.

If you are interested in 3, I could help.

  reply	other threads:[~2009-02-16 15:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-16 14:44 [UBIFS] Filesystem capacity Adam S. Turowski
2009-02-16 15:54 ` Adrian Hunter [this message]
2009-02-17  0:39   ` Jamie Lokier
2009-02-17  6:11     ` Artem Bityutskiy
2009-02-17  8:01     ` Artem Bityutskiy
2009-02-17  6:07   ` Artem Bityutskiy
2009-02-17  7:39     ` Adam S. Turowski
2009-02-17  7:57       ` Artem Bityutskiy
2009-02-17  9:16         ` Jamie Lokier
2009-02-17  9:31           ` Artem Bityutskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49998C2D.7000505@nokia.com \
    --to=ext-adrian.hunter@nokia.com \
    --cc=a.turowski@wb.com.pl \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox