Re: [Yaffs] df problem on yaffs2

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: JiSheng Zhang
Date:  
To: yaffs
Subject: Re: [Yaffs] df problem on yaffs2
Hi Charles,

2009/12/16 Charles Manning <>:
> On Wednesday 16 December 2009 16:36:02 JiSheng Zhang wrote:
>> 2009/12/16 JiSheng Zhang <>:
>> > Hi list,
>> >
>> > First mount an empty partition, then cp some files to the mnt dir then
>> > run "df", and then delete all the files, then run "df" again. df
>> > report this time is wrong. It seems that the chunks occupied by
>> > unlinked files aren't recycled until needed.
>> >
>> > Is this a bug or characteristic?
>
> I don't see that problem.
>
> root@linux-dual-head:/opt/y/cvs/yaffs2# mount -t yaffs2 /dev/mtdblock0 /mnt
> root@linux-dual-head:/opt/y/cvs/yaffs2# df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/mtdblock0           65536      1152     64384   2% /mnt


Here used blocks is 1152.

> root@linux-dual-head:/opt/y/cvs/yaffs2# cp * /mnt
> root@linux-dual-head:/opt/y/cvs/yaffs2# df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/mtdblock0           65536      5860     59676   9% /mnt
> root@linux-dual-head:/opt/y/cvs/yaffs2# rm /mnt/*
> root@linux-dual-head:/opt/y/cvs/yaffs2# df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/mtdblock0           65536      1156     64380   2% /mnt


Here used blocks is 1156. So there are 4 blocks lost.

Regards,
Jisheng