summaryrefslogtreecommitdiffstats
path: root/fs/sync.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-12-10 18:03:54 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2017-12-14 09:20:11 -0800
commit5c989a0ee06eb77a44baffd1779a5dbb9a7e873f (patch)
tree6b727eabcb415cb66e64dc48ba4ae0887cddc2e7 /fs/sync.c
parentc54854a437a447a6bb1dcb11f60dd01cef3fa597 (diff)
downloadlinux-5c989a0ee06eb77a44baffd1779a5dbb9a7e873f.tar.gz
linux-5c989a0ee06eb77a44baffd1779a5dbb9a7e873f.tar.bz2
linux-5c989a0ee06eb77a44baffd1779a5dbb9a7e873f.zip
xfs: remove dest file's post-eof preallocations before reflinking
If we try to reflink into a file with post-eof preallocations at an offset well past the preallocations, we increase i_size as one would expect. However, those allocations do not have page cache backing them, so they won't get cleaned out on their own. This leads to asserts in the collapse/insert range code and xfs_destroy_inode when they encounter delalloc extents they weren't expecting to find. Since there are plenty of other places where we dump those post-eof blocks, do the same to the reflink destination file before we start remapping extents. This was found by adding clonerange support to fsstress and running it in write-only mode. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/sync.c')
0 files changed, 0 insertions, 0 deletions