Whamcloud - gitweb
e2freefrag: fix free blocks count during live scan
In e2freefrag live scan mode, we take the free block count from the
ondisk superblock. This leads to screwy histogram percentages:
Extent Size Range : Free extents Free Blocks Percent
4M... 8M- : 5 8234 1.05%
64M... 128M- : 2 52279 6.64%
512M... 1024M- : 1 202752 25.74%
...because there could be superblock updates in the journal that haven't
yet been checkpointed. The online scan is perfectly capable of tallying
the free blocks on its own, so teach it do that and make a more accurate
report.
Reported-by: Elana Hashman <Elana.Hashman@twosigma.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>