This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x eMMC EXT4 filesystem error

Hi all,


I have a custom board with AM335x and eMMC-Flash on it.

During normal use of the filesystem the following log message was displayed:

[  653.898885] EXT4-fs error (device mmcblk0p2): ext4_mb_generate_buddy:756: group 0, 2627 clusters in bitmap, 3707 in gd; block bitmap corrupt.
[  654.135744] JBD2: Spotted dirty metadata buffer (dev = mmcblk0p2, blocknr = 0). There's a risk of filesystem corruption in case of system crash.

In such a case during reboot the filesystem corruption is detected and Linux tries to repair the filesystem with fsck during boot. Even after successful repair sometimes data content is missing.

Sometimes after the repair the device booted with a readonly filesystem and data was lost, see below:

[    2.342379] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[    2.350121] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[    2.538135] EXT4-fs (mmcblk0p2): recovery complete
[    2.545998] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.554600] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.

This happens on several boards from time to time, I cannot reproduce this by a single action.

I'm running linux 3.12.10-ti2013.12.01 from SDK 7.00.00.00.

Filesystem is ext4, partitioned like this:


root@am335x-evm:/home/testApp# sfdisk -l Disk /dev/mtdblock0: 2 cylinders, 255 heads, 63 sectors/track Disk /dev/mmcblk0: 238592 cylinders, 4 heads, 16 sectors/track Units: cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/mmcblk0p1 * 0+ 2259- 2259- 72261 c W95 FAT32 (LBA) sfdisk: start: (c,h,s) expected (0,3,16) found (0,1,1) sfdisk: end: (c,h,s) expected (1023,3,16) found (8,254,63) /dev/mmcblk0p2 2259+ 57231- 54973- 1759117+ 83 Linux sfdisk: start: (c,h,s) expected (1023,3,16) found (9,0,1) sfdisk: end: (c,h,s) expected (1023,3,16) found (227,254,63) /dev/mmcblk0p3 57248 114847 57600 1843200 83 Linux sfdisk: start: (c,h,s) expected (1023,3,16) found (228,16,45) sfdisk: end: (c,h,s) expected (1023,3,16) found (457,135,62) /dev/mmcblk0p4 114848 238591 123744 3959808 83 Linux sfdisk: start: (c,h,s) expected (1023,3,16) found (457,135,63) sfdisk: end: (c,h,s) expected (1023,3,16) found (950,129,11) Disk /dev/mmcblk0boot1: 128 cylinders, 4 heads, 16 sectors/track Disk /dev/mmcblk0boot0: 128 cylinders, 4 heads, 16 sectors/track

Any help is welcome.

Regards