public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* JFFS2 Corruption.
@ 2004-02-19 16:48 simon
  2004-02-23 11:07 ` simon
  0 siblings, 1 reply; 38+ messages in thread
From: simon @ 2004-02-19 16:48 UTC (permalink / raw)
  To: linux-mtd

I am having problems using JFFS2 filesystems on a NAND device. I have had 
these problems in the past an decided not to use this method for storing my data.
I would really like to do this and I was wondering if anyone else had been able to 
run such a system reliably ? The NAND device is a 128MB SMC and I have 
downloaded the mtd code from CVS within the last week.

I am using mtdpart to provide partitions but for the moment I am only using mtd1 as 
a root file system. To build this I perform the following steps.


1. Boot system via network and mount nfs root
2. eraseall /dev/mtd1
3. mount -t jffs2 /dev/mtdblock1 /smc
4. cd /smc
5. tar xvzf /rootfilesystem.tgz
6. unmount /smc

I then reboot using the SMC as my root filesystem. As the system gets rebooted 
and incurrs more writes I get the following kinds of message

Empty flash at 0x00469ffcb ends at 0x0046a000

or

jffs2_scan_dirent_node(): Node CRC failed on node at 0x0046a7f0 
read 0xffffffff calculated 0xdec8161b

I have written in before about these messages and I understand that the first is of 
no concern but the second relates to write data which may not have been written to 
the SMC.

The thing is I have had this happen on two completely different harware designs. 
On an X86 board and the other a PPC. 

I have checked and the OS umounts root as it shuts down. Also I cannot find 
fsck.jffs2 in the util directory. Does it exist ?

In trying to debug this I noticed that the device was still reporting busy when 
nand_command was entered. I have put a line of code in to delay until the device is 
ready at the start of the routine. It is my understanding that if the device is busy 
when you try and select/deselect or send a command the outcome cannot be 
predicted. If this is not the case I would like to understand why. If it is how does any 
of the NAND code work ? 

Any help greatly appreciated 


Cheers Simon.







   __________________________

Simon Haynes - Baydel 
Phone : 44 (0) 1372 378811
Email : simon@baydel.com
__________________________

^ permalink raw reply	[flat|nested] 38+ messages in thread
* JFFS2 corruption
@ 2004-02-05 13:15 Florian Schirmer
  2004-02-08 10:37 ` David Woodhouse
  2004-02-08 11:28 ` David Woodhouse
  0 siblings, 2 replies; 38+ messages in thread
From: Florian Schirmer @ 2004-02-05 13:15 UTC (permalink / raw)
  To: linux-mtd

Hi,

i'm having a strange problem with a JFFS2 filesystem: I always get messages
about incorrect CRC values while mounting the filesystem. What i did:

<create a file which contains nothing but lots of 0x42 called dummy.bin>

eraseall -j /dev/mtdblock/3
mount -t jffs2 /dev/mtdblock /mnt
cp /dummy.bin /mnt/dummy1.bin
cp /dummy.bin /mnt/dummy2.bin
cp /dummy.bin /mnt/dummy3.bin
cp /dummy.bin /mnt/dummy4.bin
sync
cat /dev/mtdblock/3 > /dump1.raw
umount /mnt
cat /dev/mtdblock/3 > /dump2.raw
mount -t jffs2 /dev/mtdblock /mnt

<Multiple messages about invalid JFFS2 CRC values>

cat /dev/mtdblock/3 > /dump3.raw

cmp -l /dump1.raw /dump2.raw => files are the same
cmp -l /dump2.raw /dump3.raw => Multiple differences.

Did some addition tests:

umount /mnt
cat /dev/mtdblock/3 > /dump2.raw
mount -t jffs2 /dev/mtdblock /mnt

Mounts just fine. But there are huge chunks of 0x00 in my dummy files on the
jffs2 partition.

Any ideas on how to track down this problem? Basic MTD/flash stuff seems to
work just fine. I can work with a cramfs image on this partition without any
errors. So i assume something is going wrong in the JFFS2 code.

Specs:

Build Host: x86
Target: MIPS (LE)
Flash: NOR (AMD)
MTD/JFFS2 Codebase: current CVS

Thanks,
   Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2004-03-19 11:11 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-19 16:48 JFFS2 Corruption simon
2004-02-23 11:07 ` simon
2004-02-24  9:48   ` simon
2004-02-24 12:00     ` David Woodhouse
2004-02-24 12:54       ` Simon Haynes
2004-02-24 13:04       ` Simon Haynes
2004-02-24 13:40         ` Simon Haynes
2004-02-24 14:22           ` David Woodhouse
2004-02-24 14:25             ` Simon Haynes
2004-02-24 14:56               ` David Woodhouse
2004-02-24 14:58                 ` Simon Haynes
2004-02-24 15:35                   ` David Woodhouse
2004-02-24 15:47                     ` Simon Haynes
2004-02-24 16:14                       ` David Woodhouse
2004-02-24 16:17                         ` Simon Haynes
2004-02-24 16:51                           ` David Woodhouse
2004-02-24 17:05                             ` Simon Haynes
2004-02-24 18:05                               ` David Woodhouse
2004-02-24 18:04                                 ` Simon Haynes
2004-02-25  9:49                                 ` simon
2004-02-25 10:25                                   ` David Woodhouse
2004-02-26 11:08                                     ` Simon Haynes
2004-02-26 11:55                                       ` David Woodhouse
2004-03-03 15:31                                       ` David Woodhouse
2004-03-08 15:10                                         ` Simon Haynes
2004-03-09 15:33                                           ` Simon Haynes
2004-03-16 16:14                                             ` David Woodhouse
2004-03-19 10:37                                               ` Simon Haynes
2004-03-19 11:11                                                 ` David Woodhouse
2004-02-24 17:12                             ` Simon Haynes
2004-02-24 16:55                           ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2004-02-05 13:15 JFFS2 corruption Florian Schirmer
2004-02-08 10:37 ` David Woodhouse
2004-02-08 11:38   ` Florian Schirmer
2004-02-08 11:53     ` David Woodhouse
2004-02-08 17:02       ` Florian Schirmer
2004-02-08 17:13         ` David Woodhouse
2004-02-08 11:28 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox