YAFFS2文件系统在做了创建、删除等操作后,下次开出现N多Partially written block X detected打印信息。显示如下:

 
Creating 6 MTD partitions on "atmel_nand":
0x000000000000-0x000000020000 : "bootstrap"
0x000000020000-0x000000060000 : "uboot"
0x000000060000-0x000000080000 : "env1"
0x000000080000-0x0000000a0000 : "env2"
0x0000000a0000-0x0000002a0000 : "linux"
0x0000002a0000-0x000008000000 : "root"
usbmon: debugfs is not available
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs
rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
Registered led device: ds5
Registered led device: ds1
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.20.
ALSA device list:
 No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
yaffs: dev is 32505861 name is "mtdblock5"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.5, "mtdblock5"
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 53 detected
Partially written block 51 detected
Partially written block 51 detected
Partially written block 51 detected
Partially written block 51 detected
Partially written block 51 detected
Partially written block 51 detected
Partially written block 51 detected
Partially written block 51 detected
Partially written block 51 detected
Partially written block 51 detected
 
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs2 filesystem) on device 31:5.
Freeing init memory: 116K
running /etc/init.d/rcS
mount -t proc proc /proc
mount -t sysfs /sys /sys

 

 
解决方法:
 
方法一,修改 yaffs_fs.c 中 yaffs_auto_checkpoint 改成 值 2
 方法二,修改fs/yaffs2/yaffs_guts.cstatic int yaffs_ScanBackwards(yaffs_Device * dev) 函数中

。。。。
        T(YAFFS_TRACE_ALWAYS,    /*YAFFS_TRACE_SCAN*/
        (TSTR("Partially written block %d detected" TENDSTR),
        blk));
。。。。
报错是由于YAFFS_TRACE_ALWAYS造成的。只要把它改成YAFFS_TRACE_SCAN 就OK了

转载来自:http://blog.csdn.net/dian_technology/article/details/5723993