JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1780784

Linux-2.6.27 有时重启内核起不来,有时起来了但在使用过程中网页文件被破坏(网页显示不正常了),重启到文件系统这报错:JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1780784 。。。。。

这是什么原因?

 

启动信息如下:

RomBOOT

Start AT91Bootstrap...

CE_CMD_ADD_

-ding...test- Manufacture_ID:EC     device_ID:DA     chip_ID:ECDA


U-Boot 1.3.4 (May 20 2014 - 19:45:41)

DRAM:  64 MB
NAND:  
256 MiB
In:    serial
Out:   serial
Err:   serial
dm9000 i/o: 0x30000000, id: 0x90000a46 
DM9000: running in 16 bit mode
MAC: 3a:1f:34:08:54:54
operating at 100M full duplex mode
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0xa0000, size 0x167880


Reading data from 0xa0000 --   0% complete.
Reading data from 0xa3800 --   1% complete.
Reading data from 0xa7000 --   2% complete.
Reading data from 0xaa800 --   3% complete.
Reading data from 0xae000 --   4% complete.
Reading data from 0xb1800 --   5% complete.
Reading data from 0xb5800 --   6% complete.
Reading data from 0xb9000 --   7% complete.
Reading data from 0xbc800 --   8% complete.
Reading data from 0xc0000 --   9% complete.
Reading data from 0xc3800 --  10% complete.
Reading data from 0xc7800 --  11% complete.
Reading data from 0xcb000 --  12% complete.
Reading data from 0xce800 --  13% complete.
Reading data from 0xd2000 --  14% complete.
Reading data from 0xd5800 --  15% complete.
Reading data from 0xd9800 --  16% complete.
Reading data from 0xdd000 --  17% complete.
Reading data from 0xe0800 --  18% complete.
Reading data from 0xe4000 --  19% complete.
Reading data from 0xe7800 --  20% complete.
Reading data from 0xeb800 --  21% complete.
Reading data from 0xef000 --  22% complete.
Reading data from 0xf2800 --  23% complete.
Reading data from 0xf6000 --  24% complete.
Reading data from 0xf9800 --  25% complete.
Reading data from 0xfd000 --  26% complete.
Reading data from 0x101000 --  27% complete.
Reading data from 0x104800 --  28% complete.
Reading data from 0x108000 --  29% complete.
Reading data from 0x10b800 --  30% complete.
Reading data from 0x10f000 --  31% complete.
Reading data from 0x113000 --  32% complete.
Reading data from 0x116800 --  33% complete.
Reading data from 0x11a000 --  34% complete.
Reading data from 0x11d800 --  35% complete.
Reading data from 0x121000 --  36% complete.
Reading data from 0x125000 --  37% complete.
Reading data from 0x128800 --  38% complete.
Reading data from 0x12c000 --  39% complete.
Reading data from 0x12f800 --  40% complete.
Reading data from 0x133000 --  41% complete.
Reading data from 0x137000 --  42% complete.
Reading data from 0x13a800 --  43% complete.
Reading data from 0x13e000 --  44% complete.
Reading data from 0x141800 --  45% complete.
Reading data from 0x145000 --  46% complete.
Reading data from 0x148800 --  47% complete.
Reading data from 0x14c800 --  48% complete.
Reading data from 0x150000 --  49% complete.
Reading data from 0x153800 --  50% complete.
Reading data from 0x157000 --  51% complete.
Reading data from 0x15a800 --  52% complete.
Reading data from 0x15e800 --  53% complete.
Reading data from 0x162000 --  54% complete.
Reading data from 0x165800 --  55% complete.
Reading data from 0x169000 --  56% complete.
Reading data from 0x16c800 --  57% complete.
Reading data from 0x170800 --  58% complete.
Reading data from 0x174000 --  59% complete.
Reading data from 0x177800 --  60% complete.
Reading data from 0x17b000 --  61% complete.
Reading data from 0x17e800 --  62% complete.
Reading data from 0x182800 --  63% complete.
Reading data from 0x186000 --  64% complete.
Reading data from 0x189800 --  65% complete.
Reading data from 0x18d000 --  66% complete.
Reading data from 0x190800 --  67% complete.
Reading data from 0x194000 --  68% complete.
Reading data from 0x198000 --  69% complete.
Reading data from 0x19b800 --  70% complete.
Reading data from 0x19f000 --  71% complete.
Reading data from 0x1a2800 --  72% complete.
Reading data from 0x1a6000 --  73% complete.
Reading data from 0x1aa000 --  74% complete.
Reading data from 0x1ad800 --  75% complete.
Reading data from 0x1b1000 --  76% complete.
Reading data from 0x1b4800 --  77% complete.
Reading data from 0x1b8000 --  78% complete.
Reading data from 0x1bc000 --  79% complete.
Reading data from 0x1bf800 --  80% complete.
Reading data from 0x1c3000 --  81% complete.
Reading data from 0x1c6800 --  82% complete.
Reading data from 0x1ca000 --  83% complete.
Reading data from 0x1ce000 --  84% complete.
Reading data from 0x1d1800 --  85% complete.
Reading data from 0x1d5000 --  86% complete.
Reading data from 0x1d8800 --  87% complete.
Reading data from 0x1dc000 --  88% complete.
Reading data from 0x1df800 --  89% complete.
Reading data from 0x1e3800 --  90% complete.
Reading data from 0x1e7000 --  91% complete.
Reading data from 0x1ea800 --  92% complete.
Reading data from 0x1ee000 --  93% complete.
Reading data from 0x1f1800 --  94% complete.
Reading data from 0x1f5800 --  95% complete.
Reading data from 0x1f9000 --  96% complete.
Reading data from 0x1fc800 --  97% complete.
Reading data from 0x200000 --  98% complete.
Reading data from 0x203800 --  99% complete.
Reading data from 0x207800 -- 100% complete.
 1472640 bytes read: OK
