NAND JFFS2 mount umount problems

Liao Kai carlliao at 21cn.com
Thu Sep 1 05:28:19 EDT 2005


HI ALL,

I used the linux-2.6.11 kernel from MIPS-LINUX.ORG. I am not sure which 
snapshot does it merged from. The drivers/mtd/mtdchar.c is:
    $Id: mtdchar.c,v 1.66 2005/01/05 18:05:11 dwmw2 Exp $

I tried to test my NAND flash driver following the steps below:

(1) Format the NAND partition to JFFS2, mount it and read/write for
100 times. There are no error at all.
    $ eraseall -j /dev/mtd/0
    $ mount -t jffs2 /dev/mtdblock/0 /mnt  
      
Then repeat the following step 100 times:
    $ rm -f /mnt/test.rpm
    $ cp -f /test/nand/test.rpm /mnt
    $ cp -f /mnt/test.rpm /test/nand/dump${i}.rpm
    where ${i} are [1..100]
    
After 100 read/write, then umount the NAND partition.

(2) If at each time, first mount /dev/mtdblock/0, copy the test.rpm file out,
then umount /dev/mtdblock/0, about 8 copied files will be corrupted.
    $ eraseall -j /dev/mtd/0
    $ mount -t jffs2 /dev/mtdblock/0 /mnt 
    $ cp -f /test/nand/test.rpm /mnt
    $ umount /mnt
    
Then repeat the following step 100 times:
    $ mount -t jffs2 /dev/mtdblock/0 /mnt
    $ cp -f /mnt/test.rpm /test/nand/dump${i}.rpm
    where ${i} are [1..100]
    $ umount /mnt
    
Could you please give me some hints about this problem? Thanks!

Carl Liao





More information about the linux-mtd mailing list