Calculation of JFFS2 free space

Sohn Chung-MCG31424 ChungSohn at motorola.com
Thu Feb 8 10:53:24 EST 2007


Hello,
I am using JFFS2 (Linux 2.6.10) on the Large Page NAND flash.
The size of JFFS2 partition is 7M. While applications were holding some
files,
I copied over an 8M file to this partition to make the filesystem full.
After I got the out of space message, I issued the 'df' command.

The output of df was:
# df /jffs2
/dev/mtdblock/3    7168   7023   136   98% /jffs2

# cd /jffs2
# touch foo
touch: foo: No space left on device

The jffs2_statfs returned 136K as the available space.
After the filesystem is full, how the application program can figure out
the real available space on JFFS2 before write?

Thanks in advance.
Chung




More information about the linux-mtd mailing list