* Re: ubifs error after power-cut
[not found] <20170704061551.B6D4481000E5@webmail.sinamail.sina.com.cn>
@ 2017-07-04 6:56 ` Richard Weinberger
2017-07-06 6:47 ` Artem Bityutskiy
0 siblings, 1 reply; 3+ messages in thread
From: Richard Weinberger @ 2017-07-04 6:56 UTC (permalink / raw)
To: zhouwarcraft; +Cc: linux-mtd
Zhou,
Am 04.07.2017 um 08:15 schrieb Zhou:
> Dear Richard
>
> Please forgive my rudeness,I try to send this to mtd mailing list,but my
> office only can send HTML email.
:-(
> I read ubi & ubifs faq on www.linux-mtd.infradead.org/doc/ and surfed
> online,but can't find any answer about this problem.
> The project use UBIFS on a Nor-flash (MX25L51245G) as 3 data
> partitions.
>
> kernel version :3.14.19
>
> error log:
>
> [ 0.852742] Freeing unused kernel memory: 192K (c05e0000 - c0610000)
> Mount /sys.
> Attached mtd to ubi.
> [ 1.041152] UBI: attaching mtd2 to ubi0
> [ 1.045967] UBI: scanning is finished
> [ 1.052457] UBI: attached mtd2 (name "data", size 5 MiB) to ubi0
> [ 1.058472] UBI: PEB size: 65536 bytes (64 KiB), LEB size: 65408 bytes
> [ 1.064983] UBI: min./max. I/O unit sizes: 1/256, sub-page size 1
> [ 1.071056] UBI: VID header offset: 64 (aligned 64), data offset: 128
> [ 1.077475] UBI: good PEBs: 80, bad PEBs: 0, corrupted PEBs: 0
> [ 1.083290] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
> [ 1.090401] UBI: max/mean erase counter: 3/1, WL threshold: 4096, image sequence number: 2056918313
> [ 1.099412] UBI: available PEBs: 0, total reserved PEBs: 80, PEBs reserved for bad PEB handling: 0
> [ 1.108346] UBI: background thread "ubi_bgt0d" started, PID 45
> UBI device number 0, total 80 LEBs (5232640 bytes, 5.0 MiB), available 0 LEBs (0 bytes), LEB size 65408 bytes (63.9 KiB)
> Make ubi volume.
> ubimkvol: error!: UBI device does no[ 1.130146] UBIFS: background thread "ubifs_bgt0_0" started, PID 48
> t have f[ 1.137089] UBIFS: recovery needed
> ree logical eraseblocks
> Mount ubifs.
> [ 1.305638] UBIFS: recovery completed
> [ 1.309372] UBIFS: mounted UBI device 0, volume 0, name "sflashfs"
> [ 1.315542] UBIFS: LEB size: 65408 bytes (63 KiB), min./max. I/O unit sizes: 8 bytes/256 bytes
> [ 1.324134] UBIFS: FS size: 4316928 bytes (4 MiB, 66 LEBs), journal size 523265 bytes (0 MiB, 6 LEBs)
> [ 1.333323] UBIFS: reserved for root: 203898 bytes (199 KiB)
> [ 1.338971] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 415B310F-7DB0-49E9-B120-1216FDF2030D, small LPT model
> /data:
> . .. conf log root
>
> /data/conf:
> . ..
>
> /data/log:
> . ..
>
> /data/root:
> . ..
> Mount successful.
> Unmount /sys.
> Mount /sys.
> Attached mtd to ubi.
> [ 1.497743] UBI: attaching mtd3 to ubi1
> [ 1.503039] UBI: scanning is finished
> [ 1.509662] UBI: attached mtd3 (name "data1", size 10 MiB) to ubi1
> [ 1.515843] UBI: PEB size: 65536 bytes (64 KiB), LEB size: 65408 bytes
> [ 1.522351] UBI: min./max. I/O unit sizes: 1/256, sub-page size 1
> [ 1.528431] UBI: VID header offset: 64 (aligned 64), data offset: 128
> [ 1.534850] UBI: good PEBs: 160, bad PEBs: 0, corrupted PEBs: 0
> [ 1.540751] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
> [ 1.547864] UBI: max/mean erase counter: 3/1, WL threshold: 4096, image sequence number: 267157987
> [ 1.556788] UBI: available PEBs: 0, total reserved PEBs: 160, PEBs reserved for bad PEB handling: 0
> [ 1.565810] UBI: background thread "ubi_bgt1d" started, PID 56
> UBI device number 1, total 160 LEBs (10465280 bytes, 10.0 MiB), available 0 LEBs (0 bytes), LEB size 65408 bytes (63.9 KiB)
> Make ubi volume.
> ubimkvol: error!: UBI dev[ 1.587008] UBIFS: background thread "ubifs_bgt1_0" started, PID 59
> ice does[ 1.593845] UBIFS: recovery needed
> not have free logical eraseblocks
> Mount ubifs.
> [ 1.925846] UBIFS: recovery completed
> [ 1.929611] UBIFS: mounted UBI device 1, volume 0, name "sflashfs1"
> [ 1.935864] UBIFS: LEB size: 65408 bytes (63 KiB), min./max. I/O unit sizes: 8 bytes/256 bytes
> [ 1.944452] UBIFS: FS size: 9549568 bytes (9 MiB, 146 LEBs), journal size 523265 bytes (0 MiB, 7 LEBs)
> [ 1.953727] UBIFS: reserved for root: 451049 bytes (440 KiB)
> [ 1.959374] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 0B65F047-B1AB-416C-B509-52608BF5CD50, small LPT model
> /data1:
> [ 2.084260] UBIFS error (pid 60): ubifs_check_node: bad CRC: calculated 0x2603efdc, read 0x6265efa9
The data corrupted after writing.
> [ 2.093535] UBIFS error (pid 60): ubifs_check_node: bad node at LEB 11:2200
> [ 2.100479] magic 0x6101831
> [ 2.104139] crc 0x6265efa9
> [ 2.107879] node_type 0 (inode node)
> [ 2.111965] group_type 2 (last of node group)
> [ 2.116742] sqnum 861
> [ 2.119878] len 160
> [ 2.123016] key (68, inode)
> [ 2.126842] creat_sqnum 857
> [ 2.129978] size 1152310
> [ 2.133443] nlink 1
> [ 2.136407] atime 33.0
> [ 2.139629] mtime 33.0
> [ 2.142852] ctime 33.0
> [ 2.146073] uid 0
> [ 2.149021] gid 0
> [ 2.151985] mode 33188
> [ 2.155293] flags 0x1
> [ 2.158429] xattr_cnt 0
> [ 2.161377] xattr_size 0
> [ 2.164339] xattr_names 0
> [ 2.167302] compr_type 0x1
> [ 2.170439] data len 0
> [ 2.173395] CPU: 0 PID: 60 Comm: ls Not tainted 3.14.19 #1
> [ 2.178902] [<c0015910>] (unwind_backtrace) from [<c0011ff8>] (show_stack+0x10/0x14)
> [ 2.186632] [<c0011ff8>] (show_stack) from [<c0475264>] (dump_stack+0x80/0x90)
> [ 2.193844] [<c0475264>] (dump_stack) from [<c01a5c00>] (ubifs_check_node+0x180/0x298)
> [ 2.201747] [<c01a5c00>] (ubifs_check_node) from [<c01a7448>] (ubifs_read_node+0xe4/0x2e4)
> [ 2.209990] [<c01a7448>] (ubifs_read_node) from [<c01c7d14>] (ubifs_tnc_read_node+0x4c/0x1e8)
> [ 2.218491] [<c01c7d14>] (ubifs_tnc_read_node) from [<c01ab158>] (ubifs_tnc_locate+0x1a4/0x1ac)
> [ 2.227164] [<c01ab158>] (ubifs_tnc_locate) from [<c01a16ac>] (ubifs_iget+0x98/0x5f8)
> [ 2.234973] [<c01a16ac>] (ubifs_iget) from [<c019e880>] (ubifs_lookup+0x120/0x244)
> [ 2.242531] [<c019e880>] (ubifs_lookup) from [<c00ad564>] (lookup_real+0x20/0x4c)
> [ 2.250003] [<c00ad564>] (lookup_real) from [<c00adeb0>] (__lookup_hash+0x34/0x3c)
> [ 2.257563] [<c00adeb0>] (__lookup_hash) from [<c00aeab0>] (lookup_slow+0x38/0xa4)
> [ 2.265119] [<c00aeab0>] (lookup_slow) from [<c00b0638>] (path_lookupat+0x6d8/0x720)
> [ 2.272844] [<c00b0638>] (path_lookupat) from [<c00b06a0>] (filename_lookup.isra.54+0x20/0x60)
> [ 2.281431] [<c00b06a0>] (filename_lookup.isra.54) from [<c00b2f2c>] (user_path_at_empty+0x50/0x78)
> [ 2.290451] [<c00b2f2c>] (user_path_at_empty) from [<c00b2f68>] (user_path_at+0x14/0x1c)
> [ 2.298521] [<c00b2f68>] (user_path_at) from [<c00a9038>] (vfs_fstatat+0x44/0x98)
> [ 2.305986] [<c00a9038>] (vfs_fstatat) from [<c00a9748>] (SyS_lstat64+0x14/0x30)
> [ 2.313366] [<c00a9748>] (SyS_lstat64) from [<c000ebe0>] (ret_fast_syscall+0x0/0x30)
> [ 2.321083] UBIFS error (pid 60): ubifs_read_node: expected node type 0
> [ 2.327676] UBIFS error (pid 60): ubifs_iget: failed to read inode 68, error -117
> [ 2.335171] UBIFS error (pid 60): ubifs_lookup: dead directory entry 'flashNo3', error -117
> [ 2.343522] UBIFS warning (pid 60): ubifs_ro_mode: switched to read-only mode, error -117
> [ 2.351684] CPU: 0 PID: 60 Comm: ls Not tainted 3.14.19 #1
> [ 2.357169] [<c0015910>] (unwind_backtrace) from [<c0011ff8>] (show_stack+0x10/0x14)
> [ 2.364898] [<c0011ff8>] (show_stack) from [<c0475264>] (dump_stack+0x80/0x90)
> [ 2.372110] [<c0475264>] (dump_stack) from [<c019e994>] (ubifs_lookup+0x234/0x244)
> [ 2.379664] [<c019e994>] (ubifs_lookup) from [<c00ad564>] (lookup_real+0x20/0x4c)
> [ 2.387137] [<c00ad564>] (lookup_real) from [<c00adeb0>] (__lookup_hash+0x34/0x3c)
> [ 2.394698] [<c00adeb0>] (__lookup_hash) from [<c00aeab0>] (lookup_slow+0x38/0xa4)
> [ 2.402256] [<c00aeab0>] (lookup_slow) from [<c00b0638>] (path_lookupat+0x6d8/0x720)
> [ 2.409979] [<c00b0638>] (path_lookupat) from [<c00b06a0>] (filename_lookup.isra.54+0x20/0x60)
> [ 2.418566] [<c00b06a0>] (filename_lookup.isra.54) from [<c00b2f2c>] (user_path_at_empty+0x50/0x78)
> [ 2.427586] [<c00b2f2c>] (user_path_at_empty) from [<c00b2f68>] (user_path_at+0x14/0x1c)
> [ 2.435655] [<c00b2f68>] (user_path_at) from [<c00a9038>] (vfs_fstatat+0x44/0x98)
> [ 2.443122] [<c00a9038>] (vfs_fstatat) from [<c00a9748>] (SyS_lstat64+0x14/0x30)
> [ 2.450501] [<c00a9748>] (SyS_lstat64) from [<c000ebe0>] (ret_fast_syscall+0x0/0x30)
> ls: /data1/flashNo3: Structure needs cleaning
> . .. bt.data flashNo1 f[ 2.469926] UBIFS: un-mount UBI device 1, volume 0
> lashNo2 UBIFS: background thread "ubifs_bgt1_0" stops
> [0m
> ubi1:sflashfs1 on /data1 type ubifs (ro,relatime)
> Unmount /data1.
> Mount successful. But probably data filesystem is damaged.
> Remove ubi volume.
> Detached ubi.
> [ 2.836303] UBI: detaching mtd3 from ubi1
> [ 2.984358] UBI: mtd3 is detached from ubi1
> Erase mtd3 device.
> Erasing 64 Kibyte @ a00000 - 100% complete.
> At[ 27.455657] UBI: attaching mtd3 to ubi1
> tached mtd to ub[ 27.460869] UBI: scanning is finished
> i. (retr[ 27.464998] UBI: empty MTD device detected
> y)
> [ 27.828063] UBI: attached mtd3 (name "data1", size 10 MiB) to ubi1
> [ 27.834249] UBI: PEB size: 65536 bytes (64 KiB), LEB size: 65408 bytes
> [ 27.840758] UBI: min./max. I/O unit sizes: 1/256, sub-page size 1
> [ 27.846839] UBI: VID header offset: 64 (aligned 64), data offset: 128
> [ 27.853257] UBI: good PEBs: 160, bad PEBs: 0, corrupted PEBs: 0
> [ 27.859160] UBI: user volume: 0, internal volumes: 1, max. volumes count: 128
> [ 27.866272] UBI: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 2382463312
> [ 27.875290] UBI: available PEBs: 156, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0
> [ 27.884311] UBI: background thread "ubi_bgt1d" started, PID 68
> UBI device number 1, total 160 LEBs (10465280 bytes, 10.0 MiB), available 156 LEBs (10203648 bytes, 9.7 MiB), LEB size 65408 bytes (63.9 KiB)
> Make ubi volume. (second try)
> Set volume size to 10203648
> Volume ID 0, size 156 LEBs (10203648 bytes, 9.7 [ 33.619701] UBIFS error (pid 70): ubifs_mount: cannot open "ubi1:sflashfs", error -19
> MiB), LEB size 65408 bytes (63.9 KiB), dynamic, name "sflashfs1", alignment 1
> Mount ubifs. (retry)
> mount: mounting ubi1:sflashfs on /data failed: No such device
> WARNING: Failed to mount Data partition (/dev/mtdblock3). setup Data partition on DDR.
> Unmount /sys.
> Mount /sys.
> Attached mtd to ubi.
> [ 33.657061] UBI: attaching mtd4 to ubi2
> [ 36.381053] UBI: scanning is finished
> [ 39.162967] UBI: attached mtd4 (name "data2", size 10 MiB) to ubi2
> [ 39.169157] UBI: PEB size: 65536 bytes (64 KiB), LEB size: 65408 bytes
> [ 39.175669] UBI: min./max. I/O unit sizes: 1/256, sub-page size 1
> [ 39.181750] UBI: VID header offset: 64 (aligned 64), data offset: 128
> [ 39.188168] UBI: good PEBs: 160, bad PEBs: 0, corrupted PEBs: 0
> [ 39.194070] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
> [ 39.201181] UBI: max/mean erase counter: 3/1, WL threshold: 4096, image sequence number: 2758875152
> [ 39.210194] UBI: available PEBs: 0, total reserved PEBs: 160, PEBs reserved for bad PEB handling: 0
> [ 39.219225] UBI: background thread "ubi_bgt2d" started, PID 76
> UBI device number 2, total 160 LEBs (10465280 bytes, 10.0 MiB), available 0 LEBs (0 bytes), LEB size 65408 bytes (63.9 KiB)
> Make ubi volume.
> ubimkvol: error!: UBI device does not have free logical eraseblocks
> Mount ubifs.
> [ 41.924339] UBIFS: background thread "ubifs_bgt2_0" started, PID 79
> [ 42.701389] UBIFS: recovery needed
> [ 52.829808] UBIFS: recovery completed
> [ 52.833533] UBIFS: mounted UBI device 2, volume 0, name "sflashfs2"
> [ 52.839792] UBIFS: LEB size: 65408 bytes (63 KiB), min./max. I/O unit sizes: 8 bytes/256 bytes
> [ 52.848378] UBIFS: FS size: 9549568 bytes (9 MiB, 146 LEBs), journal size 523265 bytes (0 MiB, 7 LEBs)
> [ 52.857652] UBIFS: reserved for root: 451049 bytes (440 KiB)
> [ 52.863299] UBIFS: media format: w4/r0 (latest is w4/r0), UUID D922488C-A456-4966-A3E4-4B81EA7BC23F, small LPT model
> /data2:
> . .. bt.data flashNo1 flashNo2 flashNo3
> Mount successful.
> Unmount /sys.
>
> //error log end
>
> mounting script:
> //choose mount /data/ as an example
> if [ "x$SYSTEM_TYPE" = "xSERIAL_CS2_FLASH" ];then
> 193 wait_device mtdblock2 3
> 194 if [ $? -ne 0 ];then
> 195 echo "WARNING: Failed to mount Data partition (/dev/mtdblock2). setup Data partition on DDR."
> 196 make_virtual_data_partition
> 197 else
> 198 echo "Mount /sys."
> 199 mount /sys
> 200 echo "Attached mtd to ubi."
> 201 /usr/sbin/ubiattach /dev/ubi_ctrl -d 0 -m 2 2>/dev/null
> 202 echo "Make ubi volume."
> 203 /usr/sbin/ubimkvol /dev/ubi0 -N sflashfs -m 2>/dev/null
> 204 echo "Mount ubifs."
> 205 mount -t ubifs ubi0:sflashfs /data
> 206 #mount -t ubifs ubi0:sflashfs -o sync /data
> 207 #mount -t ubifs ubi0:sflashfs -o sync,no_chk_data_crc /data
> 208 if [ $? -ne 0 ];then
> 209 echo "Mount failed. Probably data filesystem is damaged."
> 210 cs2_ubifs_reformat
> 211 else
> 212 ls -aR /data >/dev/null 2>&1
> 213 mount -v | fgrep '/data type ubifs (ro' >/dev/null
> 214 if [ $? -ne 0 ];then
> 215 echo "Mount successful."
> 216 else
> 217 echo "Unmount /data."
> 218 umount /data
> 219 echo "Mount successful. But probably data filesystem is damaged."
> 220 cs2_ubifs_reformat
> 221 fi
> 222 fi
> 223 echo "Unmount /sys."
> 224 umount /sys
> 225 fi
> 226 make_data_dir
> 227 fi
> //
>
>
> Mounting failed does not occur every time,it aways happen after power
> -cut,maybe 1/100.
>
> if mounting failed happen,I must use flash_eraseall /dev/mtd to
> retry(even if data is lost).
>
> I'm not a linux expert .After I joined the project this problem
> confuse me for a long time , I have no idea and need your help.
>
> what you think about this problem? Is it a hardware problem?
It could be a hardware issues, yes. But also a misconfiguration
of your flash chip.
Maybe you give your flash not enough time to write data and after a power-cut
already written data corrupts.
Thanks,
//richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ubifs error after power-cut
2017-07-04 6:56 ` ubifs error after power-cut Richard Weinberger
@ 2017-07-06 6:47 ` Artem Bityutskiy
2017-07-06 11:26 ` Zhou
0 siblings, 1 reply; 3+ messages in thread
From: Artem Bityutskiy @ 2017-07-06 6:47 UTC (permalink / raw)
To: Richard Weinberger, zhouwarcraft; +Cc: linux-mtd
On Tue, 2017-07-04 at 08:56 +0200, Richard Weinberger wrote:
> > what you think about this problem? Is it a hardware problem?
>
> It could be a hardware issues, yes. But also a misconfiguration
> of your flash chip.
> Maybe you give your flash not enough time to write data and after a
> power-cut
> already written data corrupts.
Do the MTD tests still work? Makes sense to run them.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: ubifs error after power-cut
2017-07-06 6:47 ` Artem Bityutskiy
@ 2017-07-06 11:26 ` Zhou
0 siblings, 0 replies; 3+ messages in thread
From: Zhou @ 2017-07-06 11:26 UTC (permalink / raw)
To: dedekind1, 'Richard Weinberger'; +Cc: 'linux-mtd'
Hi Artem
I do the MTD tests
My flash chip is Nor-flash,i just do speed and stress stress
#
#
#
# insmod mtd_stresstest.ko dev=4
[ 148.944257]
[ 148.945834] =================================================
[ 148.951594] mtd_stresstest: MTD device: 4
[ 148.956693] mtd_stresstest: not NAND flash, assume page size is 512 bytes.
[ 148.963606] mtd_stresstest: MTD device size 10485760, eraseblock size 65536, page size 512, count of eraseblocks 160, pages per eraseblock 128, OOB size 0
[ 148.982190] mtd_stresstest: doing operations
[ 148.986511] mtd_stresstest: 0 operations done
[ 267.492503] mtd_stresstest: 1024 operations done
[ 380.597048] mtd_stresstest: 2048 operations done
[ 498.965403] mtd_stresstest: 3072 operations done
[ 613.959071] mtd_stresstest: 4096 operations done
[ 727.582584] mtd_stresstest: 5120 operations done
[ 843.713623] mtd_stresstest: 6144 operations done
[ 965.796715] mtd_stresstest: 7168 operations done
[ 1083.998768] mtd_stresstest: 8192 operations done
[ 1197.049802] mtd_stresstest: 9216 operations done
[ 1278.214729] mtd_stresstest: finished, 10000 operations done
[ 1278.220812] =================================================
#
# insmod mtd_speedtest.ko dev=4
[ 1360.104141]
[ 1360.105671] =================================================
[ 1360.111465] mtd_speedtest: MTD device: 4
[ 1360.116184] mtd_speedtest: not NAND flash, assume page size is 512 bytes.
[ 1360.123027] mtd_speedtest: MTD device size 10485760, eraseblock size 65536, page size 512, count of eraseblocks 160, pages per eraseblock 128, OOB size 0
[ 1384.841783] mtd_speedtest: testing eraseblock write speed
[ 1396.455062] mtd_speedtest: eraseblock write speed is 882 KiB/s
[ 1396.460934] mtd_speedtest: testing eraseblock read speed
[ 1396.893461] mtd_speedtest: eraseblock read speed is 23981 KiB/s
[ 1421.649779] mtd_speedtest: testing page write speed
[ 1434.075620] mtd_speedtest: page write speed is 824 KiB/s
[ 1434.080961] mtd_speedtest: testing page read speed
[ 1434.602291] mtd_speedtest: page read speed is 19844 KiB/s
[ 1459.405787] mtd_speedtest: testing 2 page write speed
[ 1471.246926] mtd_speedtest: 2 page write speed is 865 KiB/s
[ 1471.252434] mtd_speedtest: testing 2 page read speed
[ 1471.725673] mtd_speedtest: 2 page read speed is 21880 KiB/s
[ 1471.731294] mtd_speedtest: Testing erase speed
[ 1496.521813] mtd_speedtest: erase speed is 413 KiB/s
[ 1496.526725] mtd_speedtest: Testing 2x multi-block erase speed
[ 1521.129789] mtd_speedtest: 2x multi-block erase speed is 416 KiB/s
[ 1521.136005] mtd_speedtest: Testing 4x multi-block erase speed
[ 1545.757781] mtd_speedtest: 4x multi-block erase speed is 415 KiB/s
[ 1545.763983] mtd_speedtest: Testing 8x multi-block erase speed
[ 1570.389788] mtd_speedtest: 8x multi-block erase speed is 415 KiB/s
[ 1570.395995] mtd_speedtest: Testing 16x multi-block erase speed
[ 1594.994377] mtd_speedtest: 16x multi-block erase speed is 416 KiB/s
[ 1595.000670] mtd_speedtest: Testing 32x multi-block erase speed
[ 1619.621789] mtd_speedtest: 32x multi-block erase speed is 416 KiB/s
[ 1619.628082] mtd_speedtest: Testing 64x multi-block erase speed
[ 1644.221800] mtd_speedtest: 64x multi-block erase speed is 416 KiB/s
[ 1644.228087] mtd_speedtest: finished
[ 1644.232147] =================================================
I think the test's result is fine,maybe not hardware issue or mtd issue.
And I found something strange.
First error:I send you before,it caused by mount,indexing node is corrupted
[ 2.580988] UBIFS: background thread "ubifs_bgt2_0" started, PID 76
[ 2.587396] UBIFS error (pid 75): ubifs_check_node: bad CRC: calculated 0x4463c479, read 0xccafc492
[ 2.596418] UBIFS error (pid 75): ubifs_check_node: bad node at LEB 23:22600
[ 2.603445] magic 0x6101831
[ 2.607097] crc 0xccafc492
[ 2.610838] node_type 9 (indexing node)
[ 2.615184] group_type 0 (no node group)
[ 2.619528] sqnum 6557
[ 2.622751] len 48
[ 2.625803] child_cnt 1
[ 2.628747] level 0
[ 2.631710] Branches:
[ 2.634076] 0: LEB 11:27936 len 160 key (bad key type: 0xffffffff, 0xffffffff)
[ 2.641370] CPU: 0 PID: 75 Comm: mount Not tainted 3.14.19 #1
[ 2.647137] [<c0015910>] (unwind_backtrace) from [<c0011ff8>] (show_stack+0x10/0x14)
[ 2.654868] [<c0011ff8>] (show_stack) from [<c0475264>] (dump_stack+0x80/0x90)
[ 2.662080] [<c0475264>] (dump_stack) from [<c01a5c00>] (ubifs_check_node+0x180/0x298)
[ 2.669983] [<c01a5c00>] (ubifs_check_node) from [<c01a7448>] (ubifs_read_node+0xe4/0x2e4)
[ 2.678240] [<c01a7448>] (ubifs_read_node) from [<c01b17b0>] (dbg_old_index_check_init+0x64/0xa4)
[ 2.687090] [<c01b17b0>] (dbg_old_index_check_init) from [<c01a2a18>] (ubifs_mount+0xe0c/0x1f10)
[ 2.695859] [<c01a2a18>] (ubifs_mount) from [<c00a8428>] (mount_fs+0x14/0xcc)
[ 2.702991] [<c00a8428>] (mount_fs) from [<c00c04b0>] (vfs_kern_mount+0x48/0x108)
[ 2.710463] [<c00c04b0>] (vfs_kern_mount) from [<c00c2dd4>] (do_mount+0x1b8/0xa54)
[ 2.718021] [<c00c2dd4>] (do_mount) from [<c00c39d4>] (SyS_mount+0x84/0xb8)
[ 2.724978] [<c00c39d4>] (SyS_mount) from [<c000ebe0>] (ret_fast_syscall+0x0/0x30)
[ 2.732527] UBIFS error (pid 75): ubifs_read_node: expected node type 9
[ 2.739139] UBIFS: background thread "ubifs_bgt2_0" stops
mount: mounting ubi2:sflashfs2 on /data2 failed: Structure needs cleaning
Second error:the NEW one ,it caused by ls,In my mount script,after mounting,i use ls to check my partition.
This time is inode node.
[ 1.925846] UBIFS: recovery completed
[ 1.929611] UBIFS: mounted UBI device 1, volume 0, name "sflashfs1"
[ 1.935864] UBIFS: LEB size: 65408 bytes (63 KiB), min./max. I/O unit sizes: 8 bytes/256 bytes
[ 1.944452] UBIFS: FS size: 9549568 bytes (9 MiB, 146 LEBs), journal size 523265 bytes (0 MiB, 7 LEBs)
[ 1.953727] UBIFS: reserved for root: 451049 bytes (440 KiB)
[ 1.959374] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 0B65F047-B1AB-416C-B509-52608BF5CD50, small LPT model
/data1:
[ 2.084260] UBIFS error (pid 60): ubifs_check_node: bad CRC: calculated 0x2603efdc, read 0x6265efa9
[ 2.093535] UBIFS error (pid 60): ubifs_check_node: bad node at LEB 11:2200
[ 2.100479] magic 0x6101831
[ 2.104139] crc 0x6265efa9
[ 2.107879] node_type 0 (inode node)
[ 2.111965] group_type 2 (last of node group)
[ 2.116742] sqnum 861
[ 2.119878] len 160
[ 2.123016] key (68, inode)
[ 2.126842] creat_sqnum 857
[ 2.129978] size 1152310
[ 2.133443] nlink 1
[ 2.136407] atime 33.0
[ 2.139629] mtime 33.0
[ 2.142852] ctime 33.0
[ 2.146073] uid 0
[ 2.149021] gid 0
[ 2.151985] mode 33188
[ 2.155293] flags 0x1
[ 2.158429] xattr_cnt 0
[ 2.161377] xattr_size 0
[ 2.164339] xattr_names 0
[ 2.167302] compr_type 0x1
[ 2.170439] data len 0
[ 2.173395] CPU: 0 PID: 60 Comm: ls Not tainted 3.14.19 #1
[ 2.178902] [<c0015910>] (unwind_backtrace) from [<c0011ff8>] (show_stack+0x10/0x14)
[ 2.186632] [<c0011ff8>] (show_stack) from [<c0475264>] (dump_stack+0x80/0x90)
[ 2.193844] [<c0475264>] (dump_stack) from [<c01a5c00>] (ubifs_check_node+0x180/0x298)
[ 2.201747] [<c01a5c00>] (ubifs_check_node) from [<c01a7448>] (ubifs_read_node+0xe4/0x2e4)
[ 2.209990] [<c01a7448>] (ubifs_read_node) from [<c01c7d14>] (ubifs_tnc_read_node+0x4c/0x1e8)
[ 2.218491] [<c01c7d14>] (ubifs_tnc_read_node) from [<c01ab158>] (ubifs_tnc_locate+0x1a4/0x1ac)
[ 2.227164] [<c01ab158>] (ubifs_tnc_locate) from [<c01a16ac>] (ubifs_iget+0x98/0x5f8)
[ 2.234973] [<c01a16ac>] (ubifs_iget) from [<c019e880>] (ubifs_lookup+0x120/0x244)
[ 2.242531] [<c019e880>] (ubifs_lookup) from [<c00ad564>] (lookup_real+0x20/0x4c)
[ 2.250003] [<c00ad564>] (lookup_real) from [<c00adeb0>] (__lookup_hash+0x34/0x3c)
[ 2.257563] [<c00adeb0>] (__lookup_hash) from [<c00aeab0>] (lookup_slow+0x38/0xa4)
[ 2.265119] [<c00aeab0>] (lookup_slow) from [<c00b0638>] (path_lookupat+0x6d8/0x720)
[ 2.272844] [<c00b0638>] (path_lookupat) from [<c00b06a0>] (filename_lookup.isra.54+0x20/0x60)
[ 2.281431] [<c00b06a0>] (filename_lookup.isra.54) from [<c00b2f2c>] (user_path_at_empty+0x50/0x78)
[ 2.290451] [<c00b2f2c>] (user_path_at_empty) from [<c00b2f68>] (user_path_at+0x14/0x1c)
[ 2.298521] [<c00b2f68>] (user_path_at) from [<c00a9038>] (vfs_fstatat+0x44/0x98)
[ 2.305986] [<c00a9038>] (vfs_fstatat) from [<c00a9748>] (SyS_lstat64+0x14/0x30)
[ 2.313366] [<c00a9748>] (SyS_lstat64) from [<c000ebe0>] (ret_fast_syscall+0x0/0x30)
[ 2.321083] UBIFS error (pid 60): ubifs_read_node: expected node type 0
[ 2.327676] UBIFS error (pid 60): ubifs_iget: failed to read inode 68, error -117
[ 2.335171] UBIFS error (pid 60): ubifs_lookup: dead directory entry 'flashNo3', error -117
[ 2.343522] UBIFS warning (pid 60): ubifs_ro_mode: switched to read-only mode, error -117
[ 2.351684] CPU: 0 PID: 60 Comm: ls Not tainted 3.14.19 #1
[ 2.357169] [<c0015910>] (unwind_backtrace) from [<c0011ff8>] (show_stack+0x10/0x14)
[ 2.364898] [<c0011ff8>] (show_stack) from [<c0475264>] (dump_stack+0x80/0x90)
[ 2.372110] [<c0475264>] (dump_stack) from [<c019e994>] (ubifs_lookup+0x234/0x244)
[ 2.379664] [<c019e994>] (ubifs_lookup) from [<c00ad564>] (lookup_real+0x20/0x4c)
[ 2.387137] [<c00ad564>] (lookup_real) from [<c00adeb0>] (__lookup_hash+0x34/0x3c)
[ 2.394698] [<c00adeb0>] (__lookup_hash) from [<c00aeab0>] (lookup_slow+0x38/0xa4)
[ 2.402256] [<c00aeab0>] (lookup_slow) from [<c00b0638>] (path_lookupat+0x6d8/0x720)
[ 2.409979] [<c00b0638>] (path_lookupat) from [<c00b06a0>] (filename_lookup.isra.54+0x20/0x60)
[ 2.418566] [<c00b06a0>] (filename_lookup.isra.54) from [<c00b2f2c>] (user_path_at_empty+0x50/0x78)
[ 2.427586] [<c00b2f2c>] (user_path_at_empty) from [<c00b2f68>] (user_path_at+0x14/0x1c)
[ 2.435655] [<c00b2f68>] (user_path_at) from [<c00a9038>] (vfs_fstatat+0x44/0x98)
[ 2.443122] [<c00a9038>] (vfs_fstatat) from [<c00a9748>] (SyS_lstat64+0x14/0x30)
[ 2.450501] [<c00a9748>] (SyS_lstat64) from [<c000ebe0>] (ret_fast_syscall+0x0/0x30)
ls: /data1/flashNo3: Structure needs cleaning
Like Richard said,maybe something wrong with Nor-flash configuration.
Do you have any suggestion,what should I check next stage.
Best Wishes
Zhou
-----Original Message-----
From: Artem Bityutskiy [mailto:dedekind1@gmail.com]
Sent: Thursday, July 06, 2017 2:48 PM
To: Richard Weinberger; zhouwarcraft@sina.com
Cc: linux-mtd
Subject: Re: ubifs error after power-cut
On Tue, 2017-07-04 at 08:56 +0200, Richard Weinberger wrote:
> > what you think about this problem? Is it a hardware problem?
>
> It could be a hardware issues, yes. But also a misconfiguration
> of your flash chip.
> Maybe you give your flash not enough time to write data and after a
> power-cut
> already written data corrupts.
Do the MTD tests still work? Makes sense to run them.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-06 11:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170704061551.B6D4481000E5@webmail.sinamail.sina.com.cn>
2017-07-04 6:56 ` ubifs error after power-cut Richard Weinberger
2017-07-06 6:47 ` Artem Bityutskiy
2017-07-06 11:26 ` Zhou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox