]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: increment/decrement dio counter on async requests
authorJeff Layton <jlayton@kernel.org>
Wed, 13 Nov 2019 14:56:06 +0000 (09:56 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 14 Nov 2019 17:44:51 +0000 (18:44 +0100)
commit68b4483ae8786e953b8b7f7d970d124b202a2b58
tree750b990337ef4e197b7da915acec97d8f00d3a4c
parentc1a8da97720bc1d74ca87140b70005f2245f821d
ceph: increment/decrement dio counter on async requests

Ceph can in some cases issue an async DIO request, in which case we can
end up calling ceph_end_io_direct before the I/O is actually complete.
That may allow buffered operations to proceed while DIO requests are
still in flight.

Fix this by incrementing the i_dio_count when issuing an async DIO
request, and decrement it when tearing down the aio_req.

Fixes: 872d773fa527 ("ceph: add buffered/direct exclusionary locking for reads and writes")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/file.c