Other Parts Discussed in Thread: TEST2
I have a problem to replace the AM335XEVM board SLC flash with a 16G bit MLC flash.
After modify the code in u-boot and linux, the linux system can now boot with the flash,
and the ti test program runs fine.
There is no problem to copy the files in ubifs partition to sd card.
I can create directory and copy files less than 100MB to the ubifs partition without problem. But if I copy larger amount of data (200M) to the partition,
problem occurs.
I have run the nandtest on that partition and there is no problem found.
Can anyone help me?
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd5 (Samsung NAND 2GiB 3,3V 8-bit)
2048 MiB HW ECC BCH8
root@am335x-evm:~# nandtest /dev/mtd4
ECC corrections: 0
ECC failures : 0
Bad blocks : 2
BBT blocks : 0
00a00000: reading...
ECC corrected at 00a00000
02200000: reading...
ECC corrected at 02200000
07b80000: reading...
ECC corrected at 07b80000
1cc80000: reading...
ECC corrected at 1cc80000
21080000: reading...
ECC corrected at 21080000
26b00000: reading...
ECC corrected at 26b00000
3dd80000: checking...
4e200000: reading...
ECC corrected at 4e200000
4f680000: reading...
ECC corrected at 4f680000
Bad block at 0x58900000
Bad block at 0x59880000
5be00000: reading...
ECC corrected at 5be00000
5da80000: reading...
ECC corrected at 5da80000
60d80000: reading...
ECC corrected at 60d80000
61e80000: reading...
ECC corrected at 61e80000
6cb80000: reading...
ECC corrected at 6cb80000
74580000: reading...
ECC corrected at 74580000
7d180000: reading...
ECC corrected at 7d180000
7e180000: reading...
ECC corrected at 7e180000
7ef80000: checking...
Finished pass 1 successfully
sudo mkfs.ubifs -r rootfs.s/ -o ubifs.img -m 4096 -e 504KiB -c 2047 -R 100
ubinize -o ubi.img -m 4096 -p 512KiB -s 4096 -O 4096 ubinize.cfg
ubiformat /dev/mtd4 -f rootfs.img -s 4096 -O 4096
ubiattach /dev/ubi_ctrl -m 4 -O 4096
mount -t ubifs ubi0_0 /mnt/cf
cp /mnt/cf/* /mnt/sd/ -aRf =====> works fine without problem
mkdir /mnt/cf/test
cp /usr/share/ti/video/* /mnt/cf/test/
sync ==>this time ok without problem
mkdir /mnt/cf/test2
cp /usr/share/ti/video/* /mnt/cf/test/
sync ==>this time issue rise the follwing log are showed on screen
[ 258.317260] UBI error: ubi_io_write: error -5 while writing 4096 bytes to PEB 47:12288, written 0 bytes
[ 258.327239] Backtrace:
[ 258.329864] [<c00178f8>] (dump_backtrace+0x0/0x110) from [<c040c990>] (dump_stack+0x18/0x1c)
[ 258.338775] r6:0000002f r5:00003000 r4:ce597800 r3:c05d8be8
[ 258.344787] [<c040c978>] (dump_stack+0x0/0x1c) from [<c026d1e4>] (ubi_io_write+0x428/0x494)
[ 258.353576] [<c026cdbc>] (ubi_io_write+0x0/0x494) from [<c026957c>] (ubi_eba_write_leb+0xa4/0x90c)
[ 258.363037] [<c02694d8>] (ubi_eba_write_leb+0x0/0x90c) from [<c02682b0>] (ubi_leb_write+0x12c/0x154)
[ 258.372680] [<c0268184>] (ubi_leb_write+0x0/0x154) from [<c017597c>] (ubifs_leb_write+0xcc/0x150)
[ 258.382049] [<c01758b0>] (ubifs_leb_write+0x0/0x150) from [<c0176d5c>] (ubifs_wbuf_write_nolock+0x1b0/0x908)
[ 258.392395] [<c0176bac>] (ubifs_wbuf_write_nolock+0x0/0x908) from [<c0169454>] (ubifs_jnl_write_data+0x1b8/0x314)
[ 258.403228] [<c016929c>] (ubifs_jnl_write_data+0x0/0x314) from [<c016be44>] (do_writepage+0xa0/0x200)
[ 258.412963] [<c016bda4>] (do_writepage+0x0/0x200) from [<c016c090>] (ubifs_writepage+0xec/0x1f4)
[ 258.422241] [<c016bfa4>] (ubifs_writepage+0x0/0x1f4) from [<c00801e0>] (__writepage+0x1c/0x64)
[ 258.431304] [<c00801c4>] (__writepage+0x0/0x64) from [<c0080970>] (write_cache_pages+0x208/0x3d4)
[ 258.440643] r4:ffffffff r3:c00801c4
[ 258.444458] [<c0080768>] (write_cache_pages+0x0/0x3d4) from [<c0080b88>] (generic_writepages+0x4c/0x64)
[ 258.454345] [<c0080b3c>] (generic_writepages+0x0/0x64) from [<c0081bb4>] (do_writepages+0x3c/0x40)
[ 258.463775] r5:cfa4b088 r4:cf6cc048
[ 258.467590] [<c0081b78>] (do_writepages+0x0/0x40) from [<c00c5e04>] (writeback_single_inode+0xac/0x2c4)
[ 258.477478] [<c00c5d58>] (writeback_single_inode+0x0/0x2c4) from [<c00c637c>] (writeback_sb_inodes+0x1d8/0x2dc)
[ 258.488098] r8:cfbd0200 r7:cfa4b0c0 r6:ce55ff34 r5:cfa4b088 r4:cf6cc048
[ 258.494995] r3:00000400
[ 258.497772] [<c00c61a4>] (writeback_sb_inodes+0x0/0x2dc) from [<c00c655c>] (__writeback_inodes_wb+0xdc/0x114)
[ 258.508239] [<c00c6480>] (__writeback_inodes_wb+0x0/0x114) from [<c00c6760>] (wb_writeback+0x1cc/0x1dc)
[ 258.518127] [<c00c6594>] (wb_writeback+0x0/0x1dc) from [<c00c6d88>] (wb_do_writeback+0x124/0x1e4)
[ 258.527496] [<c00c6c64>] (wb_do_writeback+0x0/0x1e4) from [<c00c6ed4>] (bdi_writeback_thread+0x8c/0x16c)
[ 258.537506] [<c00c6e48>] (bdi_writeback_thread+0x0/0x16c) from [<c0054578>] (kthread+0x90/0x94)
[ 258.546691] [<c00544e8>] (kthread+0x0/0x94) from [<c003ecd4>] (do_exit+0x0/0x67c)
[ 258.554565] r6:c003ecd4 r5:c00544e8 r4:cf88ff18
[ 258.564422] UBI warning: ubi_eba_write_leb: failed to write data to PEB 47
[ 258.702911] UBI: recover PEB 47, move data to PEB 2092
[ 258.982696] UBI: data was successfully recovered
[ 259.256042] UBI: run torture test for PEB 47
[ 259.801269] UBI error: ubi_io_write: error -5 while writing 524288 bytes to PEB 47:0, written 413696 bytes
[ 259.811462] Backtrace:
[ 259.814086] [<c00178f8>] (dump_backtrace+0x0/0x110) from [<c040c990>] (dump_stack+0x18/0x1c)
[ 259.822967] r6:0000002f r5:00000000 r4:ce597800 r3:c05d8bc8
[ 259.828979] [<c040c978>] (dump_stack+0x0/0x1c) from [<c026d1e4>] (ubi_io_write+0x428/0x494)
[ 259.837768] [<c026cdbc>] (ubi_io_write+0x0/0x494) from [<c026d640>] (ubi_io_sync_erase+0x11c/0x2b8)
[ 259.847320] [<c026d524>] (ubi_io_sync_erase+0x0/0x2b8) from [<c026ea04>] (erase_worker+0xdc/0x688)
[ 259.856781] [<c026e928>] (erase_worker+0x0/0x688) from [<c026df40>] (do_work+0x7c/0xf0)
[ 259.865234] [<c026dec4>] (do_work+0x0/0xf0) from [<c026f858>] (ubi_thread+0xf0/0x190)
[ 259.873474] r6:ce597c70 r5:ce597800 r4:cecb4000 r3:00000003
[ 259.879455] [<c026f768>] (ubi_thread+0x0/0x190) from [<c0054578>] (kthread+0x90/0x94)
[ 259.887725] [<c00544e8>] (kthread+0x0/0x94) from [<c003ecd4>] (do_exit+0x0/0x67c)
[ 259.895629] r6:c003ecd4 r5:c00544e8 r4:cfa53e48
<7>[ 260.387481] 000622e0: a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 a5 ................................
[ 260.512451] UBI error: erase_worker: failed to erase PEB 47, error -5
[ 260.519226] UBI: mark PEB 47 as bad
[ 260.524230] UBI: 39 PEBs left in the reserve
mkdir /mnt/cf/test2
cp /usr/share/ti/video/* /mnt/cf/test/
sync ==>this time more error displayed.
[ 739.433227] UBI error: erase_worker: failed to erase PEB 2207, error -5
[ 739.440216] UBI: mark PEB 2207 as bad
[ 739.444091] UBI error: ubi_io_mark_bad: read-only mode
[ 739.449493] UBI error: do_work: work failed with error code -30
[ 739.455749] UBI error: ubi_thread: ubi_bgt0d: work failed with error code -30
[ 739.464752] UBIFS error (pid 2149): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
[ 739.474426] UBIFS error (pid 2149): ubifs_write_inode: can't write inode 4892, error -30
[ 739.483184] UBIFS error (pid 2149): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
[ 739.492858] UBIFS error (pid 2149): ubifs_write_inode: can't write inode 4893, error -30
[ 739.501403] UBIFS error (pid 2149): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
[ 739.511047] UBIFS error (pid 2149): ubifs_write_inode: can't write inode 4894, error -30
[ 739.519592] UBIFS error (pid 2149): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
[ 739.529205] UBIFS error (pid 2149): ubifs_write_inode: can't write inode 4895, error -30
[ 739.537750] UBIFS error (pid 2149): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
[ 739.547393] UBIFS error (pid 2149): ubifs_write_inode: can't write inode 4896, error -30
[ 739.555938] UBIFS error (pid 2149): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
[ 739.565551] UBIFS error (pid 2149): ubifs_write_inode: can't write inode 4897, error -30
[ 739.574798] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 739.584564] UBIFS error (pid 2149): do_writepage: cannot write page 14 of inode 4890, error -30
[ 739.594055] UBIFS error (pid 2149): make_reservation: cannot reserve 2315 bytes in jhead 2, error -30
[ 739.603790] UBIFS error (pid 2149): do_writepage: cannot write page 1 of inode 4891, error -30
[ 739.613220] UBIFS error (pid 2149): make_reservation: cannot reserve 3471 bytes in jhead 2, error -30
[ 739.622955] UBIFS error (pid 2149): do_writepage: cannot write page 1 of inode 4892, error -30
[ 739.632415] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 739.642150] UBIFS error (pid 2149): do_writepage: cannot write page 1 of inode 4893, error -30
[ 739.651428] UBIFS error (pid 2149): make_reservation: cannot reserve 1540 bytes in jhead 2, error -30
[ 739.661163] UBIFS error (pid 2149): do_writepage: cannot write page 1 of inode 4894, error -30
[ 739.670501] UBIFS error (pid 2149): make_reservation: cannot reserve 2686 bytes in jhead 2, error -30
[ 739.680206] UBIFS error (pid 2149): do_writepage: cannot write page 1 of inode 4895, error -30
[ 739.689605] UBIFS error (pid 2149): make_reservation: cannot reserve 3481 bytes in jhead 2, error -30
[ 739.699340] UBIFS error (pid 2149): do_writepage: cannot write page 1 of inode 4896, error -30
[ 739.708679] UBIFS error (pid 2149): make_reservation: cannot reserve 2889 bytes in jhead 2, error -30
[ 739.718414] UBIFS error (pid 2149): do_writepage: cannot write page 1 of inode 4897, error -30
[ 739.727874] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 739.737609] UBIFS error (pid 2149): do_writepage: cannot write page 15 of inode 4890, error -30
[ 739.747131] UBIFS error (pid 2149): make_reservation: cannot reserve 3687 bytes in jhead 2, error -30
[ 739.756835] UBIFS error (pid 2149): do_writepage: cannot write page 2 of inode 4891, error -30
[ 739.766296] UBIFS error (pid 2149): make_reservation: cannot reserve 3834 bytes in jhead 2, error -30
[ 739.776031] UBIFS error (pid 2149): do_writepage: cannot write page 2 of inode 4892, error -30
[ 739.785491] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 739.795227] UBIFS error (pid 2149): do_writepage: cannot write page 2 of inode 4893, error -30
[ 739.804595] UBIFS error (pid 2149): make_reservation: cannot reserve 3094 bytes in jhead 2, error -30
[ 739.814331] UBIFS error (pid 2149): do_writepage: cannot write page 2 of inode 4894, error -30
[ 739.823760] UBIFS error (pid 2149): make_reservation: cannot reserve 4067 bytes in jhead 2, error -30
[ 739.833496] UBIFS error (pid 2149): do_writepage: cannot write page 2 of inode 4895, error -30
[ 739.842895] UBIFS error (pid 2149): make_reservation: cannot reserve 3865 bytes in jhead 2, error -30
[ 739.852630] UBIFS error (pid 2149): do_writepage: cannot write page 2 of inode 4896, error -30
[ 739.862030] UBIFS error (pid 2149): make_reservation: cannot reserve 3635 bytes in jhead 2, error -30
[ 739.871765] UBIFS error (pid 2149): do_writepage: cannot write page 2 of inode 4897, error -30
[ 739.881195] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 739.890899] UBIFS error (pid 2149): do_writepage: cannot write page 16 of inode 4890, error -30
[ 739.900451] UBIFS error (pid 2149): make_reservation: cannot reserve 4076 bytes in jhead 2, error -30
[ 739.910186] UBIFS error (pid 2149): do_writepage: cannot write page 3 of inode 4891, error -30
[ 739.919647] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 739.929382] UBIFS error (pid 2149): do_writepage: cannot write page 3 of inode 4892, error -30
[ 739.938842] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 739.948608] UBIFS error (pid 2149): do_writepage: cannot write page 3 of inode 4893, error -30
[ 739.958038] UBIFS error (pid 2149): make_reservation: cannot reserve 3549 bytes in jhead 2, error -30
[ 739.967773] UBIFS error (pid 2149): do_writepage: cannot write page 3 of inode 4894, error -30
[ 739.977172] UBIFS error (pid 2149): make_reservation: cannot reserve 3710 bytes in jhead 2, error -30
[ 739.986907] UBIFS error (pid 2149): do_writepage: cannot write page 3 of inode 4895, error -30
[ 739.996337] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 740.006072] UBIFS error (pid 2149): do_writepage: cannot write page 3 of inode 4896, error -30
[ 740.015533] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 740.025268] UBIFS error (pid 2149): do_writepage: cannot write page 3 of inode 4897, error -30
[ 740.034698] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 740.044403] UBIFS error (pid 2149): do_writepage: cannot write page 17 of inode 4890, error -30
[ 740.053955] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 740.063690] UBIFS error (pid 2149): do_writepage: cannot write page 4 of inode 4891, error -30
[ 740.073181] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 740.082916] UBIFS error (pid 2149): do_writepage: cannot write page 4 of inode 4892, error -30
[ 740.092376] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error -30
[ 740.102111] UBIFS error (pid 2149): do_writepage: cannot write page 4 of inode 4893, error -30
[ 740.111541] UBIFS error (pid 2149): make_reservation: cannot reserve 3921 bytes in jhead 2, error -30
[ 740.121276] UBIFS error (pid 2149): do_writepage: cannot write page 4 of inode 4894, error -30
[ 740.130737] UBIFS error (pid 2149): make_reservation: cannot reserve 4058 bytes in jhead 2, error -30
[ 740.140441] UBIFS error (pid 2149): do_writepage: cannot write page 4 of inode 4895, error -30
[ 740.149902] UBIFS error (pid 2149): make_reservation: cannot reserve 4144 bytes in jhead 2, error