fix wrap-around with partitions over 4 TB by using a 64-bit counter

Review Request #103496 - Created Dec. 21, 2011 and submitted

Anssi Hannula
Filelight uses a divide-by-1024 trick to fit sizes over 4 GB into a
quint32. However, the current code will wrap around again at 4 TB.

Simply switch to quint64 and drop the use of divide-by-1024 trick to get
rid of the 4 TB wrap-around.

The performance penalty on a 32-bit system seems immeasurable. On a
filesystem with 1500000 files (13 TB) the process user time is only 1..5
seconds on i7-960, with quint32/64 having no effect. Most of the
wallclock time (20..500 sec in the above case, depending on cache
state) is spent waiting for I/O anyway.

Note that on 32-bit systems files over 2 GB are still completely ignored
unless built with large file support.

Note that this patch is on top of
Built git master with the patch, tested to fix wrap-around on both 64-bit and 32-bit systems, and checked briefly that performance didn't suffer as noted in the description.
Martin Tobias Holmedahl Sandsmark
Martin Tobias Holmedahl Sandsmark
Anssi Hannula
Review request changed

Status: Closed (submitted)