OpenBMC Image Management
Milton Miller II
miltonm at us.ibm.com
Tue Aug 8 08:02:57 AEST 2017
On 08/03/2017 around 1:00am in some time zone, Benjamin Herrenschmidt wrote:
>On Thu, 2017-08-03 at 00:55 -0500, Patrick Williams wrote:
>> But ok, I'll bite. There are two main reasons we went this path:
>>
>> * UBIFS is, to the best of my knowledge, a better file system
>than
>> JFFS2 in pretty much every metric.
>>
>> * Dynamic volumes are easier to deal with than static volumes,
>> which Adriana spelled out above.
>>
>> Is your real question why do we have a file system instead of a raw
>FFS
>> image?
>
>No that wasn't my real question. I was just wondering why ubifs
>compared to jffs2, I was under the impression that ubifs was designed
>for large NAND flashes.
>
>I might be wrong, mind you, but I remember reading that it had
>significant overhead for a small flash.
There was some discussion about the OLPC decision to not use UBI on
their flash because of space.
UBI requires two write programming units to hold two units of metadata
for each erase block. One block holds the wear leveling counter and is
written immediately after erase, and the second holds the assigned volume
and logical erase block theirin. On NAND, each of these are a write
program unit and can be upuwards of 256 bytes, and erase units might be
a few kbytes. On NOR, which we are using, these are each assigned a
minimum size of 64 bytes. Also ubi enforces each erase block must
be at least 16kB, this means we have to use 64kB sectors not 4kB.
Thus the overhead for ubi is 128 bytes per 65536 bytes, and in return
we get volume management and wear leveling across the whole device.
We have to use 64k blocks vs 4k but can share 1 floating block across
all volumes in the device.
I have not analyzed the efficency of jffs2 vs ubifs for storage and
journaling. jffs2 mantains all inodes in ram, it appears that ubifs
presently does but would not be required to. Both have shutdown fast
mount support and both have some degree of support for compressed file
fragments.
jffs2 only supports synchronous updates to the flash, ubifs has a mount
option to do the same but can do async writeback to the flash. This may
expose our applications to needing to add fsync code.
milton
More information about the openbmc
mailing list