From: Peter Barada <peter.barada@gmail.com>
To: dedekind1@gmail.com
Cc: linux-mtd@lists.infradead.org, Peter Barada <peter.barada@logicpd.com>
Subject: Re: Preventing JFFS2 partial page writes?
Date: Mon, 27 Jun 2011 10:31:29 -0400 [thread overview]
Message-ID: <4E089441.3010809@gmail.com> (raw)
In-Reply-To: <1308943581.13493.15.camel@koala>
On 06/24/2011 03:26 PM, Artem Bityutskiy wrote:
> On Wed, 2011-06-22 at 11:28 -0400, Peter Barada wrote:
>> Thoughts?
> Sorry, could you please define the problem you are trying to solve?
> Sorry if you did define it in your long post, but I could not easily
> find it.
The problem I'm trying to solve is that the Micron NAND I'm using has
an internal 4-bit ECC engine and uses four 8-byte ECCs that provide
4-bit protection per 512 data bytes + four OOB bytes. The ecclayout I'm
using is:
ecclayout = {
eccbytes = 32,
eccpos = { 8, 9, 10, 11, 12, 13, 14, 15, /* ECC data bytes
0-511 + OOB bytes 4-7 */
24, 25, 26, 27, 28, 19, 30, 31, /* ECC data bytes
512-1023 + OOB bytes 20-23 */
40, 41, 42, 43, 44, 45, 46, 47, /* ECC data bytes
1024-1535 + OOB bytes 36-39 */
56, 57, 58, 59, 60, 61, 62, 63}, /* ECC data bytes
1536-2047 + OOB bytes 52-55 */
.oobfree = {
{ .offset = 4,
.length = 4},
{ .offset = 20,
.length = 4},
{ .offset = 36,
.length = 4},
{ .offset = 52,
.length = 4},
},
};
After the JFFS2 cleanmarker is written into bytes 4-7 and 16-23 of the
OOB, nanddump shows:
OOB Data: ff ff ff ff 85 19 03 20 5a e3 da 69 01 40 f1 36
OOB Data: ff ff ff ff 08 00 00 00 91 99 3c 05 01 d0 5d b3
OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Note that the ECC bytes 8-15 and 24-31 are no longer FF due to bytes 4-7
and bytes 20-23 being written with non-zero data.
When data is later written to this same page (w/o an intervening erase
of its block) reading the page causes an uncorrectable ECC error.
There are eight additional bytes of OOB space available for writing, but
they are not ECC'd.
The issue I'm trying to solve is how to communicate from MTD to JFFS2
that some bytes of the oobfree array perturb the data ECC and can not be
used to write the cleanmarker.
--
Peter Barada
peter.barada@gmail.com
next prev parent reply other threads:[~2011-06-27 14:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 16:19 Preventing JFFS2 partial page writes? Peter Barada
2011-06-22 6:04 ` Artem Bityutskiy
2011-06-22 15:28 ` Peter Barada
2011-06-22 17:07 ` Ivan Djelic
2011-06-22 19:17 ` Peter Barada
2011-06-22 20:06 ` Ivan Djelic
2011-06-24 15:09 ` Peter Barada
2011-06-24 19:26 ` Artem Bityutskiy
2011-06-27 14:31 ` Peter Barada [this message]
2011-06-28 9:34 ` Artem Bityutskiy
2011-06-28 9:39 ` Artem Bityutskiy
2011-07-01 20:48 ` Ivan Djelic
2011-07-04 6:27 ` Artem Bityutskiy
2011-06-28 18:56 ` Peter Barada
2011-06-29 6:33 ` Artem Bityutskiy
2011-06-30 18:05 ` Peter Barada
2011-07-01 20:52 ` Ivan Djelic
2011-07-20 15:02 ` Peter Barada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E089441.3010809@gmail.com \
--to=peter.barada@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=peter.barada@logicpd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.