ubifs crash with two cases( switched to readonly, recover fail )
안녕하세요. 박원호 책임님.
아래 지난 mtd site로부터 답장 받은 메일 공유 드립니다.
ubifs에 문제가 발생하여 아래와 같이 메일로 linux mtd사이트에 문의해 보았는데요...
무슨 내용인지는 아직 잘 모르겠는데... 아래와 같이 담당자에게 답장이 왔습니다.
일단 공유 드립니다.
On Wed, 2012-08-29 at 02:18 +0000, 이양우 wrote: > .... > [ 5.965000] UBI error: ubi_io_read: error -74 while reading 68 > bytes from PEB 385:2776, read 68 bytes Looks like your flash cannot read non-512-bytes-aligned data chunks. Check your NAND driver. Try to run mtd tests: http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests -- Best Regards, Artem Bityutskiy ------- Original Message -------
Sender: 이양우<[email protected]> S4(선임)/선임/PRT S/W Platform Lab(IT)/삼성전자
Date: 2012-08-29 11:18 (GMT+09:00)
Title: ubifs crash with two cases( switched to readonly, recover fail )
I'm facing some problem of file system crash.
This error happen very some times(about 3%) and seems happen on boot time after power cut.
Anyone tell me that how to fix it. Do I need additional patch?
I'm using ubifs on 512M raw flash device(SLC) and using kernel 2.6.35 with some ubifs patches.
applied patches
1. [PATCH] UBIFS: fix debugging failure in dbg_check_space_info
http://lists.infradead.org/pipermail/linux-mtd/2011-April/034692.html
2. Oops when calling fsync on read-only file-system
http://lists.infradead.org/pipermail/linux-mtd/2011-April/034884.html
3.[PATCH] UBIFS: handle allocation failures in UBIFS write path
http://lists.infradead.org/pipermail/linux-mtd/2011-March/034286.html
4. [PATCH] [93/106] UBIFS: fix master node recovery
http://lkml.indiana.edu/hypermail/linux/kernel/1104.3/01215.html
5. Patchwork ubi : kernel panic on erroneous block
http://patchwork.ozlabs.org/patch/61368/
<crash case 1>
[ 1.750000] UBI: attaching mtd5 to ubi1
[ 1.755000] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 1.760000] UBI: logical eraseblock size: 129024 bytes
[ 1.765000] UBI: smallest flash I/O unit: 2048
[ 1.770000] UBI: sub-page size: 512
[ 1.775000] UBI: VID header offset: 512 (aligned 512)
[ 1.780000] UBI: data offset: 2048
[ 2.075000] UBI: attached mtd5 to ubi1
[ 2.080000] UBI: MTD device name: "Android RW"
[ 2.085000] UBI: MTD device size: 150 MiB
[ 2.090000] UBI: number of good PEBs: 1200
[ 2.095000] UBI: number of bad PEBs: 0
[ 2.100000] UBI: max. allowed volumes: 128
[ 2.105000] UBI: wear-leveling threshold: 4096
[ 2.110000] UBI: number of internal volumes: 1
[ 2.110000] UBI: number of user volumes: 1
[ 2.115000] UBI: available PEBs: 0
[ 2.120000] UBI: total number of reserved PEBs: 1200
[ 2.125000] UBI: number of PEBs reserved for bad PEB handling: 24
[ 2.130000] UBI: max/mean erase counter: 24/9
[ 2.135000] UBI: image sequence number: 0
[ 2.140000] UBI: background thread "ubi_bgt1d" started, PID 1746
[ 2.195000] UBIFS: recovery needed
[ 2.225000] UBIFS: recovery completed
[ 2.230000] UBIFS: mounted UBI device 1, volume 0, name "rootfs"
[ 2.235000] UBIFS: file system size: 149796864 bytes (146286 KiB, 142 MiB, 1161 LEBs)
[ 2.240000] UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
[ 2.245000] UBIFS: media format: w4/r0 (latest is w4/r0)
[ 2.250000] UBIFS: default compressor: lzo
[ 2.255000] UBIFS: reserved for root: 0 bytes (0 KiB)
[ 2.335000] UBI error: ubi_io_read: error -74 while reading 128 bytes from PEB 385:3280, read 128 bytes [ 2.400000] UBI error: ubi_io_read: error -74 while reading 128 bytes from PEB 385:3152, read 128 bytes
....
[ 5.965000] UBI error: ubi_io_read: error -74 while reading 68 bytes from PEB 385:2776, read 68 bytes [ 5.975000] UBIFS error (pid 1863): ubifs_check_node: bad CRC: calculated 0x6ef6c81c, read 0x2ef6c81c [ 5.980000] UBIFS error (pid 1863): ubifs_check_node: bad node at LEB 22:728
[ 5.990000] UBIFS error (pid 1863): ubifs_read_node: expected node type 9
[ 6.000000] UBIFS warning (pid 1863): ubifs_ro_mode: switched to read-only mode, error -117
[ 6.010000] [<c002c560>] (unwind_backtrace+0x0/0x164) from [<c019f174>] (ubifs_ro_mode+0x5c/0x78)
[ 6.015000] [<c019f174>] (ubifs_ro_mode+0x5c/0x78) from [<c01a8470>] (ubifs_garbage_collect+0x2c8/0x328) [ 6.025000] [<c01a8470>] (ubifs_garbage_collect+0x2c8/0x328) from [<c01960a4>] (make_reservation+0x100/0x34c) [ 6.035000] [<c01960a4>] (make_reservation+0x100/0x34c) from [<c0196988>] (ubifs_jnl_write_data+0x114/0x1f8) [ 6.040000] [<c0196988>] (ubifs_jnl_write_data+0x114/0x1f8) from [<c01986cc>] (do_writepage+0x84/0x174) [ 6.050000] [<c01986cc>] (do_writepage+0x84/0x174) from [<c0084e68>] (__writepage+0x14/0x5c)
[ 6.060000] [<c0084e68>] (__writepage+0x14/0x5c) from [<c0085600>] (write_cache_pages+0x254/0x354)
[ 6.105000] [<c0085600>] (write_cache_pages+0x254/0x354) from [<c007fe18>] (__filemap_fdatawrite_range+0x60/0x68) [ 6.125000] [<c007fe18>] (__filemap_fdatawrite_range+0x60/0x68) from [<c007fe54>] (filemap_write_and_wait_range+0x34/0x68) [ 6.130000] [<c007fe54>] (filemap_write_and_wait_range+0x34/0x68) from [<c00caa70>] (vfs_fsync_range+0x34/0x7c) [ 6.155000] [<c00caa70>] (vfs_fsync_range+0x34/0x7c) from [<c00cab50>] (vfs_fsync+0x20/0x28)
[ 6.170000] [<c00cab50>] (vfs_fsync+0x20/0x28) from [<c00cab78>] (do_fsync+0x20/0x34)
[ 6.180000] [<c00cab78>] (do_fsync+0x20/0x34) from [<c00267c0>] (ret_fast_syscall+0x0/0x30)
<crash case 2>
[ 1.840000] UBI: attaching mtd5 to ubi1
[ 1.840000] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 1.845000] UBI: logical eraseblock size: 129024 bytes
[ 1.850000] UBI: smallest flash I/O unit: 2048
[ 1.855000] UBI: sub-page size: 512
[ 1.855000] UBI: VID header offset: 512 (aligned 512)
[ 1.860000] UBI: data offset: 2048
[ 2.165000] UBI: attached mtd5 to ubi1
[ 2.170000] UBI: MTD device name: "Android RW"
[ 2.175000] UBI: MTD device size: 150 MiB
[ 2.180000] UBI: number of good PEBs: 1200
[ 2.185000] UBI: number of bad PEBs: 0
[ 2.190000] UBI: max. allowed volumes: 128
[ 2.195000] UBI: wear-leveling threshold: 4096
[ 2.200000] UBI: number of internal volumes: 1
[ 2.205000] UBI: number of user volumes: 1
[ 2.210000] UBI: available PEBs: 0
[ 2.215000] UBI: total number of reserved PEBs: 1200
[ 2.220000] UBI: number of PEBs reserved for bad PEB handling: 24
[ 2.225000] UBI: max/mean erase counter: 104/16
[ 2.230000] UBI: image sequence number: 0
[ 2.230000] UBI: background thread "ubi_bgt1d" started, PID 1746
[ 2.280000] UBIFS: recovery needed
[ 2.400000] UBIFS error (pid 1747): ubifs_recover_leb: corrupt empty space LEB 189:83968, corruption starts at 2048 [ 2.405000] UBIFS error (pid 1747): ubifs_scanned_corruption: corruption at LEB 189:2048
[ 2.415000] UBIFS error (pid 1747): ubifs_recover_leb: LEB 189 scanning failed
Lee, Yang-Woo
S/W R&D Group 2
Digital Printing Division
Digital Media Business
SAMSUNG ELECTRONICS CO.,LTD
TEL : 82-31-277-9248
[email protected]
Lee, Yang-Woo
S/W R&D Group 2
Digital Printing Division
Digital Media Business
SAMSUNG ELECTRONICS CO.,LTD
TEL : 82-31-277-9248
[email protected]