Do not understand use of oobfree
When reading the documentation for nand flash I realized that there was an out of band area of some size following each page. This size could be say 8, 16 or 64 bytes. Inside this oob area is stored a bad block marker. There may also be stored ecc bytes. And there is of course some area not used.
Some Questions:
a) the location and size of the ecc bytes are determined by what ? .useecc = MTD_NANDECC_AUTOPLACE,
the flash chip -
the nand controller on the flash chip ?
both ??
b) the oobfree area is specified as a {offset, length) pair. When this gets to say the jffs2 file system what does it see. For example
.oobfree = { {8, 8} }it would see 8 bytes starting at offset 8 OR 8 bytes starting at offset 0 and the mtd driver would do the mapping.
more complex example
.oobfree = { {3, 2}, {6, 2} }would jffs2 see 4 bytes at offset 0. or 2 sets of data at offset 3 and offset 6.
I am asking because if I have a flash device that does not map per the standard includes do I have to touch jffs2 to get things to work.
regards,
Philip
____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
Quoted 2 lines · Philip Rakity
I am asking because if I have a flash device that does not map per the standard includes do I have to touch jffs2 to get things to work.
I've just submitted a patch which teaches UBI to use MTD_OOB_AUTO option. Please, make sure your driver supports it and try the patch.
The idea is that it is not application's business to know details of OOB
- where ECC bytes ate stored, BB marker, etc. This is all legacy stuff, conceptually wrong. We now (thankfully) have the MTD_OOB_AUTO and it should be used instead. It represents free OOB bytes as a contiguous buffer and allows you read to it and write from it.
The patches are not in Mainline, not even in mtd-2.6.git yet. They are atgit://git.infradead.org/~dedekind/dedekind-mtd-2.6.git.
Or web
http://git.infradead.org/?p=users/dedekind/dedekind-mtd-2.6.git;a=summary
Try this and send us your success story or the complaint.
P.S. I don't know why we don't remove the legacy OOB-related stuff - but I am all for it.
Signature · 2 lines
Best regards, Artem Bityutskiy (Битюцкий Артём)
Quoted 2 lines · Artem Bityutskiy
I've just submitted a patch which teaches UBI to use
MTD_OOB_AUTOoption. Please, make sure your driver supports it and try the patch.
BTW, Adrian Hunter wrote an useful test program to test OOB_AUTO support in your driver. It is accessible via
git://git.infradead.org/~ahunter/oobtest.git
or web http://git.infradead.org/?p=users/ahunter/oobtest.git;a=summary
Try to run it to make sure your driver is allright.
Signature · 2 lines
Best regards, Artem Bityutskiy (Битюцкий Артём)
Quoted 3 lines · ext Philip Rakity
b) the oobfree area is specified as a {offset, length) pair. When this gets to say the jffs2 file system what does it see. For example
.oobfree = { {8, 8} }
8 free bytes at offset 8
Quoted 9 lines
it would see 8 bytes starting at offset 8 OR 8 bytes starting at offset 0 and the mtd driver would do the mapping.
more complex example
.oobfree = { {3, 2}, {6, 2} }would jffs2 see 4 bytes at offset 0. or 2 sets of data at offset 3 and offset 6.
2 free bytes at offset 3
2 free bytes at offset 6
Note that the total free bytes for a page is stored in oobavail.
I am still a little confused about oobfree and jffs2. So, Jffs2 knows about the physical layout of the out of band area -- does not treat it as a logical linear memory area? The driver does not hide the layout by providing a linear mapping to jffs2 ? oobfree tells jffs2 where it can put its data ?
Philip
Quoted 16 lines · --- Artem Bityutskiy
Quoted 1 line · Philip Rakity
I am asking because if I have a flash device that does not map per
the
Quoted 1 line
standard includes do I have to touch jffs2 to get things to work.
I've just submitted a patch which teaches UBI to use
MTD_OOB_AUTOoption. Please, make sure your driver supports it and try the patch.The idea is that it is not application's business to know details of OOB
- where ECC bytes ate stored, BB marker, etc. This is all legacy stuff,
conceptually wrong. We now (thankfully) have theMTD_OOB_AUTOand it should be used instead. It represents free OOB bytes as a contiguous buffer and allows you read to it and write from it.
Quoted 7 lines
The patches are not in Mainline, not even in mtd-2.6.git yet. They are
atgit://git.infradead.org/~dedekind/dedekind-mtd-2.6.git.Or web
http://git.infradead.org/?p=users/dedekind/dedekind-mtd-2.6.git;a=summary
Quoted 13 lines
Try this and send us your success story or the complaint.
P.S. I don't know why we don't remove the legacy OOB-related stuff - but
I am all for it.Signature · 2 lines
Best regards, Artem Bityutskiy (Битюцкий �ртём)
____________________________________________________________________________________
Never Miss an Email
Stay connected with Yahoo! Mail on your mobile. Get started!
http://mobile.yahoo.com/services?promote=mail