xfstests: test ext4 statfs
authorEric Sandeen <sandeen@redhat.com>
Thu, 25 Oct 2012 17:19:24 +0000 (17:19 +0000)
committerRich Johnston <rjohnston@sgi.com>
Mon, 29 Oct 2012 13:47:09 +0000 (08:47 -0500)
commit0b2ab695c1332e1345762e08b3b32be4a4009576
tree375e8ead0b99702ec79952526ee94a38e1170d1e
parente2e226715b90e1cb98e45046967109d0c8cc82c9
xfstests: test ext4 statfs

Calculating free blocks in ext[234] is surprisingly hard, since
by default we report "bsd" style df which doesn't count filesystem
"overhead" blocks as used.

With a lot of code dedicated to sorting out what to report as
free, things tend to go wrong surprisingly often.

Here's a test to actually try to stop the next regression.  ;)

NB: For bsddf, the kernel currently does not count journal blocks
as overhead; it probably should.  But the test below looks to have
the result within 1% of perfection, so it still passes even if
the kernel doesn't count the journal against free blocks.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
289 [new file with mode: 0755]
289.out [new file with mode: 0644]
group