diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-22 17:56:49 +1100 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-22 17:56:49 +1100 |
commit | 9f6c92b9cc2fd41d6c7b493be5637cc5b5659880 (patch) | |
tree | 64ea95c3305d2bba4191f7dec831e623bff8a911 /fs/xfs/xfs_error.c | |
parent | 4fdc7781799926dca6c3a3bb6e9533a9718c4dea (diff) | |
download | blackbird-op-linux-9f6c92b9cc2fd41d6c7b493be5637cc5b5659880.tar.gz blackbird-op-linux-9f6c92b9cc2fd41d6c7b493be5637cc5b5659880.zip |
[XFS] Fix speculative allocation beyond eof
Speculative allocation beyond eof doesn't work properly. It was
broken some time ago after a code cleanup that moved what is now
xfs_iomap_eof_align_last_fsb() and xfs_iomap_eof_want_preallocate()
out of xfs_iomap_write_delay() into separate functions. The code
used to use the current file size in various checks but got changed
to be max(file_size, i_new_size). Since i_new_size is the result
of 'offset + count' then in xfs_iomap_eof_want_preallocate() the
check for '(offset + count) <= isize' will always be true.
ie if 'offset + count' is > ip->i_size then isize will be i_new_size
and equal to 'offset + count'.
This change fixes all the places that used to use the current file
size.
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_error.c')
0 files changed, 0 insertions, 0 deletions