Thank your reply! But the different was not 128K (1420-1292=398K), and the spare space of NAND would be worked out soon if a bit error was expected when umounted each time. Was it YAFFS2's bug, or could anything be done with it ? Best Regards! albhuang From: Charles Manning Date: 2014-04-09 07:22 To: albhuang Subject: Re: [Yaffs] umount YAFFS2 block: the used NAND space was increased On Tuesday 08 April 2014 20:07:11 albhuang wrote: > Hi, > I utilized yaffs2 to K9F2G08(1Page=2K+64Bytes), the kernel was linux2.6.12. > All seemed OK except the command, umount, was executed, the used space > would be increased, each time, when a umount command followed by the mount > command. What's wrong with it. > > The following was the infoes. > > Thanks! > > [root@INTUM /]$mount > /dev/mtdblock/5 on /mnt/database type yaffs2 (rw,noatime) > [root@INTUM /]$df > Filesystem 1k-blocks Used Available Use% Mounted on > /dev/mtdblock/5 208896 1292 207604 1% /mnt/database > //the used space was 1292K > > [root@INTUM /]$umount /mnt/database/ > save exit: isCheckpointed 1 > [root@INTUM /]$mount -t yaffs2 /dev/mtdblock/5 /mnt/database/ > yaffs: dev is 32505861 name is "mtdblock5" > yaffs: passed flags "" > yaffs: Attempting MTD mount on 31.5, "mtdblock5" > [root@INTUM /]$df > Filesystem 1k-blocks Used Available Use% Mounted on > /dev/mtdblock/5 208896 1420 207476 1% /mnt/database > //the used space increased to 1420K The difference is 128k, that is one block. Yaffs budgets space for the checkpoint when it does calculations of free space, but the calculation is an approximation and works in units of blocks (because that is the unit of allocation). Therefore there is a bit of "slop" in the calculation and one or two blocks of error is to be expected. -- Charles