The program gives a report similar to:
Processed 90319 files.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 79% 1.4G 1.8G 1.9G
none 100% 1.0G 1.0G 1.0G
lzo 53% 446M 833M 843M
The fields above are:
Let's see this on an example: a file 128K big is stored as a single extent A which compressed to a single 4K page. It then receives a write of 32K at offset 32K, which also compressed to a single 4K page, stored as extent B.
The file now appears as:
+-------+-------+---------------+
extent A | used | waste | used |
+-------+-------+---------------+
extent B | used |
+-------+
The "waste" inside extent A can't be gotten rid until the whole extent is rewritten (for example by defrag). If compressed, the whole extent needs to be read every time that part of the file is being read, thus the "waste" is still required.
In this case, we have: Disk Usage: 8KB, Uncompressed: 160K, Referenced: 128K.
The ioctls used by this program require root.
Inline extents are considered to be always unique, even if they share the same bytes on the disk.
This program doesn't currently support filesystems above 8TB on 32-bit machines but neither do other btrfs tools.