GFS2: Clean up stuffed file copying
authorSteven Whitehouse <swhiteho@redhat.com>
Thu, 25 Mar 2010 14:32:43 +0000 (14:32 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 29 Mar 2010 13:29:17 +0000 (14:29 +0100)
commit602c89d2e3e8652f94a697c9a919be739b9bcdd5
tree791c0f4ea2b1f9028f7fdf60dbedd42fa0f8ce06
parent4cb947b59c5835783fb96aad2f7d92b1e4250aff
GFS2: Clean up stuffed file copying

If the inode size was corrupt for stuffed files, it was possible
for the copying of data to overrun the block and/or page. This patch
checks for that condition so that this is no longer possible.

This is also preparation for the new truncate sequence patch which
requires the ability to have stuffed files with larger sizes than
(disk block size - sizeof(on disk inode)) with the restriction that
only the initial part of the file may be non-zero.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/aops.c
fs/gfs2/bmap.c