[PATCH/RFC] MTD: Striping layer core

Artem B. Bityutskiy dedekind at yandex.ru
Fri Mar 31 06:47:10 EST 2006


Jörn Engel wrote:
> Right now, we have code like
> 
> #define jffs2_can_mark_obsolete(c) ((c->mtd->type == MTD_NORFLASH && !(c->mtd->flags & MTD_ECC)) || c->mtd->type == MTD_RAM)
> 
> I guess we can both agree that it is far from optimal.  And my take
> would be to replace it with
> 
> #define jffs2_can_mark_obsolete(c) (c->mtd->flags & MTD_CAN_MARK_OBSOLETE)
This piece of code indeed looks better. But nevertheless, MTD does not 
have to please JFFS2. It is difficult to foresee all "features" MTD 
users can conceive and add corresponding flags. Tomorrow a "XYZ" file 
system will apear and will want a "can_do_my_crap" feature, and you'll 
have to add this to mtd_info. This is really a bad idea.

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





More information about the linux-mtd mailing list