UBIFS mount fail after power off
wang.bo116 at zte.com.cn
wang.bo116 at zte.com.cn
Wed Aug 21 04:04:57 EDT 2013
Hi,
After reboot during do write test in UBIFS,when mount UBIFS again, ubifs mount fail.
The kernel version is 2.6.32, and UBIFS has already merge recent patchs. Unfortunate the flash image is lose.
The kernel logs are below:
0:<5>UBI: attaching mtd0 to ubi0
0:<7>UBI DBG (pid 800): ubi_attach_mtd_dev: sizeof(struct ubi_ainf_peb) 56
0:<7>UBI DBG (pid 800): ubi_attach_mtd_dev: sizeof(struct ubi_wl_entry) 32
0:<7>UBI DBG (pid 800): io_init: min_io_size 1
0:<7>UBI DBG (pid 800): io_init: hdrs_min_io_size 1
0:<7>UBI DBG (pid 800): io_init: ec_hdr_alsize 64
0:<7>UBI DBG (pid 800): io_init: vid_hdr_alsize 64
0:<7>UBI DBG (pid 800): io_init: vid_hdr_offset 64
0:<7>UBI DBG (pid 800): io_init: vid_hdr_aloffset 64
0:<7>UBI DBG (pid 800): io_init: vid_hdr_shift 0
0:<7>UBI DBG (pid 800): io_init: leb_start 128
0:<7>UBI DBG (pid 800): io_init: max_erroneous 371
0:<5>UBI: physical eraseblock size: 131072 bytes (128 KiB)
0:<5>UBI: logical eraseblock size: 130944 bytes
0:<5>UBI: smallest flash I/O unit: 1
0:<5>UBI: VID header offset: 64 (aligned 64)
0:<5>UBI: data offset: 128
0:<7>UBI DBG (pid 800): scan_all: scanning is finished
0:<5>UBI: max. sequence number: 438012
0:<4>UBI warning: process_lvol: volume table copy #1 is corrupted
0:<5>UBI: create volume table (copy #1)
0:<5>UBI: volume table was restored
0:<5>UBI: attached mtd0 to ubi0
0:<5>UBI: MTD device name: "UBI"
0:<5>UBI: MTD device size: 464 MiB
0:<5>UBI: number of good PEBs: 3712
0:<5>UBI: number of bad PEBs: 0
0:<5>UBI: number of corrupted PEBs: 0
0:<5>UBI: max. allowed volumes: 128
0:<5>UBI: wear-leveling threshold: 4096
0:<5>UBI: number of internal volumes: 1
0:<5>UBI: number of user volumes: 1
0:<5>UBI: available PEBs: 1025
0:<5>UBI: total number of reserved PEBs: 2687
0:<5>UBI: number of PEBs reserved for bad PEB handling: 0
0:<5>UBI: max/mean erase counter: 1056/228
0:<5>UBI: image sequence number: 0
0:<5>UBI: background thread "ubi_bgt0d" started, PID 814
UBI device number 0, total 3712 LEBs (486064128 bytes, 463.5 MiB), available 1025 LEBs (13421760 0:<7>UBIFS DBG (pid 816): ubifs_bg_thread: background thread "ubifs_bgt0_0" started, PID 816
0 bytes, 128.0 MiB), LEB size 130944 bytes (127.9 KiB)
[BOARD_CTRL|INFO ] volume "ubi0_0" is already existed!.
0:<5>UBIFS: recovery needed
0:<3>UBIFS error (pid 800): ubifs_read_node: bad node type (255 but expected 9)
0:<3>UBIFS error (pid 800): ubifs_read_node: bad node at LEB 447:102944, LEB mapping status 0
0:<3>Not a node, first 24 bytes: 0:<3>00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........................
0:Call Trace:
0:[<ffffffffc146d218>] dump_stack+0x1c/0x50
0:[<ffffffffc11f19f0>] ubifs_read_node+0x1f8/0x318
0:[<ffffffffc121596c>] ubifs_load_znode+0xac/0x6b0
0:[<ffffffffc11f391c>] lookup_level0_dirty+0x184/0x2b8
0:[<ffffffffc11f6b5c>] ubifs_tnc_add+0x6c/0x158
0:[<ffffffffc11fb084>] ubifs_replay_journal+0xddc/0x1678
0:[<ffffffffc11ece4c>] ubifs_get_sb+0xf64/0x1b48
0:[<ffffffffc1124efc>] vfs_kern_mount+0x64/0x100
0:[<ffffffffc1125028>] do_kern_mount+0x58/0x150
0:[<ffffffffc114753c>] do_mount+0x1f4/0x840
0:[<ffffffffc117a6bc>] compat_sys_mount+0xac/0x298
0:[<ffffffffc102eb24>] handle_sysn32+0x44/0x88
0:
0:<7>UBIFS DBG (pid 816): ubifs_bg_thread: background thread "ubifs_bgt0_0" stops
---------------------------------------------------------------------------------------------------
I think a possible reason is one index-LEB(447) is been incorrect unmaped(LEB mapping status 0). But i don not know how this can happen.
UBIFS always reserve old index nodes for recovery, until the commit is success, so when an unclean reboot happen duringcommit ,
i think the old index always can be find in the next mount.
In additon, the log show that the UBI's volume table 1 is been destroy, if the unclean reboot happen in write volume table,
is there some reason can make the UBIFS's index-LEB lose?
More information about the linux-mtd
mailing list