Jffs2 issue on latest mtd for Sibley NOR

Menon, Nishanth x0nishan at ti.com
Tue Nov 22 10:55:23 EST 2005


Hi All,
I have been trying Sibley NOR flash and the latest (as of today) MTD
tree on my kernel.
When I use the character device, I am able to unlock, erase, write and
read from it successfully. Unfortunately, when I try to use jffs2 on it,
I face the following issue:
root at 128.247.81.110:/mnt# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00020000 "bootloader"
mtd1: 00020000 00020000 "params"
mtd2: 00200000 00020000 "kernel"
mtd3: 03dc0000 00020000 "filesystem"
mtd4: 00040000 00040000 "bootloader"
mtd5: 00040000 00040000 "params"
mtd6: 00200000 00040000 "kernel"
mtd7: 07d80000 00040000 "filesystem"

> The first 4 are my strata flash partitions which work fine - even
jffs2 works on it.

root at 128.247.81.110:~/nor/mtd-util# mount -t jffs2 /dev/mtdblock/6 /mnt/
root at 128.247.81.110:~/nor/mtd-util# cd /mnt
root at 128.247.81.110:/mnt# ls
root at 128.247.81.110:/mnt# touch a
root at 128.247.81.110:/mnt# jffs2: Couldn't find erase block to garbage
collect!
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00000000
Refiling block at 00000000 to bad_used_list
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00040000
Refiling block at 00040000 to bad_used_list
jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they
all?
jffs2: Couldn't find erase block to garbage collect!
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00080000
Refiling block at 00080000 to bad_used_list
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 000c0000
Refiling block at 000c0000 to bad_used_list
jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they
all?
jffs2: Couldn't find erase block to garbage collect!
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00100000
Refiling block at 00100000 to bad_used_list
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00140000
Refiling block at 00140000 to bad_used_list
jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they
all?
jffs2: Couldn't find erase block to garbage collect!
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00180000
Refiling block at 00180000 to bad_used_list
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 001c0000
Refiling block at 001c0000 to bad_used_list
jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they
all?
jffs2: Couldn't find erase block to garbage collect!

root at 128.247.81.110:/mnt# ls
a
root at 128.247.81.110:/mnt# cd
root at 128.247.81.110:~# umount /mnt
root at 128.247.81.110:~# mount -t jffs2 /dev/mtdblock/6 /mnt/
Empty flash at 0x00040018 ends at 0x00040400
Eraseblock header found at 0x00040400 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040418 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040430 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040448 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040460 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040478 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040490 is not at the beginning of block
(0x00040000)
Empty flash at 0x000404a8 ends at 0x000404c0
root at 128.247.81.110:~#

For comparison: Strata flash:
root at 128.247.81.110:~/nor/mtd-util# ./flash_unlock /dev/mtd/2
root at 128.247.81.110:~/nor/mtd-util# ./flash_eraseall -j /dev/mtd/2
Erasing 128 Kibyte @ 1e0000 -- 93 % complete. Cleanmarker written at
1e0000.
root at 128.247.81.110:~/nor/mtd-util# mount -t jffs2  /dev/mtdblock/2 /mnt
root at 128.247.81.110:~/nor/mtd-util# cd /mnt
root at 128.247.81.110:/mnt# touch a
root at 128.247.81.110:/mnt# ls
a
root at 128.247.81.110:/mnt# echo "ehllow">a
root at 128.247.81.110:/mnt# cd -
/root/nor/mtd-util
root at 128.247.81.110:~/nor/mtd-util# umount /mnt
root at 128.247.81.110:~/nor/mtd-util# mount -t jffs2  /dev/mtdblock/2 /mnt
root at 128.247.81.110:~/nor/mtd-util# cd -
/mnt
root at 128.247.81.110:/mnt# cat a
ehllow
root at 128.247.81.110:/mnt# cd -
/root/nor/mtd-util
root at 128.247.81.110:~/nor/mtd-util# umount /mnt

root at 128.247.81.110:~/nor/mtd-util# ./flash_info /dev/mtd/2
Device /dev/mtd/2 has 0 erase regions
root at 128.247.81.110:~/nor/mtd-util# ./flash_info /dev/mtd/6
Device /dev/mtd/6 has 0 erase regions

My .config for JFFS2 looks like the following:
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=2
CONFIG_JFFS2_FS_WRITEBUFFER=y
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
# CONFIG_JFFS2_LZO is not set
# CONFIG_JFFS2_LZARI is not set
# CONFIG_JFFS2_CMODE_NONE is not set
CONFIG_JFFS2_CMODE_PRIORITY=y
# CONFIG_JFFS2_CMODE_SIZE is not set
CONFIG_JFFS2_PROC=y

Has any body else seen a similar problem?

Regards,
Nishanth Menon




More information about the linux-mtd mailing list