On Fri, May 21, 2010 at 03:47:59PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> The new xfsqa test 228 tries to preallocate more space than the
> filesystem contains. it should fail, but instead triggers an assert
> about lock flags. The failure is due to the size extension failing
> in vmtruncate() due to rlimit being set. Check this before we start
> the preallocation to avoid allocating space that will never be used.
> Also the path through xfs_vn_allocate already holds the IO lock, so
> it should not be present in the lock flags when the setattr fails.
> Hence the assert needs to take this into account. This will prevent
> other such callers from hitting this incorrect ASSERT.
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Can you also add a check to 228 to ensure the space doesn't stay
allocate when the test fails, to catch the old XFS behaviour.