From: Artem Bityutskiy <dedekind@infradead.org>
To: Darwin Rambo <drambo@broadcom.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Matthieu CASTET <matthieu.castet@parrot.com>,
Adrian Hunter <adrian.hunter@nokia.com>
Subject: RE: UBIFS and hardware ECC of all FF pages of MLC NAND
Date: Tue, 29 Sep 2009 18:42:16 +0300 [thread overview]
Message-ID: <1254238936.3778.109.camel@localhost> (raw)
In-Reply-To: <B125D8217ABC4B43826503DE00A2D44910D7F2EA60@SJEXCHCCR01.corp.ad.broadcom.com>
On Tue, 2009-09-29 at 06:26 -0700, Darwin Rambo wrote:
> Artem,
>
> One thing you might add is a paranoid check for the OOB being set to 0xFF before
> programming a page. If someone programs trailing pages in a block of 0xFF by mistake,
> and puts a non-0xFF ECC in the OOB, then the UBIFS code would write to an already
> written ECC, which I have found to corrupt other blocks ECCs on my part. It also gives
> strange error messages and refuses to mount on reboot. The messages do not look like
> they are related to the original ECC write problem so it is harder to debug.
Do you mean extending the 'ubi_dbg_check_all_ff()' check and make it
also read OOB to make sure there are only 0xFF bytes? Well, it might be
useful, but I would prefer to get a patch from someone, rather than
implementing this myself. :-)
> With this particular error, you can see messages like below:
>
> UBIFS error (pid 245): ubifs_read_node: bad node type (255 but expected 2)
> UBIFS error (pid 245): ubifs_read_node: bad node at LEB 73:456392
> UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 3:0, read 64 bytes
Well, here I already see that the problem is on driver level because I
cannot read data. Also, if your driver prints an error message in case
of an uncorrectable ECC errors, this could help.
> UBI warning: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling,
> reserved 17, need 19
> UBI warning: ubi_eba_copy_leb: error -74 while reading data from PEB 3
> UBI error: wear_leveling_worker: error -74 while moving PEB 3 to PEB 2
> UBI warning: ubi_ro_mode: switch to read-only mode
> UBI error: do_work: work failed with error code -74
> UBI error: ubi_thread: ubi_bgt0d: work failed with error code -74
> UBI error: ubi_io_read: error -74 while reading 516096 bytes from PEB 3:8192, re
> ad 516096 bytes
> UBIFS error (pid 1): ubifs_scan: corrupt empty space at LEB 1:8192
> UBIFS error (pid 1): ubifs_scanned_corruption: corrupted data at LEB 1:8192
> UBIFS error (pid 1): ubifs_scan: LEB 1 scanning failed
> UBI error: ubi_io_read: error -74 while reading 516096 bytes from PEB 3:8192, read 516096 bytes
> UBIFS error (pid 1): ubifs_recover_master_node: failed to recover master node
... snip ...
> A better error message would say something like:
> "UBI error: Data page incorrectly programmed to all 0xFFs with non-0xFF ECC."
Probably, but that would happen only if you have debugging checks
enabled, right?
> Another suggestion is rather than creating large files stuffed with 0xFF pads the
> end of some of the blocks, to have a ubinize option which creates a download header
> in front of each block with block length and valid data length. Then the 0xFF's
> wouldn't have to be carried around and the user would be less likely to program
> 0xFF's by mistake. They would typically only program the useful data that is in
> the file instead, and since they erased the block to program, the trailing 0xFFs
> would be taken care of automatically. Of course, this would require custom flasher
> changes to accommodate. Thanks.
It is doable, but I can predict then other people will complain why the
hack they cannot use simple nandwrite when flashing UBI images. And for
many people who have HW which has no problems with writing 0xFFs - plane
nandwrite is usable.
But how much 0xFFs are there are? There should not be that many. We pad
special areas like the UBIFS log, the UBI volume table, the UBIFS lprops
area, the UBIFS master area with 0xFF, but that is it. Your _data_,
i.e., the FS contents is not "stuffed with 0xFFs", it is only those
special UBIFS areas.
So, does it really worth doing what you have suggested? Skipping 0xFFed
works just fine. Will the images be really much smaller?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2009-09-29 15:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 21:31 UBIFS and hardware ECC of all FF pages of MLC NAND Darwin Rambo
2009-09-24 13:20 ` Adrian Hunter
2009-09-24 14:51 ` Artem Bityutskiy
2009-09-24 15:36 ` Matthieu CASTET
2009-09-25 7:05 ` Artem Bityutskiy
2009-09-29 13:26 ` Darwin Rambo
2009-09-29 15:42 ` Artem Bityutskiy [this message]
2009-09-29 16:13 ` Darwin Rambo
2009-09-29 16:20 ` Artem Bityutskiy
2009-09-29 17:03 ` Darwin Rambo
2009-10-11 8:39 ` Artem Bityutskiy
2009-10-11 14:38 ` Darwin Rambo
2009-10-11 15:04 ` Artem Bityutskiy
2009-10-11 17:36 ` Darwin Rambo
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=1254238936.3778.109.camel@localhost \
--to=dedekind@infradead.org \
--cc=adrian.hunter@nokia.com \
--cc=drambo@broadcom.com \
--cc=linux-mtd@lists.infradead.org \
--cc=matthieu.castet@parrot.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox