Sparse files cause malproportioned charts and "usage" reporting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
baobab (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When scanning dirs with sparse files, the full file size is used in computing Usage % (in the table) and also for calculating the ring size. Curiously wherever a file size is mentioned (in table or highlighting a ring piece) the dirs allocated size is displayed (same as what `du -hs` would show).
This leads to weird behavior where dirs with similar reported size (in both baobob and du) have wildly different Usage% and ring size if some contain sparse files. It is inconsistent (either both should be allocated size or both be file size), but to match `du` I would argue that allocated size should be used.
I glanced at the code and I think the simple fix would be to change the percent calculation in baobab-scanner.vala from using size to using alloc_size. Likewise in the calculation for charts.
Status changed to 'Confirmed' because the bug affects multiple users.