[PATCH] UBI: optimize vid-header IO read checks
Gupta, Pekon
pekon at ti.com
Thu May 16 03:49:28 EDT 2013
> On Thu, 2013-05-16 at 06:38 +0000, Gupta, Pekon wrote:
> > Hi,
> >
> > Requesting feedbacks/comments on this one too ?
> > This should be independent of previous one..
>
> How did you test this change? Did you test that we do not die in
> scanning in case of bit-flips? How about ECC errors? Do we scrub
> eraseblocks then?
>
Hi,
Attaching the logs for tests I ran to for ec_hdr patch. Added
following printk to cross-check the result.
- printk in scan_peb() to check return values of ubi_io_read_ec_hdr()
- printk in scan_peb() to check return values of ubi_io_read_vid_hdr()
- printk in do_sync_erase() to check if bit-flipped PEB is scrubbed
s/*UBI in attached logs..
Test 1: introduced correctable bit-flips in ec_header of PEB=1
- Observations:
- UBI: fixable bit-flip detected at PEB 1
*UBI:ubi_io_read_ec_hdr: PEB=1, OK
*UBI:scan_peb: PEB=1: ec_hdr=UBI_IO_BITFLIPS
*UBI:scan_peb: PEB=1: ec_hdr acceptable
*UBI:scan_peb: PEB=1: vid_hdr=UBI_IO_FF
- PEB 1 scubbed
*UBI:do_sync_erase: PEB=1 erasing ..
*UBI:ubi_io_sync_erase: PEB=1: erase successful> --
- UBIFS: mounted UBI device 0, volume 0, name "test"
Test 2: introduced un-correctable bit-flips in ec_header of PEB=1
-Observations:
- warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1:0
<stack_dump>
*UBI:ubi_io_read_ec_hdr: PEB=1, EBADMSG
*UBI:scan_peb: PEB=1: ec_hdr=UBI_IO_BAD_HDR_EBADMSG
- vid_hdr not parsed due to reasons below (un-correctable bit-flips)
+ /* un=recoverable erase-header
+ * unknown erase-count: can be set to mean erase-count.
+ * unknown image_seq: cannot determine if PEB was programmed
+ * unknown version: cannot determine UBI protocol to use
+ * So no point in checking vid_hdr, schedule this PEB for erase. */
- PEB 1 scrubbed
*UBI:do_sync_erase: PEB=1 erasing ..
*UBI:ubi_io_sync_erase: PEB=1: erase successful
- UBIFS: mounted UBI device 0, volume 0, name "test"
Test 3: Normal case without any bit-flip
- Observations
- Both ec_hdr and vid_hdr scanned ok
*UBI:scan_peb: PEB=1: ec_hdr=OK
*UBI:scan_peb: PEB=1: ec_hdr acceptable
*UBI:scan_peb: PEB=1: vid_hdr=UBI_IO_FF
- no scrubbing required, volume mounted.
- UBIFS: mounted UBI device 0, volume 0, name "test"
Hope that helps in understanding the attached logs..
(1) Request you to review the tables in patch description, in case I missed
any corner case.
(2) Also if you would like me to check any scenario explicitly.
(3) I have similar results for vid_hdr patch, I'll share it separately.
with regards, pekon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nand_ubi_optimization.tgz
Type: application/x-compressed
Size: 20491 bytes
Desc: nand_ubi_optimization.tgz
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20130516/52885fc3/attachment-0001.bin>
More information about the linux-mtd
mailing list