## Booting kernel from Legacy Image at 22200000 ...
   Image Name:   Linux-2.6.27
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1472576 Bytes =  1.4 MB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... 
OK
   Loading Kernel Image ... 
OK
OK

Starting kernel ...

Uncompressing Linux............................................................................................... done, booting the kernel.
Linux version 2.6.27 (root@ubuntu-desktop) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #1 Wed Feb 8 18:38:14 CST 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9G10-EK
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Clocks: PLLA overclocked, 265 MHz
Clocks: CPU 265 MHz, master 132 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2 console=tty0
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [tty0] enabled
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61816KB available (2704K code, 224K data, 120K init)
Calibrating delay loop... 
132.71 BogoMIPS (lpj=663552)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after user reset
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  ? 2001-2006 Red Hat, Inc.
msgmni has been set to 120
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: 150KiB frame buffer at 23940000 (mapped at ffc00000)
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00600000 (mapped at c485c000), irq 21
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
ssc ssc.1: Atmel SSC device at 0xc4870000 (irq 15)
dm9000 Ethernet Driver, V1.31
eth0: dm9000a at c485e000,c4866044 IRQ 107 MAC: 3a:1f:34:08:54:54 (chip)
Driver 'sd' needs updating - please use bus_type methods
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Bad eraseblock 102 at 0x00cc0000
Bad eraseblock 103 at 0x00ce0000
Bad eraseblock 151 at 0x012e0000
Bad eraseblock 154 at 0x01340000
Bad eraseblock 174 at 0x015c0000
Bad eraseblock 215 at 0x01ae0000
Bad eraseblock 226 at 0x01c40000
Bad eraseblock 233 at 0x01d20000
Bad eraseblock 290 at 0x02440000
Bad eraseblock 305 at 0x02620000
Bad eraseblock 317 at 0x027a0000
Bad eraseblock 375 at 0x02ee0000
Bad eraseblock 397 at 0x031a0000
Bad eraseblock 453 at 0x038a0000
Bad eraseblock 473 at 0x03b20000
Creating 3 MTD partitions on "atmel_nand":
0x00000000-0x00400000 : "Bootstrap"
0x00400000-0x04000000 : "Partition 1"
0x04000000-0x10000000 : "Partition 2"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
usbmon: debugfs is not available
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
at91_ohci at91_ohci: init err (00000000 0000)
ohci_hcd: can't start at91
at91_ohci at91_ohci: startup error -75
at91_ohci at91_ohci: USB bus 1 deregistered
at91_ohci: probe of at91_ohci failed with error -75
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
input: gpio-keys as /class/input/input0
ads7846 spi0.2: touchscreen, irq 29
input: ADS784x Touchscreen as /class/input/input1
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
Registered led device: ds7
Registered led device: ds8
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.17.
at73c213 spi0.3: at73c213: supported bitrate is 32470 (128 divider)
ALSA device list:
  #0: AT91SAM9G10-EK external DAC on irq 15
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-at91sam9 at91_rtt.0: setting system clock to 2018-12-27 08:48:56 UTC (1545900536)
CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
Empty flash at 0x0000fffc ends at 0x00010000
CLEANMARKER node found at 0x00010000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00020000 has totlen 0xc != normal 0x0
Empty flash at 0x0002fffc ends at 0x00030000
CLEANMARKER node found at 0x00030000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00040000 has totlen 0xc != normal 0x0
Empty flash at 0x0004fffc ends at 0x00050000
CLEANMARKER node found at 0x00050000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00060000 has totlen 0xc != normal 0x0
Empty flash at 0x0006fffc ends at 0x00070000
CLEANMARKER node found at 0x00070000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00080000 has totlen 0xc != normal 0x0
Empty flash at 0x0008fffc ends at 0x00090000
CLEANMARKER node found at 0x00090000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x000a0000 has totlen 0xc != normal 0x0
Empty flash at 0x000afffc ends at 0x000b0000
CLEANMARKER node found at 0x000b0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00120000 has totlen 0xc != normal 0x0
Empty flash at 0x0012fffc ends at 0x00130000
CLEANMARKER node found at 0x00130000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00160000 has totlen 0xc != normal 0x0
Empty flash at 0x0016fffc ends at 0x00170000
CLEANMARKER node found at 0x00170000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00180000 has totlen 0xc != normal 0x0
Empty flash at 0x0018fffc ends at 0x00190000
CLEANMARKER node found at 0x00190000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x001a0000 has totlen 0xc != normal 0x0
Empty flash at 0x001afffc ends at 0x001b0000
CLEANMARKER node found at 0x001b0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x001c0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x001d0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x001e0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x001f0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00220000 has totlen 0xc != normal 0x0
Empty flash at 0x0022fffc ends at 0x00230000
CLEANMARKER node found at 0x00230000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00240000 has totlen 0xc != normal 0x0
Empty flash at 0x0024fffc ends at 0x00250000
CLEANMARKER node found at 0x00250000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00280000 has totlen 0xc != normal 0x0
Empty flash at 0x0028fffc ends at 0x00290000
CLEANMARKER node found at 0x00290000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x002a0000 has totlen 0xc != normal 0x0
Empty flash at 0x002afffc ends at 0x002b0000
CLEANMARKER node found at 0x002b0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x002c0000 has totlen 0xc != normal 0x0
Empty flash at 0x002cfffc ends at 0x002d0000
CLEANMARKER node found at 0x002d0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x002e0000 has totlen 0xc != normal 0x0
Empty flash at 0x002efffc ends at 0x002f0000
CLEANMARKER node found at 0x002f0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00300000 has totlen 0xc != normal 0x0
Empty flash at 0x0030fffc ends at 0x00310000
CLEANMARKER node found at 0x00310000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00340000 has totlen 0xc != normal 0x0
Empty flash at 0x0034fffc ends at 0x00350000
CLEANMARKER node found at 0x00350000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00360000 has totlen 0xc != normal 0x0
Empty flash at 0x0036fffc ends at 0x00370000
CLEANMARKER node found at 0x00370000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00380000 has totlen 0xc != normal 0x0
Empty flash at 0x0038fffc ends at 0x00390000
CLEANMARKER node found at 0x00390000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x003a0000 has totlen 0xc != normal 0x0
Empty flash at 0x003afffc ends at 0x003b0000
CLEANMARKER node found at 0x003b0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x003c0000 has totlen 0xc != normal 0x0
Empty flash at 0x003cfffc ends at 0x003d0000
CLEANMARKER node found at 0x003d0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x003e0000 has totlen 0xc != normal 0x0
Empty flash at 0x003efffc ends at 0x003f0000
CLEANMARKER node found at 0x003f0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00400000 has totlen 0xc != normal 0x0
Empty flash at 0x0040fffc ends at 0x00410000
CLEANMARKER node found at 0x00410000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00440000 has totlen 0xc != normal 0x0
Empty flash at 0x0044fffc ends at 0x00450000
CLEANMARKER node found at 0x00450000 has totlen 0xc != normal 0x0
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 120K
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1780784. {1985,ffce,ffff002e,4af89ed4}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1780700. {ffff,e001,ffde002d,ffff313a}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1780680. {ffff,e001,ffd2002b,ffff6ee6}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17805fc. {ffff,e001,0080ffff,ffffbe78}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1780578. {ffff,e001,0000ffff,584dffff}
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x1860140. {ffff,ffff,ffff0832,ffff55e5}
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x18805c8. {1985,ffff,ffff0696,1027ffff}
mtd->read(0x800 bytes from 0x1880000) returned ECC error
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x1880000. {ffff,e092,ffff0348,fffffafc}
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x18004bc. {1985,e002,e4ffffff,ffff06ab}
mtd->read(0x800 bytes from 0x1800000) returned ECC error
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x1800000. {ffff,e002,ffff023b,ffff9fb9}
mtd->read(0x800 bytes from 0x17e0000) returned ECC error
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x17e0000. {ffff,e002,ffff0623,ffff4815}
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x17c0704. {196f,ffff,ffff0a31,c9812e65}
mtd->read(0x800 bytes from 0x17c0000) returned ECC error
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x17c0000. {ffff,e002,ffff0481,ffff4df5}
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x17a0568. {1985,e002,00000ada,c8ffffff}
mtd->read(0x800 bytes from 0x17a0000) returned ECC error
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x17a0000. {ffff,e0d3,ffff02e5,ffff5113}
mtd->read(0x800 bytes from 0x1820000) returned ECC error
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1820000. {ffff,e002,ffff05f5,ffff1009}
mtd->read(0x800 bytes from 0x1780000) returned ECC error
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1780000. {ffff,e002,ffff02f8,ffffde51}
JFFS2 warning: (332) jffs2_do_read_inode_internal: Truncating ino #178 to 5580 bytes failed because it only had 4096 bytes to start with!
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17805a8. {ffff,fbff,00000052,ffffffff}
JFFS2 warning: (332) jffs2_do_read_inode_internal: no data nodes found for ino #179
Returned error for crccheck of ino #179. Expect badness...
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x178062c. {1985,e002,ffffffff,edd4ffff}
JFFS2 warning: (332) jffs2_do_read_inode_internal: no data nodes found for ino #180
Returned error for crccheck of ino #180. Expect badness...
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17806ac. {1985,e002,ffffffff,edd4ffff}
JFFS2 warning: (332) jffs2_do_read_inode_internal: no data nodes found for ino #181
Returned error for crccheck of ino #181. Expect badness...
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1780730. {ffff,ffff,004dffff,fffff35e}
JFFS2 warning: (332) jffs2_do_read_inode_internal: no data nodes found for ino #182
Returned error for crccheck of ino #182. Expect badness...
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17807b4. {ffff,e027,ffff0052,ed85f35e}
JFFS2 warning: (332) jffs2_do_read_inode_internal: no data nodes found for ino #183
Returned error for crccheck of ino #183. Expect badness...
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x18804cc. {1985,ffff,0000ffff,40319d68}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1880488. {1985,ffff,00000044,98f7ffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1860044. {1985,ffff,ffff00fc,ffff9d68}
mtd->read(0x800 bytes from 0x1860000) returned ECC error
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1860000. {ffff,e002,ffff0044,fffffb1d}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x182077c. {ffff,e002,0000ffff,ffff9d68}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1820738. {1985,ffff,00000044,ffffffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x18003c0. {ffff,deff,ffff00fc,ffff9d48}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x180037c. {ffff,e002,0025ffff,fffffb1d}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17e07a8. {ffff,ffff,000000fc,ffffffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17e0764. {1985,ffff,00000044,98f7fb1d}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17c0608. {1985,ffff,000000fc,4031ffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17c05c4. {1985,ffff,ffff0044,fffffb1d}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17a046c. {1985,e002,0000ffff,dde6ffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17a0428. {ffff,ffff,00000044,ffffffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x178047c. {ffff,e002,0000ffff,ffffa5d1}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1780438. {1985,ffff,00000044,ffffffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1760140. {ffff,ffff,ffff00fc,ffff9d68}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17600fc. {ffff,e002,0000ffff,fffffb1d}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17207e8. {1985,e002,000000fc,4031e3ff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17207a4. {ffff,ffff,ffffffff,98f7fb1d}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x176023c. {1985,e002,ffffffff,ffffda83}
mtd->read(0x800 bytes from 0x1700000) returned ECC error
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1700000. {ffff,e002,ffff0977,ffff97dd}
mtd->read(0x800 bytes from 0x1740000) returned ECC error
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1740000. {ffff,e019,ffff0910,ffff5867}
mtd->read(0x800 bytes from 0x1720000) returned ECC error
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1720000. {ffff,e002,ffff0661,bfffd8a3}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x188038c. {1985,e002,0000ffff,ffffffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1880348. {1985,ffff,ffff0044,98f7ffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x182063c. {1985,e002,ffffffff,ffff9d68}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x18205f8. {ffff,e002,0000ffff,98f7ffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1800280. {ffff,e0f9,ffff00fc,ffff9d68}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x180023c. {1985,e002,acffffff,fffffb1d}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17e0668. {1985,e002,000000fc,4031ffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17e0624. {ffff,ffff,ffffffff,98f7fb1d}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17c04c8. {1985,ffff,ffff00fc,4031ffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17c0484. {1985,ffff,ffff0044,98f7fb1d}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17a032c. {1985,e002,ffffffff,dde6ffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17a02e8. {1985,e002,00000044,98f7ffff}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x178033c. {1985,e002,ffffffff,ffff83d1}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17802f8. {ffff,e002,0000ffff,98f7ffff}
mtd->read(0x800 bytes from 0x1760000) returned ECC error
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1760000. {ffff,e002,ffff00fc,ffff9d68}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x17206a8. {ffff,ffff,000000fc,ffffff45}
JFFS2 notice: (332) jffs2_get_inode_nodes: Node header CRC failed at 0x1720664. {1985,ffff,00000044,98f7fb1d}
 

 

<think>我们正在解决JFFS2文件系统中出现的"truncatingino"警告问题。根据引用内容,特别是引用[3]和引用[4],我们注意到该问题可能与节点(node)的CRC校验失败有关,并且可能涉及到写入操作对其他数据区域的意外破坏。用户的问题集中在`jffs2_do_read_inode_internal`函数中出现的截断ino(inode)警告。这个警告通常发生在读取inode节点时发现其大小与实际数据不一致,因此需要进行截断(truncate)操作。这可能是由于文件系统在写入过程中被意外中断(如掉电)导致节点数据不完整,或者因为某些bug导致写入错误。根据引用[1],`jffs2_do_crccheck_inode`函数会调用`jffs2_do_read_inode_internal`来进行inode的检查。而`jffs2_do_read_inode_internal`函数在执行过程中,如果发现inode的大小(size)与节点链(nodechain)中实际存储的数据大小不一致,就会发出“truncatingino”的警告,并调整inode的大小。解决方案思路:1.首先,我们需要确认该警告是否只是由于不正确的节点数据(可能由于写入时掉电)引起的,还是由于文件系统驱动中的bug。2.如果只是偶发性的(如掉电),则可以通过文件系统自愈机制(如垃圾回收和错误纠正)来修复。但如果是驱动bug,则需要修复代码。根据引用[3]中的错误信息:“NodeheaderCRCfailed”,说明节点头部的CRC校验失败。这可能是节点数据被破坏。引用[4]中提到,写入一个dnode(数据节点)时,其他部分的数据被破坏。这暗示可能存在写入地址错误或者缓冲区溢出等问题。具体步骤:1.检查在写入操作时,是否正确计算了写入地址,以及写入的数据长度是否超出了分配的空间。2.检查在写入过程中,是否有其他并发操作修改了同一块内存或闪存区域。参考引用[2],在分配节点引用和扫描脏空间时,需要确保操作的原子性和正确性。代码层面,我们需要关注`jffs2_do_read_inode_internal`函数的实现。在该函数中,当遍历inode的节点链时,如果最后一个数据节点的结束位置(offset+size)不等于inode的size,就会发出警告并进行截断。为了避免频繁出现此警告,我们可以:-确保在写入文件时,正确地更新inode的size。-在写入数据节点时,确保节点链的连续性。另外,引用[4]中提到的写入a2时破坏了a0的数据,这可能是由于写入了错误的地址。因此,需要检查写操作的目标地址计算是否正确。针对用户的问题,我们提供以下解决方案:1.检查文件系统代码中关于写入地址计算的部分,特别是`jffs2_write_inode_range`函数和`jffs2_write_dnode`函数,确保写入地址和长度的正确性。2.检查内存管理,确保在写入过程中使用的缓冲区不会越界。3.增加调试信息,在发生截断时打印更详细的信息(如inode号、期望的大小、实际的大小等),以便定位问题。4.如果问题是由于掉电等意外导致的数据不一致,则属于正常情况,警告信息可以忽略。但如果在正常使用中频繁出现,则必须视为bug。由于用户没有提供具体的代码,我们只能根据常见原因给出建议。如果用户正在开发或调试JFFS2,可以尝试以下代码修改(以Linux内核代码为例):在`fs/jffs2/readinode.c`的`jffs2_do_read_inode_internal`函数中,当发现需要截断时,可以添加调试信息:```cprintk(KERN_WARNING"Truncatingino#%lufrom%lldto%d\n",inode->i_ino,inode->i_size,je32_to_cpu(ri->dsize));```这样可以帮助确定是哪个inode出现了问题。另外,在写入路径上,确保在更新inode的size时,同时将元数据写入闪存。检查`jffs2_write_end`函数中是否正确地更新了inode的size并写入了新的inode节点。如果问题是由并发写入引起的,可能需要增加锁的保护范围。由于问题复杂,具体解决方案需要根据实际代码和错误场景分析。相关问题:1.JFFS2文件系统在掉电后如何进行恢复?2.如何调试JFFS2文件系统中的节点CRC错误?3.JFFS2文件系统的写入流程是怎样的?</think>### JFFS2文件系统中"truncating ino"警告的解决方案 在JFFS2文件系统中,`jffs2_do_read_inode_internal`函数出现"truncating ino"警告通常是由于**inode元数据与实际数据不一致**导致的。该警告表明文件系统在读取inode时发现其声明的数据长度大于实际存储的数据长度,系统将自动截断(truncate)inode以修复不一致性。以下是根本原因和解决方案: --- #### **根本原因分析** 1. **CRC校验失败** [^1][^3] - 节点头部的CRC校验失败(如`Node header CRC failed at 0x1780784`),导致无法正确解析inode元数据。 - 可能原因:闪存写入中断(如意外断电)、硬件错误或驱动bug。 2. **数据覆盖或破坏** [^4] - 写入新数据节点(dnode)时意外覆盖其他inode的数据区域(如引用[4]中a0数据被a2写入破坏)。 - 常见于地址计算错误或缓冲区溢出。 3. **垃圾回收(GC)竞争条件** - GC进程在清理闪存块时与读写操作冲突,导致部分数据丢失。 4. **文件系统卸载异常** 强制断电或系统崩溃导致inode元数据未完整写入闪存。 --- #### **解决方案** ##### 1. 检查并修复CRC错误 - **启用完整CRC校验**:在内核配置中确保开启`CONFIG_JFFS2_SUMMARY`和`CONFIG_JFFS2_FS_WRITEBUFFER`选项,增强数据校验。 - **手动触发检查**:通过`jffs2_do_crccheck_inode()`强制重新校验问题inode[^1]: ```c struct jffs2_inode_cache *ic = ...; // 获取问题inode的cache jffs2_do_crccheck_inode(c, ic); // 执行CRC校验和修复 ``` ##### 2. 修复数据写入逻辑 - **验证地址计算**:检查`jffs2_write_inode_range()`中的偏移量计算逻辑,确保写入位置不越界[^4]。 - **防止脏空间分配错误**:在分配空间前调用`jffs2_prealloc_raw_node_refs()`和`jffs2_scan_dirty_space()`[^2]: ```c if ((err = jffs2_prealloc_raw_node_refs(c, jeb, 1))) return err; if ((err = jffs2_scan_dirty_space(c, jeb, ofs))) return err; ``` ##### 3. 处理GC竞争条件 - **增加GC锁粒度**:在GC操作和读写操作间添加更细粒度的锁,例如扩展`alloc_sem`的保护范围。 - **延迟GC操作**:当检测到高频率读写时,临时挂起GC进程。 ##### 4. 文件系统恢复 - **强制擦除重建**:若频繁出现警告,尝试擦除闪存分区并重建JFFS2文件系统: ```bash flash_eraseall /dev/mtdX mount -t jffs2 /dev/mtdblockX /mnt ``` - **使用`fsck.jffs2`工具**:离线检查文件系统镜像: ```bash fsck.jffs2 -v -e -c -f image.jffs2 ``` ##### 5. 内核调试 - **启用调试日志**:在内核启动参数添加`jffs2_dbg=1`,通过日志定位具体inode编号和操作序列。 - **分析inode缓存**:检查`icache_evict`事件[^5],确认inode是否被异常释放。 --- #### **预防措施** - **减少意外断电**:使用UPS或软关机流程。 - **优化写入负载**:避免高频小文件写入,减少GC压力。 - **定期检查**:在系统启动脚本中添加`jffs2mark`和`jffs2gc`维护工具。 > 提示:若问题在特定硬件平台出现,需检查闪存驱动(如MTD层)的时序和擦写操作是否正确。 --- ### 相关问题 1. JFFS2文件系统CRC校验失败的根本原因有哪些?如何增强其鲁棒性? 2. 在JFFS2中如何设计更安全的垃圾回收机制以避免数据损坏? 3. 如何调试JFFS2文件系统的inode元数据不一致问题? 4. 闪存硬件特性(如擦写次数限制)对JFFS2稳定性的影响是什么?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值