Re: nntpcache expiring everything, logging errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




	I think that I may have discovered the answer to my own
question.  Looking in expire.c, I find this snippet of code:

    /* Create Blocks Used and Inodes Used shortcuts */
    #define BU ((blocks - bavail) / (.01 * blocks ))
    #define IU ((files - ffree) / (.01 * files ))
    /* logen (("bu = %2.1f, iu = %2.1f", BU, IU)); */

    if (!(force || BU > con->minBlocksFreePercent || IU > con->minFilesFreePercent))
	return FALSE;

	Now, call me stupid, but these comparisons make absolutely no
sense to me.  Why are we checking the Blocks Used against the minimum
Blocks Free, or the Inodes Used against the minimum Files Free?  I'd
think that the proper comparisons would be:

    /* Create Blocks Free and Inodes Free shortcuts */
    #define BF ( 100 * bavail / blocks )
    #define IF ( 100 * ffree / files )
    /* logen (("bf = %2.1f, if = %2.1f", BF, IF)); */

    if (!(force || BF < con->minBlocksFreePercent || IF < con->minFilesFreePercent))
	return FALSE;

	I haven't actually rebuild nntpcache with this yet, as I'm
hoping that someone can explain the logic behing the original
comparisons.

-- 
Either you can say I'm for Open Source, open standards, or I'm against
standards. Either you can say I'm for giving customers and communities
a choice or I'm against giving customers and communities a choice.
        - Sam Palmisano, IBM President and COO at LinuxWorld Expo 2001


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux