[PATCH/RFC] MTD: Striping layer core

Artem B. Bityutskiy dedekind at infradead.org
Fri Mar 31 06:55:10 EST 2006


On Fri, 2006-03-31 at 13:40 +0200, 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)
> 
Add an c->flags field to the per-JFFS2 structure. Initialize it on mount
properly. Then

#define jffs2_can_mark_obsolete(c) (c->flags & JFFS2_CAN_MARK_OBSOLETE)

Don't try to jam this to MTD please.

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





More information about the linux-mtd mailing list