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

Artem B. Bityutskiy
2006-03-31T10:00:55Z

On Fri, 2006-03-31 at 11:40 +0200, Jörn Engel wrote:
> On Fri, 31 March 2006 13:36:43 +0400, Artem B. Bityutskiy wrote:
> >
> > No, mtd->type has to tell you the type of the MTD device. Ideally, this
> > has to me the only flash-specific field in the mtd_info structure. And
> > if users want to do some flash specific things, they have to look at
> > mtd->type, realize what is the subsystem which handles this flash, and
> > start working with this subsystem. For striping, this is the striping
> > subsystem. I don't know what for mtd->flags, probably this hast to go at
> > all.
>
> Is this exported to userspace via mtdchar?
>
I don't quite understand what is "this".

Ideally yes, there should be a /ubi/devices/mtd/mtdX/type file, there
you can look and realize the type of this MTD device. The contents of
this file will be generated using the mtd-type field. Userspace will be
able to realize the type of this device and look to the corresponding
place in sysfs. For example, if this is a striped device, it'll look
at /sys/devices/mtd_stripe/stripe0/ or whatever.

This is just my imagination how things should look like. So, treat this
correspondingly. May be it is better to use symlinks in sysfs to point
to the striping layer, no sure.

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