summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorAndrew Price2014-11-12 18:24:04 +0100
committerSteven Whitehouse2014-11-14 15:15:04 +0100
commit1885867b84d58e3704ed175e0abac2f38889f34d (patch)
treed4b37a4e65553290d4c2323f14f10f8d9a621e5e /fs/block_dev.c
parentGFS2: Use inode_newsize_ok and get_write_access in fallocate (diff)
downloadkernel-qcow2-linux-1885867b84d58e3704ed175e0abac2f38889f34d.tar.gz
kernel-qcow2-linux-1885867b84d58e3704ed175e0abac2f38889f34d.tar.xz
kernel-qcow2-linux-1885867b84d58e3704ed175e0abac2f38889f34d.zip
GFS2: Update i_size properly on fallocate
This addresses an issue caught by fsx where the inode size was not being updated to the expected value after fallocate(2) with mode 0. The problem was caused by the offset and len parameters being converted to multiples of the file system's block size, so i_size would be rounded up to the nearest block size multiple instead of the requested size. This replaces the per-chunk i_size updates with a single i_size_write on successful completion of the operation. With this patch gfs2 gets through a complete run of fsx. For clarity, the check for (error == 0) following the loop is removed as all failures before that point jump to out_* labels or return. Signed-off-by: Andrew Price <anprice@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/block_dev.c')
0 files changed, 0 insertions, 0 deletions