[EMAIL PROTECTED] (Stefan Huelswitt) wrote:
> some days ago we discussed the diskusage calculation in purge.c .
> I had a closer look on it. And I think there is a logical error
> in purge.c with the min diskfree feature.
> 
> The free disk space is read once before the purge starts. So all
> diskspace calculations are based on the situation before purging
> and the diskspace which is freed in pass 1 is not counted. This
> way too much is deleted in pass 2 in a low diskspace situation.

I think that you are correct.  There is no modification to the
diskfree amount during the first pass when the old files are deleted.
This means that when the amount of free disk space is calculated for
use in the second pass it is wrong.

When I tested this option there would have been no files deleted in
the first pass because the cache would already have been purged
recently.  (During testing I would have run 'wwwoffle -purge' lots of
times.)  This would mean that the program would work as expected.

This is a much more likely reason for people to see a smaller cache
than expected.  The information about du / wwwoffle differences still
applies, but will tend to be a small affect.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             [EMAIL PROTECTED]
                                      http://www.gedanken.demon.co.uk/

WWWOFFLE users page:
        http://www.gedanken.demon.co.uk/wwwoffle/version-2.6/user.html

Reply via email to