[PATCH/RFC] MTD: Striping layer core

Artem B. Bityutskiy dedekind at yandex.ru
Fri Mar 31 03:38:34 EST 2006


Alexander Belyakov wrote:
> In that case clients should be aware of using striped devices and 
> provide special support for them. The one of the ideas of the suggested 
> solution is to hide striping internals from the client providing generic 
> mtd device (just with somewhat increased performance).
False.

People don't have to look at mtd->type and may be happy. But if they do 
want to do some mtd type-specific things, they do look at mtd type, 
recognize what is this flash, and do the flash-specific things.

This does not work in case of NAND at the moment. Indeed, users have to 
use weird mtd->read_ecc() instead of just mtd->read(), etc. But this is 
long agreed as bad interface and will be fixed some time later. In future,

I believe, we'll have a common generic flash model, and a generic MTD 
interface. And everyone will be able to work with all flash types in the 
same generic way. Although if users will want to do some flash-specific 
things, they will look at mtd->type, and have a big switch doing 
whatever flash-specific actions are wanted.

MTD is currently rather far from this nice picture, but this is a 
question of time I believe.

-- 
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.




More information about the linux-mtd mailing list