364f358a73
With the help from some tracing I found that we try to map extents beyond eof when doing a direct I/O read. It appears that the way to inform the generic direct I/O path (ie do_direct_IO()) that we have breached eof is to return an unmapped buffer from xfs_get_blocks_direct(). This will cause do_direct_IO() to jump to the hole handling code where is will check for eof and then abort. This problem was found because a direct I/O read was trying to map beyond eof and was encountering delayed allocations. The delayed allocations beyond eof are speculative allocations and they didn't get converted when the direct I/O flushed the file because there was only enough space in the current AG to convert and write out the dirty pages within eof. Note that xfs_iomap_write_allocate() wont necessarily convert all the delayed allocation passed to it - it will return after allocating the first extent - so if the delayed allocation extends beyond eof then it will stay that way. SGI-PV: 983683 SGI-Modid: xfs-linux-melb:xfs-kern:31929a Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> |
||
---|---|---|
.. | ||
kmem.c | ||
kmem.h | ||
mrlock.h | ||
mutex.h | ||
sv.h | ||
time.h | ||
xfs_aops.c | ||
xfs_aops.h | ||
xfs_buf.c | ||
xfs_buf.h | ||
xfs_cred.h | ||
xfs_dmapi_priv.h | ||
xfs_export.c | ||
xfs_export.h | ||
xfs_file.c | ||
xfs_fs_subr.c | ||
xfs_fs_subr.h | ||
xfs_globals.c | ||
xfs_globals.h | ||
xfs_ioctl32.c | ||
xfs_ioctl32.h | ||
xfs_ioctl.c | ||
xfs_iops.c | ||
xfs_iops.h | ||
xfs_linux.h | ||
xfs_lrw.c | ||
xfs_lrw.h | ||
xfs_stats.c | ||
xfs_stats.h | ||
xfs_super.c | ||
xfs_super.h | ||
xfs_sysctl.c | ||
xfs_sysctl.h | ||
xfs_version.h | ||
xfs_vfs.h | ||
xfs_vnode.c | ||
xfs_vnode.h | ||
xfs_xattr.c |