nand oob layout assumptions
Charles Manning
manningc2 at actrix.gen.nz
Sun Mar 28 03:06:10 EST 2004
On Sunday 28 March 2004 04:18, David Woodhouse wrote:
> On Sat, 2004-03-27 at 10:13 -0600, David Updegraff wrote:
> > In all this discussion, the need for anyone outside the driver to know
> > hardware positions of ECC and badblock markers still elludes me. Yes,
> > various FS need to scribble oob info of their own in a particular
> > format, and in a way that won't scribble over ecc/badblock, but is there
> > anything more than that?
>
> Nope. The file system just need to be told which are bad blocks, where
> the ECC data are, and which bytes are still available. In fact, it
> possibly doesn't even need to know where the ECC data are in the general
> case.
I agree with the idea of abstacting this as much as possible. Where the EEC
is stores (if indeed it even is stored in OOB) should not be the FS's concern
and should not be known to the FS. The FS should just be told that the ECC
passed, failed or fixed a single bit error.
Unless we go for one abstract interface it will [continue to] be hell to
support more than one FS (it is already a /dev/ass/pain to try get YAFFS and
JFFS2 going on one machine due to different OOB layouts). The [already bad]
situation will only get worse when trying to deal with all the fun that the
newer NAND devices bring us.
>
> > So, again, what if the 'oobsize' and 'oob_buf' (or a renamed relative
> > thereof) were interpreted to mean "region available in OOB for misc.
> > file system housekeeping, that will not stomp on private ECC or badblock
> > areas and will not be interpreted by nand driver". And let the driver
> > put it wherever it wants/needs to in OOB. Driver gets to ignorant of FS
> > details, FS gets to be ignorant of chip-HW-dependent ECC and badblock
> > layout.
>
> Seems reasonable. We can make it a bitmask of available bytes, perhaps?
No bitmask. That just passes mucky knowledge through the interface.
Rather:
* Have the mtd tell the FS the number of unused bytes in the OOB.
* Pass a byte array through the interface and the mtd packs/unpacks this
around the ECC, bad block markers and other stuff.
-- Charles
More information about the linux-mtd
mailing list