Re: [patch/rfc 2.6.29 1/2] MTD: driver model updates

Ricard Wanderlof
2009-04-01T07:29:33Z

On Tue, 31 Mar 2009, David Brownell wrote:

> Hmm, no comments? I had understood there was interest over on
> the MTD side of things in exposing more information through
> sysfs, to help avoid the need to add Even More Ioctls as part
> of support for things like NAND chips with 4KB pages, or which
> handle more than 4GBytes ...

I sense some ambiguity when it comes to sysfs. dwmw2 and others seem to
feel this is the route to go, yet no one really seems interested and the
only patches that people produce are for new ioctls. Admittedly, moving to
sysfs requires some form of high level specification before implementation
can be done, but still...

Could it be that the relevant interfaces would only be used, basically,
for mtdtools, which are quite simple in nature and an ioctl interface
works well. There isn't that much performance tuning to be done and not
very much information which humans are interested in. Most people want to
mount their device and go.

Indeed, from a user application perspective, sysfs seems a bit clumsy to
me, you have to open a file and read and write text strings (although
binary files are possible but, I suspect, frowned upon), rather than just
fire off an ioctl after filling in a struct.

While there are up- and downwards compatibility issues, careful design of
the ioctls can minimize the impact.

I'm not suggesting we go one way or the other, just an observation that
few mtd _users_ seem to be eager to go with sysfs. I invite anyone to
prove me wrong...

/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30