• Yan, Zheng's avatar
    ceph: Asynchronous IO support · c8fe9b17
    Yan, Zheng authored
    The basic idea of AIO support is simple, just call kiocb::ki_complete()
    in OSD request's complete callback. But there are several special cases.
    
    when IO span multiple objects, we need to wait until all OSD requests
    are complete, then call kiocb::ki_complete(). Error handling in this case
    is tricky too. For simplify, AIO both span multiple objects and extends
    i_size are not allowed.
    
    Another special case is check EOF for reading (other client can write to
    the file and extend i_size concurrently). For simplify, the direct-IO/AIO
    code path does do the check, fallback to normal syn read instead.
    Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
    c8fe9b17
file.c 40.7 KB