Re: [PATCH/RFC] MTD: Striping layer core

Nicolas Pitre
2006-03-30T16:32:20Z

On Thu, 30 Mar 2006, Artem B. Bityutskiy wrote:

> Working with flashes, it is very handy to use a notion of the minimal
> flash Input/Output unit size. For NOR flashes it is 1 byte (or even 1
> bit, but better to think about it as 1 byte). For NAND flashes, this is
> one NAND page in current MTD. For ECC-NOR flashes, this is something
> like 16 bytes, for data flashes this is another and so on.

While NOR flash can indeed write one byte (or even one bit) at a time,
it is not really useful, not in the context of stripe at least. The NOR
write buffer size is a much more useful metric.

So while the minimum write size is of course a required parameter (that
would clean up many *_init functions in jffs2/wbuf.c), it is also
necessary to consider the "optimal" write size, being the write buffer
size in the case of NOR flash. Larger writes can be performed as long
as they are multiples of the minimum write size.

Read size is obviously irrelevant as any size can be accommodated by the
driver.

Nicolas