• J
    iomap: Allow forcing of waiting for running DIO in iomap_dio_rw() · 96d39291
    Jan Kara 提交于
    commit 13ef954445df4fd1d7c003a500ec5ce49573e14b upstream
    
    Notes from Xiaoguang Wang:
        Indeed this patch should be appled before "ext4: introduce direct I/O
    read using iomap infrastructure", but given that we have already appled
    "ext4: introduce direct I/O read using iomap infrastructure" previously,
    we need to update iomap_dio_rw() calls with the new argument  in ext4.
    
    Filesystems do not support doing IO as asynchronous in some cases. For
    example in case of unaligned writes or in case file size needs to be
    extended (e.g. for ext4). Instead of forcing filesystem to wait for AIO
    in such cases, add argument to iomap_dio_rw() which makes the function
    wait for IO completion. This also results in executing
    iomap_dio_complete() inline in iomap_dio_rw() providing its return value
    to the caller as for ordinary sync IO.
    Signed-off-by: NJan Kara <jack@suse.cz>
    Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
    96d39291
xfs_file.c 31.0 KB