Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 456178 - dev-util/ccache: CCACHE_SIZE uses apparent size rather than size on disk
Summary: dev-util/ccache: CCACHE_SIZE uses apparent size rather than size on disk
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Robin Johnson
URL: https://github.com/ccache/ccache/issu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-08 15:29 UTC by Richard Yao (RETIRED)
Modified: 2019-07-19 22:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Yao (RETIRED) gentoo-dev 2013-02-08 15:29:12 UTC
I put ccache on a ZFS dataset and switched to ZFS' internal compression to eliminate fork overhead. Unfortunately, the dataset's space usage never exceeds 3GB while the apparent space usage corresponds to CCACHE_SIZE, which I set to 8GB.

It seems that ccache uses the apparent size rather than the actual size when managing its cache. This is not desirable behavior.
Comment 1 SpanKY gentoo-dev 2014-11-01 07:59:30 UTC
the code does:
size_t
file_size(struct stat *st)
{
    size_t size = st->st_blocks * 512;
    if ((size_t)st->st_size > size) {
        /* probably a broken stat() call ... */
        size = (st->st_size + 1023) & ~1023;
    }
    return size;
}

i guess we could delete that fallback logic
Comment 2 SpanKY gentoo-dev 2014-11-01 08:11:49 UTC
should be all set now in the tree; thanks for the report!

Commit message: Fix disk usage checks
http://sources.gentoo.org/dev-util/ccache/ccache-3.1.10-r1.ebuild?rev=1.1
http://sources.gentoo.org/dev-util/ccache/files/ccache-3.1.10-size-on-disk.patch?rev=1.1