- 论坛徽章:
- 0
|
我在nand_base.c里面为每个调用的nand_check_wp的函数前面添加了语句
printk(KERN_INFO "nand_check_wp in %s",__func__);
实验结果如下:
/ # ls
bin dev etc fzb home init mnt proc sbin sys tmp usr
/ # nand_check_wp() in :nand_do_write_ops
rm -r fzb
/ # nand_check_wp() in :nand_do_write_ops
fdisk -l
fdisk -l
Disk /dev/mtdblock0: 8 MB, 8388608 bytes
255 heads, 63 sectors/track, 1 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock0 doesn't contain a valid partition table
Disk /dev/mtdblock1: 33 MB, 33554432 bytes
255 heads, 63 sectors/track, 4 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock1 doesn't contain a valid partition table
Disk /dev/mtdblock2: 226 MB, 226492416 bytes
255 heads, 63 sectors/track, 27 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock2 doesn't contain a valid partition table
/ # Unknown node type for REF_PRISTINE node at 0x00147838: 0x0000
JFFS2 notice: (114) jffs2_get_inode_nodes: Wrong magic bitmask 0x0000 in node he
ader at 0x147838.
JFFS2 warning: (114) jffs2_do_read_inode_internal: no data nodes found for ino #
69
nand_check_wp() in :nand_do_write_ops
write protected
jffs2_flush_wbuf(): Write failed with -5
nand_check_wp() in :nand_do_write_ops
write protected
jffs2_flush_wbuf(): Write failed with -5
nand_check_wp() in :nand_erase_nand
Erase at 0x003e0000 failed immediately: errno -5
大家注意看,都是同样 调用 nand_do_write_ops,但是在jffs2_flush_wbuf中调用失败了。 |
|