[PATCH/RFC] MTD: Striping layer core
Artem B. Bityutskiy
dedekind at infradead.org
Fri Mar 31 08:08:25 EST 2006
On Fri, 2006-03-31 at 14:57 +0200, Jörn Engel wrote:
> Full agreement.
>
> Only difference is that I would grind my teeth and accept a
> jffs2-specific flag in mtd, if the overall code is improved that way.
> Adding 10 lines of cruft to mtd and removing 50 lines of cruft from
> jffs2 would be a net win.
>
> If someone smarter comes along and notices that the 10 lines of cruft
> can be removed from mtd without reintroducing 50 lines to jffs2, even
> better. Just like you showed me to use "can flip bits" instead of
> "can mark obsolete".
Well, features could be implemented as a separate unit in MTD. This
unit could do the following:
1. define set of features.
2. test if a particular feature is available in a particular MTD devise.
So we would just have:
#include <mtd/feature.h>
#define jffs2_can_mark_obsolete(c) \
mtd_feature_available(c->mtd, MTD_FEATURE_CHANGE_BIT)
The "feature" module would make the right decision basing on mtd->type.
--
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.
More information about the linux-mtd
mailing list