summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.h
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2014-10-02 09:44:54 +1000
committerDave Chinner <david@fromorbit.com>2014-10-02 09:44:54 +1000
commitda5f10969d54006a24777a84ed3eaeeb2a21047f (patch)
treec8628a9d1c90065d96e960f1ce0b430d59779542 /fs/xfs/xfs_log.h
parent07d08681d26e99d8ba3bc4e56380f2cc04d3ff3b (diff)
downloadlinux-stable-da5f10969d54006a24777a84ed3eaeeb2a21047f.tar.gz
linux-stable-da5f10969d54006a24777a84ed3eaeeb2a21047f.tar.bz2
linux-stable-da5f10969d54006a24777a84ed3eaeeb2a21047f.zip
xfs: flush the range before zero range conversion
XFS currently discards delalloc blocks within the target range of a zero range request. Unaligned start and end offsets are zeroed through the page cache and the internal, aligned blocks are converted to unwritten extents. If EOF is page aligned and covered by a delayed allocation extent. The inode size is not updated until I/O completion. If a zero range request discards a delalloc range that covers page aligned EOF as such, the inode size update never occurs. For example: $ rm -f /mnt/file $ xfs_io -fc "pwrite 0 64k" -c "zero 60k 4k" /mnt/file $ stat -c "%s" /mnt/file 65536 $ umount /mnt $ mount <dev> /mnt $ stat -c "%s" /mnt/file 61440 Update xfs_zero_file_space() to flush the range rather than discard delalloc blocks to ensure that inode size updates occur appropriately. [dchinner: Note that this is really a workaround to avoid the underlying problems. More work is needed (and ongoing) to fix those issues so this fix is being added as a temporary stop-gap measure. ] Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_log.h')
0 files changed, 0 insertions, 0 deletions