板子上用的nand Flash,加上yaffs2文件系统,使用一段时间后,
每次开机出现类似如下错误:
Partially written block 176 detected
【解决办法】
1。后来去看代码搞懂了,是yaffs2文件系统,在关闭之前,要将dirty数据写入nand flash,否则下一次开机yaffs2 scan的时候,就会发现这些block是Partially written 部分写入的,所以就会提示。
解决办法就是,每次要关机之前,要去做一次:
sync
让yaffs2将dirty的数据写入到nand flash里面。
同理地,每次关机之前要通过系统去关机,这样会调用到poweroff等工具,其底层实现也是会调用到sync,去写数据。
不过这个办法也存在缺陷,那就是,如果是意外断电,那就还是会遇到同样问题。
2。一般情况下,自己断电之前去sync一下,是可以避免那个警告的,但是,后来经过长时间使用发现,sync只能表面地去解决数据写回,而不能清除那些Partially written 的块,这种错误,是累积性的,也就是,比如第一次意外断电是提示:
Partially written block 176 detected
....
而第二次又意外断电了,那么可能破外到别的block了,比如是175,那么下次警告的信息又会多很多:
Partially written block 175 detected
所以,随着不能正常sync而关机,会导致这些yaffs2的警告累积性地增加。
我此刻就遇到从175到104(中间部分block没有这些提示),一直打印这些警告,很是烦人。而实际上,rootfs是可以正常使用的。去看了下代码,是在
fs/yaffs2/yaffs_guts.c中:
static int yaffs_ScanBackwards(yaffs_Device *dev)
{
..
} else {
/* This is a partially written block that is not
* the current allocation block.
*/
T(YAFFS_TRACE_ALWAYS,
(TSTR("Partially written block %d detected" TENDSTR),
blk));
}
}
...
}
而虽然rootfs可以使用,但是为何还会有这个属性为YAFFS_TRACE_ALWAYS,即无论如何都始终提示的警告,没有详细去研究yaffs2,无从得知,既然作者加了,就有其道理。
所以,直接注释掉,肯定不是好办法,当然如果只是为了开发调试,只能自己去手动注释掉,也是可以的。
分享到:
相关推荐
How To Model a Partially Reflective and Partially Scattering Surface
MPP(矩阵++) C ++ 20及更高版本的矩阵库 如何使用? 包括项目: 您需要做的只是将其添加为子目录并链接目标(请参见下文): ... * Extents determine if a matrix is fixed or (partially) flexible */
A novel reconfigurable partially reflective surface (PRS) antenna is presented in this paper. The beam scanning ability is realized by employing a reconfigurable PRS structure and a phased array as ...
图像去模糊的代码,可以直接应用。Deblurring Shaken and Partially Saturated Images
PV_MPPT_Partially.slx带有粒子群算法
may be partially decoded) */ public static final int STATUS_FORMAT_ERROR = 1; /** * File read status: Unable to open source. */ public static final int STATUS_OPEN_ERROR = 2; protected ...
本文是Partially Coherent Detection in Rapidly Time Varying Channels的中文翻译,自己翻译的,有还能将就读懂,讲了部分想干检测
* After that, digits can be added by invoking inputDigit() on the formatter instance, and the partially * formatted phone number will be returned each time a digit is ...
偏序幺半群的一些研究,刘鹏远,杨义川,在这篇文章中,我们给出了偏序幺半群中正元、正锥以及原始元的定义。接着,我们考虑了偏序幺半群上的Riesz interpolation性质,并且我们进�
线性模型 线性整数规划Partially Overlapped Channel Assignment for Multi-Channel Wireless Mesh Networks.pdf
Deterministic controlled remote state preparation using partially entangled quantum channel
A partially modified commercial Twyman-Green type gauge block interferometer equipped with three frequency stabilized lasers which are coupled into one single mode optical fiber, is used for the ...
部分线性模型的一种适应半参估计,王凯平,林路,本文中,我们提出了一种具有适应性的半参估计来估计部分线性模型的非参部分。该估计的MSE的收敛速度适应于所要估计的模型,一般情
排序学习方面的文献,具有很好的参考价值。
一种具有符号运动学、奇异性识别和工作空间确定的新型部分解耦平动并联机器人_A novel partially-decoupled translational parallel manipulator with symbolic kinematics, singularity identification and ...
段和有负平方的定向域,W. Rump,杨义川,本文中,我们研究了段和有负平方的定向域间的关系.对于线性序域K和代数元i 满足 i2 =-1, 我们在用K的有理段参数化了K(i)上的一类格序群�
Optimal auctions for partially rational bidders
Flat-topped beam theoretical model and unified theory of coherence and polarization of light are used as the bases in examining aberrated, partially coherent, electromagnetic, square, flat-topped ...