xfstests: test speculative preallocation reclaim on ENOSPC/EDQUOT
authorBrian Foster <bfoster@redhat.com>
Tue, 17 Jun 2014 23:33:26 +0000 (09:33 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 17 Jun 2014 23:33:26 +0000 (09:33 +1000)
commit34ff5cdfc474b485d62e8ecda66856046573e11c
treeee7d02e45ffeeab815878e5139a602d23c6da398
parentf8c880df31d56121f50070b4812f3b07a2295b90
xfstests: test speculative preallocation reclaim on ENOSPC/EDQUOT

XFS can allocate significant amounts of space to files via speculative
preallocation. Such preallocation may not be reclaimed automatically on
file close() if a file is repeatedly opened and extended. For smaller
filesystems with relatively large and slow growing files, this
preallocation can linger for some time, including contributing to out of
space conditions.

Create a situation where an fs is near out of space while several files
still have lingering, significant preallocations. Verify that new
writers reclaim the preallocated space rather than return ENOSPC. Repeat
a similar test for quota limits and EDQUOT.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/xfs/014 [new file with mode: 0755]
tests/xfs/014.out [new file with mode: 0644]
tests/xfs/group