Tool/software: Linux
Hi There,
I'm just finishing up a migration from an AM5726 board from TI-SDK 3.02.00.05 to TI-SDK 5.01.00.11.
After running swupdate to flash the eMMC from the SDCard, I am seeing a series of ext4-fs errors. Also after booting from the eMMC there appears to be considerable file system corruption.
This seems to be a known Linux Kernel issue. It appears a fix was made for Kernel versions 4.19x and 4.20.x. I was wondering if a back ported fix was available for Linux Kernel 4.14.x which is included in TI SDK 5.x? I did not find this particular issue listed in the Release Notes.
Incorrect disk IO caused by blk-mq direct issue can lead to file system corruption
EXT4-fs error (device sda7): ext4_iget:4831: inode
Partitioning Script
======================
prepare_emmc() {
fw_setenv factorymode 0
echo 0 > /sys/block/mmcblk1boot0/force_ro
dd if=/dev/zero of=/dev/mmcblk1boot0 bs=512 count=4096
dd if=/run/media/mmcblk0p1/MLO of=/dev/mmcblk1boot0 bs=512
dd if=/run/media/mmcblk0p1/u-boot.img of=/dev/mmcblk1boot0 bs=512 seek=768
unmount /dev/mmcblk1p1
unmount /dev/mmcblk1p2
unmount /dev/mmcblk1p3
sleep 1
echo yes | parted -s /dev/mmcblk1 rm 1
echo yes | parted -s /dev/mmcblk1 rm 2
echo yes | parted -s /dev/mmcblk1 rm 3
parted -s /dev/mmcblk1 mkpart primary ext4 0% 40%
parted -s /dev/mmcblk1 mkpart primary ext4 40% 80%
parted -s /dev/mmcblk1 mkpart primary ext4 80% 100%
sleep 1
unmount /dev/mmcblk1p1
unmount /dev/mmcblk1p2
unmount /dev/mmcblk1p3
sleep 1
echo yes | mkfs.ext4 /dev/mmcblk1p1
echo yes | mkfs.ext4 /dev/mmcblk1p2
echo yes | mkfs.ext4 /dev/mmcblk1p3
mount_if mmcblk1p1
mount_if mmcblk1p2
mount_if mmcblk1p3
cd /run/media/mmcblk0p3
swupdate -v -H board:3.50 -i board_3.5.swu -e board,eMMC-install >> recovery.$timestamp.log 2>&1
fw_setenv mmcdev 1
reboot
}
dmesg logs listed below
=======================
root@am57xx-evm:~# stat /
File: /
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: b311h/45841d Inode: 2 Links: 21
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-02-26 06:27:20.000000000
Modify: 2019-02-26 06:34:41.000000000
Change: 2019-02-26 06:34:41.000000000
root@am57xx-evm:~# dmesg | grep -i ext4
[ 0.000000] Kernel command line: console=ttyS2,115200n8 net.ifnames=0 biosdevname=0 root=PARTUUID=d093c9e2-01 rw rootfstype=ext4 rootwait
[ 3.795105] EXT4-fs (mmcblk1p1): warning: mounting fs with errors, running e2fsck is recommended
[ 3.805298] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)
[ 3.813458] VFS: Mounted root (ext4 filesystem) on device 179:17.
[ 4.999205] EXT4-fs (mmcblk1p1): re-mounted. Opts: (null)
[ 8.168201] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
[ 8.213794] EXT4-fs (mmcblk1p3): mounted filesystem with ordered data mode. Opts: (null)
[ 8.228680] EXT4-fs (mmcblk0p3): mounting ext3 file system using the ext4 subsystem
[ 8.528818] EXT4-fs error (device mmcblk1p1): ext4_iget:4723: inode #4331: comm grep: checksum invalid
[ 8.537106] EXT4-fs error (device mmcblk1p1): ext4_iget:4723: inode #4033: comm grep: checksum invalid
[ 8.550659] EXT4-fs error (device mmcblk1p1): ext4_iget:4723: inode #4019: comm grep: checksum invalid
[ 8.552701] EXT4-fs error (device mmcblk1p1): ext4_iget:4723: inode #4509: comm grep: checksum invalid
[ 8.555045] EXT4-fs error (device mmcblk1p1): ext4_iget:4723: inode #4697: comm grep: checksum invalid
[ 8.556233] EXT4-fs error (device mmcblk1p1): ext4_iget:4723: inode #3908: comm grep: checksum invalid
[ 8.557062] EXT4-fs error (device mmcblk1p1): ext4_iget:4723: inode #3872: comm grep: checksum invalid
[ 8.558947] EXT4-fs error (device mmcblk1p1): ext4_iget:4723: inode #4474: comm grep: checksum invalid
[ 8.575134] EXT4-fs error (device mmcblk1p1): ext4_iget:4723: inode #4216: comm grep: checksum invalid
[ 8.576337] EXT4-fs error (device mmcblk1p1): ext4_iget:4723: inode #4078: comm grep: checksum invalid
[ 9.029010] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[ 9.042961] EXT4-fs (mmcblk0p2): mounting ext3 file system using the ext4 subsystem
[ 9.139316] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
...
[ 8.852095] EXT4-fs error: 356 callbacks suppressed
[ 8.852102] EXT4-fs error (device mmcblk1p1): ext4_iget:4703: inode #3742: comm modprobe: bad extra_isize 11640 (inode size 256)
[ 8.871310] EXT4-fs error (device mmcblk1p1): ext4_iget:4703: inode #3742: comm mount.sh: bad extra_isize 11640 (inode size 256)
[ 8.885920] EXT4-fs error (device mmcblk1p1): ext4_iget:4703: inode #3742: comm mkdir: bad extra_isize 11640 (inode size 256)
[ 8.901446] EXT4-fs error (device mmcblk1p1): ext4_iget:4703: inode #3742: comm basename: bad extra_isize 11640 (inode size 256)
[ 8.915776] EXT4-fs error (device mmcblk1p1): ext4_iget:4703: inode #3742: comm grep: bad extra_isize 11640 (inode size 256)
[ 8.930319] EXT4-fs error (device mmcblk1p1): ext4_iget:4703: inode #3742: comm readlink: bad extra_isize 11640 (inode size 256)
[ 8.945352] EXT4-fs error (device mmcblk1p1): ext4_iget:4703: inode #3742: comm mkdir: bad extra_isize 11640 (inode size 256)
[ 8.959794] EXT4-fs error (device mmcblk1p1): ext4_iget:4703: inode #3742: comm expr: bad extra_isize 11640 (inode size 256)
[ 8.974192] EXT4-fs error (device mmcblk1p1): ext4_iget:4703: inode #3742: comm mount: bad extra_isize 11640 (inode size 256)
[ 8.988109] EXT4-fs error (device mmcblk1p1): ext4_iget:4703: inode #3742: comm readlink: bad extra_isize 11640 (inode size 256)
...
[ 320.470812] EXT4-fs (mmcblk1p1): error count since last fsck: 1354
[ 320.477043] EXT4-fs (mmcblk1p1): initial error at time 1551162840: ext4_iget:4703: inode 3729
[ 320.485638] EXT4-fs (mmcblk1p1): last error at time 1551162334: ext4_iget:4723: inode 4427