ceph: Asynchronous IO support
authorYan, Zheng <zyan@redhat.com>
Wed, 23 Dec 2015 13:23:38 +0000 (21:23 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 21 Jan 2016 18:36:07 +0000 (19:36 +0100)
commitc8fe9b17d055fe80e1a1591f5900ce41fbf6b796
tree6cece642189c7c68c8b6db89262eccc6167f998d
parent458c4703aea04674f0b5f63b43cf5669a602a110
ceph: Asynchronous IO support

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: Yan, Zheng <zyan@redhat.com>
fs/ceph/file.c