public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* confusion UBI overhead and volume size calculations
@ 2009-12-21 15:57 twebb
  2009-12-28 10:13 ` Adrian Hunter
  2010-01-09 22:58 ` Artem Bityutskiy
  0 siblings, 2 replies; 3+ messages in thread
From: twebb @ 2009-12-21 15:57 UTC (permalink / raw)
  To: linux-mtd

I'm very confused about the calculations for determining max-leb-cnt
argument for mkfs.ubifs and vol_size for ubinize cfg file.

I have a 4GiB MLC nand device that has a 64M reserved area from
0x0-0x04000000.  The rest, 0x04000000-0x100000000 (4032M), is
dedicated to a single MTD partition.  A single UBI device will attach
to the single MTD partition and have 4 volumes.  I'm using mkfs.ubifs
and ubinize at build time to create a single UBI image to be flashed
to the MTD device.

The four volumes are...
vol1 = 352M
vol2 = 352M
vol3 = 352M
vol4 = 2976M

The device data sheet specifies that the minimum valid block count is
7992 (of 8192 possible), so it seems like I should reserve 200 blocks
(100M) to allow for this.

My questions are:
1.  How does the 100M reserved for "potentially bad blocks" get
handled when calculating the vol_size for each volume in the .cfg
file?  I'd like to leave vol1-3 intact and only take space from vol4.
Would the vol_sizes be as follows?

vol1 vol_size = 352M
vol2 vol_size = 352M
vol3 vol_size = 352M
vol4 vol_size = 2976M-100M = 2876M


2.  How is the overhead calculation from the linux-mtd site used in
determining the vol_sizes?  ("The UBI overhead is (B + 4) * SP + O *
(P - B - 4) i.e., this amount of bytes will not be accessible for
users.")

3.  Is max-leb-cnt simple the vol_size/LEB_size?

I'm really lost on this.  I'd appreciate any input anyone may have on this.

Thanks,
twebb

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

end of thread, other threads:[~2010-01-09 22:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-21 15:57 confusion UBI overhead and volume size calculations twebb
2009-12-28 10:13 ` Adrian Hunter
2010-01-09 22:58 ` Artem Bityutskiy

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