All of lore.kernel.org
 help / color / mirror / Atom feed
* Do not understand use of oobfree
@ 2007-02-05  3:58 Philip Rakity
  2007-02-05  8:22 ` Artem Bityutskiy
  2007-02-05 12:46 ` Adrian Hunter
  0 siblings, 2 replies; 5+ messages in thread
From: Philip Rakity @ 2007-02-05  3:58 UTC (permalink / raw)
  To: linux-mtd


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Do not understand use of oobfree
  2007-02-05  3:58 Do not understand use of oobfree Philip Rakity
@ 2007-02-05  8:22 ` Artem Bityutskiy
  2007-02-05  9:14   ` Artem Bityutskiy
  2007-02-06 16:10   ` Philip Rakity
  2007-02-05 12:46 ` Adrian Hunter
  1 sibling, 2 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2007-02-05  8:22 UTC (permalink / raw)
  To: Philip Rakity; +Cc: linux-mtd

On Sun, 2007-02-04 at 19:58 -0800, Philip Rakity wrote:
> 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
at
git://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.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Do not understand use of oobfree
  2007-02-05  8:22 ` Artem Bityutskiy
@ 2007-02-05  9:14   ` Artem Bityutskiy
  2007-02-06 16:10   ` Philip Rakity
  1 sibling, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2007-02-05  9:14 UTC (permalink / raw)
  To: Philip Rakity; +Cc: linux-mtd

On Mon, 2007-02-05 at 10:22 +0200, Artem Bityutskiy wrote:
> 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.

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.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Do not understand use of oobfree
  2007-02-05  3:58 Do not understand use of oobfree Philip Rakity
  2007-02-05  8:22 ` Artem Bityutskiy
@ 2007-02-05 12:46 ` Adrian Hunter
  1 sibling, 0 replies; 5+ messages in thread
From: Adrian Hunter @ 2007-02-05 12:46 UTC (permalink / raw)
  To: linux-mtd

ext Philip Rakity wrote:
> 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

> 
> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Do not understand use of oobfree
  2007-02-05  8:22 ` Artem Bityutskiy
  2007-02-05  9:14   ` Artem Bityutskiy
@ 2007-02-06 16:10   ` Philip Rakity
  1 sibling, 0 replies; 5+ messages in thread
From: Philip Rakity @ 2007-02-06 16:10 UTC (permalink / raw)
  To: dedekind; +Cc: linux-mtd


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
--- Artem Bityutskiy <dedekind@infradead.org> wrote:

> On Sun, 2007-02-04 at 19:58 -0800, Philip Rakity wrote:
> > 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
> at
> git://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.
> 
> -- 
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-06 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-05  3:58 Do not understand use of oobfree Philip Rakity
2007-02-05  8:22 ` Artem Bityutskiy
2007-02-05  9:14   ` Artem Bityutskiy
2007-02-06 16:10   ` Philip Rakity
2007-02-05 12:46 ` Adrian Hunter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.