|
statfs call reports incorrect amount of free space: msg#00065linux.file-systems.yaffs
Hi, all
It looks like statfs call reports incorrect amount of free space available on device. It is off by the number of "deleted" but "uncollected" by garbage collector files on device which can be signifficant in certain cases.
Such files belongs to "deleted" directory and while the amount of space occupiend by data in such files is acounted as free, the entry in directory is NOT.
The proposed fix does two things:
1: nDeletedFiles variable would correctly count the number of "deleted" but uncollected files
2: the number of free blocks is adjusted by that value.
--- ./old/yaffs_guts.c 2005-12-19 20:02:18.000000000 -0800
_______________________________________________+++ ./yaffs_guts.c 2005-12-20 11:54:58.000000000 -0800 @@ -2346,6 +2346,7 @@ ("yaffs: About to finally delete object %d" TENDSTR), object->objectId)); yaffs_DoGenericObjectDeletion(object); + object->myDev->nDeletedFiles--; } } @@ -5690,6 +5691,8 @@ nFree = yaffs_CountFreeChunks(dev); #endif + nFree += dev->nDeletedFiles; + /* Now count the number of dirty chunks in the cache and subtract those */ { yaffs mailing list yaffs@xxxxxxxxxxxxxxxxxxxxxx http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: can't see files after umount (Lance Ware): 00065, yuri . golovach |
|---|---|
| Next by Date: | Re: Re: can't see files after umount (Lance Ware): 00065, Sergey Kubushyn |
| Previous by Thread: | Re: can't see files after umount (Lance Ware)i: 00065, yuri . golovach |
| Next by Thread: | yaffs - kernel 2.6.14 compile error: 00065, Nguyen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |