SQUASHFS error

嵌入式linux系统运行过程中报告SQUASHFS error错误, 并且在系统重启之后就能恢复正常.

[ 5742.104968] SQUASHFS error: xz decompression failed, data probably corrupt
[ 5742.118815] SQUASHFS error: squashfs_read_data failed to read block 0x302780
[ 5742.132914] SQUASHFS error: Unable to read data cache entry [302780]
[ 5742.145672] SQUASHFS error: Unable to read page, block 302780, size a478
[ 5742.159102] SQUASHFS error: Unable to read data cache entry [302780]
[ 5742.171800] SQUASHFS error: Unable to read page, block 302780, size a478
[ 5742.185204] SQUASHFS error: Unable to read data cache entry [302780]
[ 5742.197907] SQUASHFS error: Unable to read page, block 302780, size a478
[ 5742.211323] SQUASHFS error: Unable to read data cache entry [302780]
[ 5742.224040] SQUASHFS error: Unable to read page, block 302780, size a478
[ 5742.237446] SQUASHFS error: Unable to read data cache entry [302780]

原因是: 

执行了下面的指令:

echo 3 > /proc/sys/vm/drop_caches

这会释放内存中所有的pagecache, dentries and inodes, 所以会导致文件系统找不到cache entry.

关于 /proc/sys/vm/drop_caches的说明:

/proc/sys/vm/drop_caches (since Linux 2.6.16). Writing to this file causes the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.

To free pagecache, use echo 1 > /proc/sys/vm/drop_caches;

to free dentries and inodes, use echo 2 > /proc/sys/vm/drop_caches;

to free pagecache, dentries and inodes, use echo 3 >/proc/sys/vm/drop_caches.

Because this is a non-destructive operation and dirty objects are not freeable, the user should run sync first.

可以参考这篇文章: http://www.linuxfly.org/post/320/

猜你喜欢

转载自blog.csdn.net/xiaowang1379214245/article/details/81092874
今日推荐