Re: [PATCH 06/25] mtd: move ioctl32 code to mtdchar.c

From: Jörn Engel
Date: Wed Nov 09 2005 - 10:49:20 EST


On Wed, 9 November 2005 08:37:16 -0700, Eric W. Biederman wrote:
> Jörn Engel <joern@xxxxxxxxxxxxxxxxxxxx> writes:
>
> > Can you name a few examples, where mtdchar.c makes sense? I've found
> > it to be quite useless.
>
> I have found just the opposite. It happens to be the only interface
> to mtd devices I use. In general when you have flash devices small
> enough that you can't use a filesystem without waisting a lot of space
> (keeping 1 free erase block out of 4 or 8 is a problem). Or when you are
> doing low-level mucking mtdchar is invaluable.

Josh already convinced me with the Bad Block argument. The hardware
already used an OOB scheme to define them. Regular unix files without
some sort of OOB data access don't map well to NAND.

> As for the interface to mtdchar. I agree that the readonly character
> device is silly, and does weird things to the mtd device minor numbers.
> I agree that ioctls are not the prettiest interface around, however
> the raw functionality the ioctls export is needed, and interesting. Some
> of the functionality would be hard to export even in sysfs the cool ascii
> replacement for ioctl.
>
> Long term it does look like a sysfs interface to the mtd functionality
> could suffice.

It could. Some time ago I starting coding something up, but got
quickly distracted. Might be easier to start from scratch again.

Jörn

--
Happiness isn't having what you want, it's wanting what you have.
-- unknown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/