UBIFS power down recovery problem

1616 views
Skip to first unread message

Qiang Yu

unread,
Aug 8, 2013, 4:02:18 AM8/8/13
to linu...@lists.infradead.org, linux...@googlegroups.com
Hi lists,

I'm now testing if UBIFS can survive after power down. After tens of thousands of boot->power cut->boot test circle, the system finally can't boot up. 

I can't understand:
  1. How do some ECC uncorrectable pages appear? According to UBI doc, it will be wrapped to other PEB when one LEB read report UNCLEAN.
  2. How does the "0xef" appear? I dumped out the page, it seems it is protected by the ECC.
I find UBIFS has the unstable bit problem:
Does this cause the problem?

Regards,
Qiang

My hardware:
Allwinner A10 NAND flash controller with NAND flash chip SAMSUNG K9F1G08U0D

Error log (start from UBI):
UBI: attaching mtd3 to ubi0
UBI: scanning is finished
UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 7, need 15
UBI: attached mtd3 (name "rootfs", size 92 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
UBI: good PEBs: 733, bad PEBs: 5, corrupted PEBs: 0
UBI: user volume: 2, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 1155/345, WL threshold: 4096, image sequence number: 0
UBI: available PEBs: 0, total reserved PEBs: 733, PEBs reserved for bad PEB handling: 7
UBI: background thread "ubi_bgt0d" started, PID 28
UBIFS: background thread "ubifs_bgt0_0" started, PID 29
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
UBI warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 210:4096, read only 126976 bytes, retry
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
UBI warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 210:4096, read only 126976 bytes, retry
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
UBI warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 210:4096, read only 126976 bytes, retry
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
UBI error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 210:4096, read 126976 bytes
Backtrace: 
[<c0010f9c>] (dump_backtrace+0x0/0x110) from [<c028bfb4>] (dump_stack+0x18/0x1c)
 r6:0001f000 r5:ffffffb6 r4:d99c9000 r3:c03968c0
[<c028bf9c>] (dump_stack+0x0/0x1c) from [<c01c7c34>] (ubi_io_read+0x1f0/0x2cc)
[<c01c7a44>] (ubi_io_read+0x0/0x2cc) from [<c01c5c24>] (ubi_eba_read_leb+0x274/0x370)
[<c01c59b0>] (ubi_eba_read_leb+0x0/0x370) from [<c01c50e4>] (ubi_leb_read+0xec/0x140)
[<c01c4ff8>] (ubi_leb_read+0x0/0x140) from [<c0100500>] (ubifs_leb_read+0x30/0x90)
 r8:00000001 r7:0001f000 r6:00000001 r5:00000000 r4:d99ddec0
[<c01004d0>] (ubifs_leb_read+0x0/0x90) from [<c0107578>] (ubifs_start_scan+0x84/0x104)
 r7:d99cd000 r6:00000000 r5:dc9bf000 r4:d99ddec0
[<c01074f4>] (ubifs_start_scan+0x0/0x104) from [<c0107874>] (ubifs_scan+0x28/0x2ec)
 r8:d99cd000 r7:d99dd880 r6:dc9bf000 r5:0001f000 r4:00000000
[<c010784c>] (ubifs_scan+0x0/0x2ec) from [<c01069f4>] (ubifs_read_master+0x4c/0x8bc)
[<c01069a8>] (ubifs_read_master+0x0/0x8bc) from [<c00fe7e4>] (ubifs_mount+0xd68/0x1504)
[<c00fda7c>] (ubifs_mount+0x0/0x1504) from [<c008ca00>] (mount_fs+0x1c/0xc0)
[<c008c9e4>] (mount_fs+0x0/0xc0) from [<c00a0a88>] (vfs_kern_mount+0x54/0xbc)
 r6:00008000 r5:d99dd800 r4:d9969300
[<c00a0a34>] (vfs_kern_mount+0x0/0xbc) from [<c00a0dbc>] (do_kern_mount+0x3c/0xd8)
 r8:00008000 r7:d99dd800 r6:00000000 r5:d99dd7c0 r4:c039f508
r3:00000000
[<c00a0d80>] (do_kern_mount+0x0/0xd8) from [<c00a26d0>] (do_mount+0x610/0x68c)
 r8:00000000 r7:00008000 r6:00008000 r5:d99dd800 r4:00000020
r3:00000000
[<c00a20c0>] (do_mount+0x0/0x68c) from [<c00a27f8>] (sys_mount+0x8c/0xcc)
[<c00a276c>] (sys_mount+0x0/0xcc) from [<c0369cf4>] (mount_block_root+0xf0/0x154)
 r7:c038283c r6:00008000 r5:d99cb000 r4:d99cb000
[<c0369c04>] (mount_block_root+0x0/0x154) from [<c036a304>] (prepare_namespace+0x3b4/0x508)
[<c0369f50>] (prepare_namespace+0x0/0x508) from [<c03698f0>] (kernel_init+0x16c/0x1a8)
 r7:c03bca80 r6:c0382814 r5:c0382834 r4:00000007
[<c0369784>] (kernel_init+0x0/0x1a8) from [<c002d528>] (do_exit+0x0/0x660)
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
UBI warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 211:4096, read only 126976 bytes, retry
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
UBI warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 211:4096, read only 126976 bytes, retry
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
UBI warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 211:4096, read only 126976 bytes, retry
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
[MTD][NAND][SUNXI]: ECC too many error at 0
UBI error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 211:4096, read 126976 bytes
Backtrace: 
[<c0010f9c>] (dump_backtrace+0x0/0x110) from [<c028bfb4>] (dump_stack+0x18/0x1c)
 r6:0001f000 r5:ffffffb6 r4:d99c9000 r3:c03968c0
[<c028bf9c>] (dump_stack+0x0/0x1c) from [<c01c7c34>] (ubi_io_read+0x1f0/0x2cc)
[<c01c7a44>] (ubi_io_read+0x0/0x2cc) from [<c01c5c24>] (ubi_eba_read_leb+0x274/0x370)
[<c01c59b0>] (ubi_eba_read_leb+0x0/0x370) from [<c01c50e4>] (ubi_leb_read+0xec/0x140)
[<c01c4ff8>] (ubi_leb_read+0x0/0x140) from [<c0100500>] (ubifs_leb_read+0x30/0x90)
 r8:00000002 r7:0001f000 r6:00000002 r5:00000000 r4:d9a247c0
[<c01004d0>] (ubifs_leb_read+0x0/0x90) from [<c0107578>] (ubifs_start_scan+0x84/0x104)
 r7:d99cd000 r6:00000000 r5:dc9bf000 r4:d9a247c0
[<c01074f4>] (ubifs_start_scan+0x0/0x104) from [<c0107874>] (ubifs_scan+0x28/0x2ec)
 r8:d99cd000 r7:d9a247c0 r6:dc9bf000 r5:0001f000 r4:00000000
[<c010784c>] (ubifs_scan+0x0/0x2ec) from [<c0106a5c>] (ubifs_read_master+0xb4/0x8bc)
[<c01069a8>] (ubifs_read_master+0x0/0x8bc) from [<c00fe7e4>] (ubifs_mount+0xd68/0x1504)
[<c00fda7c>] (ubifs_mount+0x0/0x1504) from [<c008ca00>] (mount_fs+0x1c/0xc0)
[<c008c9e4>] (mount_fs+0x0/0xc0) from [<c00a0a88>] (vfs_kern_mount+0x54/0xbc)
 r6:00008000 r5:d99dd800 r4:d9969300
[<c00a0a34>] (vfs_kern_mount+0x0/0xbc) from [<c00a0dbc>] (do_kern_mount+0x3c/0xd8)
 r8:00008000 r7:d99dd800 r6:00000000 r5:d99dd7c0 r4:c039f508
r3:00000000
[<c00a0d80>] (do_kern_mount+0x0/0xd8) from [<c00a26d0>] (do_mount+0x610/0x68c)
 r8:00000000 r7:00008000 r6:00008000 r5:d99dd800 r4:00000020
r3:00000000
[<c00a20c0>] (do_mount+0x0/0x68c) from [<c00a27f8>] (sys_mount+0x8c/0xcc)
[<c00a276c>] (sys_mount+0x0/0xcc) from [<c0369cf4>] (mount_block_root+0xf0/0x154)
 r7:c038283c r6:00008000 r5:d99cb000 r4:d99cb000
[<c0369c04>] (mount_block_root+0x0/0x154) from [<c036a304>] (prepare_namespace+0x3b4/0x508)
[<c0369f50>] (prepare_namespace+0x0/0x508) from [<c03698f0>] (kernel_init+0x16c/0x1a8)
 r7:c03bca80 r6:c0382814 r5:c0382834 r4:00000007
[<c0369784>] (kernel_init+0x0/0x1a8) from [<c002d528>] (do_exit+0x0/0x660)
UBIFS: recovery needed
UBIFS error (pid 1): ubifs_recover_leb: corrupt empty space LEB 264:12288, corruption starts at 11
UBIFS error (pid 1): ubifs_scanned_corruption: corruption at LEB 264:12299
UBIFS error (pid 1): ubifs_scanned_corruption: first 8192 bytes from LEB 264:12299
00000000: ffffffef ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000060: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000000a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000000c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000000e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000001a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000001c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000001e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000002a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000002c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000002e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000003a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000003c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000003e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000004a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000004c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000004e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000005a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000005c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000005e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000006a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000006c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000006e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000007a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000007c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000007e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000008a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000008c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000008e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000009a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000009c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000009e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001000: ffffffef ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001060: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000010a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000010c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000010e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000011a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000011c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000011e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000012a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000012c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000012e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000013a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000013c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000013e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000014a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000014c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000014e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000015a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000015c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000015e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000016a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000016c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000016e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000017a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000017c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000017e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000018a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000018c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000018e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000019a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000019c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000019e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
UBIFS error (pid 1): ubifs_recover_leb: LEB 264 scanning failed
UBIFS: background thread "ubifs_bgt0_0" stops
devtmpfs: mounted
Freeing init memory: 124K
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
Backtrace: 
[<c0010f9c>] (dump_backtrace+0x0/0x110) from [<c028bfb4>] (dump_stack+0x18/0x1c)
 r6:c0382814 r5:c0382834 r4:c03bca80 r3:00000001
[<c028bf9c>] (dump_stack+0x0/0x1c) from [<c028c184>] (panic+0x7c/0x1b4)
[<c028c108>] (panic+0x0/0x1b4) from [<c028bf78>] (init_post+0xa8/0xcc)
 r3:d9836000 r2:d9853d00 r1:c071da60 r0:c0310d7e
 r7:c03bca80
[<c028bed0>] (init_post+0x0/0xcc) from [<c03698f4>] (kernel_init+0x170/0x1a8)
 r4:00000007 r3:d9401080
[<c0369784>] (kernel_init+0x0/0x1a8) from [<c002d528>] (do_exit+0x0/0x660)

DrOctavius1

unread,
Aug 11, 2013, 12:58:01 PM8/11/13
to linux...@googlegroups.com, linu...@lists.infradead.org
Qiang, 

We are experimenting the same RFS corruption with an A13 Olinuxino board that uses a 4GByte NAND Hynix H27UBG8T2BTR.

We can reproduce the error when we cut the power in the UBI recovery phase.

Reading the UBI webpage and infradead forum, looks like there is no solution at this moment.

How hard is to make work your MTD driver with a JFFS2? if not looks like the only solution for our product is to add an internal battery :(

Leandro
 

Qiang Yu

unread,
Aug 11, 2013, 10:42:00 PM8/11/13
to linux...@googlegroups.com
Hi Leandro,

I'm not familiar with JFFS2. Now the limitation of my driver is it
can't be used by a file system which uses OOB to store some of its
infomation.
I know YAFFS will use OOB, so my driver can't be used with it. If
JFFS2 doesn't use OOB, it can be used with my driver.

Regards,
Qiang
> --
> You received this message because you are subscribed to the Google Groups
> "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to linux-sunxi...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Runzhong Yi

unread,
Aug 12, 2013, 1:18:26 AM8/12/13
to linux...@googlegroups.com
JFFS2 maybe too slow to boot up since your file system is as big as
4GB. YAFFS is not really a journaled file system and will not survive
power cut.

2013/8/12 Qiang Yu <yuq...@gmail.com>:

Dmitriy B.

unread,
Aug 12, 2013, 7:03:28 AM8/12/13
to linux...@googlegroups.com
2013/8/8 Qiang Yu <yuq...@gmail.com>
Hi lists,

I'm now testing if UBIFS can survive after power down. After tens of thousands of boot->power cut->boot test circle, the system finally can't boot up. 

Hi Qiang!

I posted this in one of the threads discussiing MTD. I have exact same problem, but with even smaller timeframe: my UBIFS dies after one or two reboots. After many hours of debugging, I finally figured out that the problem is in bad block detection: for some unknown reason, UBIFS uses bad blocks at the end of the NAND as good ones, eventually something gets written there and UBIFS cant recover. So all I did was just limit the MTD partition to not include the last blocks and it started working again. Could you please check for sure if after new UBIFS system you dont have same errors on exact same block number/PEB? Because in my case they were always same.

About your problem, first, in your own log you dont have enough PEBs for recovery:

UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 7, need 15

This directly means that you cant recover bad PEB if you will meet one.

Next, you already have 5 dead PEBs:

UBI: good PEBs: 733, bad PEBs: 5, corrupted PEBs: 0

And:

UBI: max/mean erase counter: 1155/345, WL threshold: 4096 
 
You have some blocks with erase counter going to 1000, can you please check if this count of rewrites is ok for your NAND chip? May be WL (Wear leveling) threshhold needs to be significantly lower? Or you did many tests with this NAND and did reset erase counter each time you made UBI partition, so real erase counter can be even worse? Also about this, if I remember correctly, mtd-nand-sunxi does not enable random by default, on MLC nand that you use (and many other big NANDs) random is always needed.

Hope this helps, please, keep in touch with linux-sunxi ML if you will find solution, many guys are interested in working UBIFS.

Best Regards,
Dmitriy Beykun

Qiang Yu

unread,
Aug 12, 2013, 10:46:20 PM8/12/13
to linux...@googlegroups.com
Hi Dmitriy,

Thanks for your help, I'll check latter. I'm afraid my problem is
caused by power cut, but can't exclude the reason of miss configuring
the UBI&UBIFS.

I've updated my driver with random read/write, but not enabled by
default. This is because two problems:
1. read from fresh erased page when random enabled return not all 0xff
2. read only OOB either when random is enabled or disabled return wrong data

Regards,
Qiang

Henrik Nordström

unread,
Aug 15, 2013, 3:51:29 PM8/15/13
to linux...@googlegroups.com
tis 2013-08-13 klockan 10:46 +0800 skrev Qiang Yu:
> I've updated my driver with random read/write, but not enabled by
> default. This is because two problems:
> 1. read from fresh erased page when random enabled return not all 0xff

Yes. You need to temporarily turn of randomizer and HW ECC and read the
page again to check if it is just an empty page.

> 2. read only OOB either when random is enabled or disabled return wrong data

probably right. with HW ECC enabled you should not read or write OOB
directly, it is managed by the ECC controller. Use the user_data field
filled in by the ECC controller, one byte (or was it word?) per
transferred sector IIRC. Yes this means you need to read sector data to
access corresponding OOB part.

There is also a separate ECC(1) command mode for accessing only ECC part
of a sector, but not 100% sure how to properly use this and until better
understood I recommend using the normal PAGE(2) command mode even if
only interested in the OOB data.

For non-ECC pages OOB data can be read as-is, with randomizer and HW ECC
disabled.

Regards
Henrik

Reply all
Reply to author
Forward
0 new messages