[PATCH] mtd/utils: sync with MTD ioctl interface rework to get rid of MEMGETOOBSEL/MEMSETOOBSEL

Thomas Gleixner tglx at linutronix.de
Mon Dec 12 19:20:04 EST 2005


On Mon, 2005-12-12 at 16:02 -0800, Todd Poynor wrote:
> > 
> > Well, padding doesn't work in nandwrite if the image to be written 
> > contains OOB data. The idea as I see it is if you are trying to write 
> > the image with OOB data, you should know what you're doing, and that 
> > implies knowledge of the oobavail size.
> > On the other hand, it might be useful to implement an option for 
> > nandwrite which specifies what OOB data length user supposes (default 
> > will be the oobavail).
> 
> In order to make it work as above, we'd need a way for users to find out 
> what oobavail their mtd driver uses (in dmesg and/or a util)

Definitely not by consulting dmesg. There is no guarantee that dmesg
contains the information you need at the time you are asking for it.

> , and an 
> option on all the fs utils to write that number of bytes.  A file format 
> that specifies what data and OOB size have been generated would do the 
> trick, if we want to get that fancy about it.  Just filling out all 16 
> or 64 bytes in the input file and truncating to oobavail at nandwrite 
> time seems a lower-cost workaround.

Find a way to give access to raw data and to the "translated" data is
the goal. Everything else is just an ivory tower experiment.

	tglx






More information about the linux-mtd mailing list