Re: [PATCH 41/44 take 2] [UBI] gluebi unit header

Artem Bityutskiy
2007-02-19T14:06:09Z

On Sun, 2007-02-18 at 23:37 +0100, Arnd Bergmann wrote:
> Which brings be back to my original point ;-)
>
> I'm sure this has been discussed before, but I'd still like to understand
> what is so special with 'static UBI volumes' that they can't be used with
> a slightly extended MTD interface.

Let me provide a list of new things.

* Two types of character devices: UBI devices and UBI volumes. MTD is
aware only of one type of device - just MTD device.
* Two types of volumes.
* New volume update operation.
* Write hints - you may inform UBI which kind of data you are writing -
long term data, short-term data, or just unknown. Depending on the hint
it will pick physical eraseblock with high erase counter low or medium.
* Asynchronous eraseblock erasure operation
* Atomic eraseblock change operation.
* When you read static volume, you may select whether you want UBI to
check CRC or not (CRCs are per-eraseblock, so often it is not reasonable
to check it on any read operation).
* Resizing of volume, and all the things related to their dynamic
nature.
* some other small new interfaces.

The whole idea of MTD interface it to provide _uniform_ method to access
_all_ flashes. It does not look reasonable for UBI software to use MTD
interface, because it is _designed_ for UBI, not for MTD.

So, having native interface for ubi-only software looks reasonable. But
we also able to integrate UBI into MTD for MTD software, which looks a
good design decision and a good compromise.

P.S: Also, I'd ask you to look at the monster mtd_info data structure
and be scared :-) Imagine we add more there.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)