• D
    xfs: Check new inode size is OK before preallocating · 07f1a4f5
    Dave Chinner 提交于
    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.
    
    (Fixed a reference to "newsize" to read "new_size". -Alex)
    Signed-off-by: NDave Chinner <dchinner@redhat.com>
    Reviewed-by: NChristoph Hellwig <hch@lst.de>
    Signed-off-by: NAlex Elder <aelder@sgi.com>
    07f1a4f5
xfs_iops.c 19.9 KB