Understanding JFFS2 behavior

Shawn Jin shawnxtech at yahoo.com
Thu Feb 12 17:30:01 EST 2004


Hi,

When mounting a mtd device (chip Am29PL320D, 8MB, erase block 512KB, bus
width 64 bits), I observed the following behavior of JFFS2 and don't
understand what's going on inside JFFS2. 

The available space in the mtd is shrinking quickly and in the end it
leaves 0%. As a matter of fact, the mtd device only has one file
/var/log/messages with length 0. Then I cannot create any file there
because of the lack of disk space.

I know that 5 blocks need to be reserved for garbage colletion. But is this
related the gc? Is the phenomenon normal? BTW, I use the latest mtd/jffs2
code from CVS.

-Shawn.

bash-2.05# mount -t jffs2 /dev/mtdblock1 /mnt
bash-2.05# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/nfs               7044432   5535224   1151364  83% /
/dev/mtdblock1            8192      2052      6140  26% /mnt
bash-2.05# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/nfs               7044432   5535228   1151360  83% /
/dev/mtdblock1            8192      3588      4604  44% /mnt
bash-2.05# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/nfs               7044432   5535232   1151356  83% /
/dev/mtdblock1            8192      4612      3580  57% /mnt
bash-2.05# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/nfs               7044432   5535248   1151340  83% /
/dev/mtdblock1            8192      8192         0 100% /mnt
bash-2.05# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/nfs               7044432   5535248   1151340  83% /
/dev/mtdblock1            8192      8192         0 100% /mnt
bash-2.05# 

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html



More information about the linux-mtd mailing list