mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
eda7798272
When two concurrent unaligned, non-overlapping direct IOs are issued to the same block, the direct Io layer will race to zero the block. The result is that one of the concurrent IOs will overwrite data written by the other IO with zeros. This is demonstrated by the xfsqa test 240. To avoid this problem, serialise all unaligned direct IOs to an inode with a big hammer. We need a big hammer approach as we need to serialise AIO as well, so we can't just block writes on locks. Hence, the big hammer is calling xfs_ioend_wait() while holding out other unaligned direct IOs from starting. We don't bother trying to serialised aligned vs unaligned IOs as they are overlapping IO and the result of concurrent overlapping IOs is undefined - the result of either IO is a valid result so we let them race. Hence we only penalise unaligned IO, which already has a major overhead compared to aligned IO so this isn't a major problem. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de> |
||
---|---|---|
.. | ||
kmem.c | ||
kmem.h | ||
mrlock.h | ||
time.h | ||
xfs_acl.c | ||
xfs_aops.c | ||
xfs_aops.h | ||
xfs_buf.c | ||
xfs_buf.h | ||
xfs_export.c | ||
xfs_export.h | ||
xfs_file.c | ||
xfs_fs_subr.c | ||
xfs_globals.c | ||
xfs_ioctl32.c | ||
xfs_ioctl32.h | ||
xfs_ioctl.c | ||
xfs_ioctl.h | ||
xfs_iops.c | ||
xfs_iops.h | ||
xfs_linux.h | ||
xfs_quotaops.c | ||
xfs_stats.c | ||
xfs_stats.h | ||
xfs_super.c | ||
xfs_super.h | ||
xfs_sync.c | ||
xfs_sync.h | ||
xfs_sysctl.c | ||
xfs_sysctl.h | ||
xfs_trace.c | ||
xfs_trace.h | ||
xfs_vnode.h | ||
xfs_xattr.c |