diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-01-08 10:41:39 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-01-08 10:41:39 -0800 |
commit | 5a9d929d6e13278df62bd9e3d3ceae8c87ad1eea (patch) | |
tree | da9fe433e7d6b164e12e9ef74ba7a924698c448b /include/asm-generic | |
parent | c017cb5ddfd6326032570d5eba83308c8a9c13a9 (diff) | |
download | linux-5a9d929d6e13278df62bd9e3d3ceae8c87ad1eea.tar.gz linux-5a9d929d6e13278df62bd9e3d3ceae8c87ad1eea.tar.bz2 linux-5a9d929d6e13278df62bd9e3d3ceae8c87ad1eea.zip |
iomap: report collisions between directio and buffered writes to userspace
If two programs simultaneously try to write to the same part of a file
via direct IO and buffered IO, there's a chance that the post-diowrite
pagecache invalidation will fail on the dirty page. When this happens,
the dio write succeeded, which means that the page cache is no longer
coherent with the disk!
Programs are not supposed to mix IO types and this is a clear case of
data corruption, so store an EIO which will be reflected to userspace
during the next fsync. Replace the WARN_ON with a ratelimited pr_crit
so that the developers have /some/ kind of breadcrumb to track down the
offending program(s) and file(s) involved.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Diffstat (limited to 'include/asm-generic')
0 files changed, 0 insertions, 0 deletions