UBI fixes

Frank Haverkamp f.haverkamp at web.de
Fri Oct 6 03:56:19 EDT 2006


Hi Artem,

Thanks for the proposal you made available at:
> On Tue, 2006-10-03 at 18:20 +0300, Artem Bityutskiy wrote:
> > http://www.infradead.org/~dedekind/fix_and_rewrite_gluebi_and_co/

Here is my view on the changes you sent:

The idea with the command line which solves the initialization order
issue looks very good to me. We should add a kernel config option to set
a default. In my case it would the MTD named "content" which
needs to be UBInized.

It is good, that the MTD emulation (gluebi) is now a part of UBI. I
think I won't miss the notifier mechanism, nor the additional
interfaces.

I was astonished that you managed to support JFFS2/UBI with so few 
changes to the original JFFS2 code. I saw that you introduced a new
mtd->type of MTD_UBIVOLUME for the MTDs created be UBI to accomplish
this.

Nevertheless the original JFFS2/UBI support from Joern had some
important advantages which we should keep:

The gluebi-MTD supported the put_block() operation to pass blocks
back to the UBI layer. One reason for doing it was to eliminate the need
for JFFS2 to care about erasing blocks (Joern, Thomas if there were
more, please comment). If JFFS2 needs a block, it gets one from UBI, if
it wants to get rid of it, it passes it back to UBI, which can do now to
whatever is best e.g. apply wearleveling mechanisms. UBI knows best what
to do with blocks which are due to erasure. However this mechanism
introduced some more changes to JFFS2 at all the spots where blocks were
to be deleted.

The put_block() feature of an MTD is of general nature, I think. We
should probably not ty it to UBI. If an MTD has this feature JFFS2 can
exploit it in the way Joern showed in his example. Let's keep it, but
let us remove any UBI naming in that code:

	if (jffs2_has_put_block(c)) {
		jffs2_put_block(c, jeb);
		...

Let's do some discussion on the details in the chat. After we are all on
the same page, I will go ahead and change my reference platform code to
do the testing, before we officially publish the modfied changes in the
ubi-2.6.git.

Frank





More information about the linux-mtd mailing list