[Yaffs] [Yaffs-archive] Re: remaining space on file system

Charles Manning manningc2@actrix.gen.nz
Sat, 26 Jul 2003 12:35:16 +1200


On Friday 25 July 2003 18:30, Stephan Linke wrote:
> Hi,
>
> my problem with df or statfs() is that I am affraid it doesn't exactly show
> the remaining space because of the problem of partialy used chunks.
>
> Stephan

OK, I still don't fully understand what you're trying to achieve and why.

The only place you get partially used chunks in YAFFS is at the end of a file 
(ie. last chunk in the file). The space is 'in use' as these areas can't be 
swept together/reclaimed etc.

When YAFFS writes a "patch"  to overwrite a section of a file it does this at 
a chunk granularity. ie one chunk replaces the other. Thus you don't get any 
partial page recovery during a garbage collection.

So, if you have 4 files of one byte each, that's (512-1)*4=511*4 = 2044 bytes 
of 'partially used chunks'  that is not being used, but there is no way you 
can reclaim that space and use it for other purposes.

-- CHarles


---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by 
sending an email to yaffs-request@toby-churchill.org with the text "unsubscribe" 
(without the quotes) as the subject.