summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-01-24 20:48:53 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2018-01-29 07:27:23 -0800
commit70c57dcd606f218b507372a05e633b23351258f0 (patch)
tree2154ca137bb7c930f9d0033f945014dd31b59b2c /fs/xfs/scrub
parentacd1d71598f7654b6d7718bcbe979992295c672a (diff)
downloadop-kernel-dev-70c57dcd606f218b507372a05e633b23351258f0.zip
op-kernel-dev-70c57dcd606f218b507372a05e633b23351258f0.tar.gz
xfs: skip CoW writes past EOF when writeback races with truncate
Every so often we blow the ASSERT(type != XFS_IO_COW) in xfs_map_blocks when running fsstress, as we do in generic/269. The cause of this is writeback racing with truncate -- writeback doesn't take the iolock, so truncate can sneak in to decrease i_size and truncate page cache while writeback is gathering buffer heads to schedule writeout. If we hit this race on a block that has a CoW mapping, we'll get a valid imap from the CoW fork but the reduced i_size trims the mapping to zero length (which makes it invalid), so we call xfs_map_blocks to try again. This doesn't do much anyway, since any mapping we get out of that will also be invalid, so we might as well skip the assert and just stop. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud