Re: [squid-users] Re: cache_dir aufs grows larger than config'ed

From: Marcus Kool <marcus.kool_at_urlfilterdb.com>
Date: Mon, 04 Oct 2010 13:23:23 -0300

The code example that you sent earlier shows it clearly:
there is an overflow bug.

it is extremely easy to fix too.

Marcus

Rich Rauenzahn wrote:
> On Mon, Oct 4, 2010 at 2:56 AM, Matus UHLAR - fantomas
> <uhlar_at_fantomas.sk> wrote:
>> On 29.09.10 17:42, Rich Rauenzahn wrote:
>>> This code strikes me as incorrect... Basically for files > 2GB, squid
>>> does the accounting wrong!
>> It's apparently just a filesystem overhead, which varies between filesystems
>> but may eat some % of disk space.
>
> No, it's a bug. File system overhead doesn't account for taking 2-3
> times more space than what squid says it is using. See
> http://bugs.squid-cache.org/show_bug.cgi?id=3068
>
>>> Note that sizeof(int) is 4 in both 32bit and 64bit compilation models.
>>> I believe that blks * fs.blksize overflows 32bit before it is right
>>> shifted by 10 bits.
>> if you want to use filesizes over 2GB on 32bit system, you must make your
>> program to be 64-bit capable, and compile it that way.
>>
>> the same applies about using 64bit numbers.
>
> No, "int"s are still 32bit in the 64bit compilation model. And they
> will still overflow.
>
> Rich
>
>
Received on Mon Oct 04 2010 - 16:23:27 MDT

This archive was generated by hypermail 2.2.0 : Mon Oct 04 2010 - 12:00:01 MDT