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.
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
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