Re: [PATCH/RFC] MTD: Striping layer core

Artem B. Bityutskiy
2006-03-31T11:47:56Z

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.