OSDN Git Service

io_uring: control ->async_data with a REQ_F flag
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 4 Oct 2021 19:02:56 +0000 (20:02 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Oct 2021 11:49:54 +0000 (05:49 -0600)
commitd886e185a128a4f350c4df6471c0f403c2982ae8
tree4fe78aea4a6d72c61a6b34ef1ee502036741d2f9
parentc1e53a6988b9c83dd8bbc759414bc0f13ff1fe0c
io_uring: control ->async_data with a REQ_F flag

->async_data is a slow path, so it won't matter much if we do the clean
up inside io_clean_op(). Moreover, in many cases it's allocated together
with setting one or more of IO_REQ_CLEAN_FLAGS flags, so it'd go through
io_clean_op() anyway.

Control ->async_data allocation with a new flag REQ_F_ASYNC_DATA, so we
can do all the maintainence under io_req_needs_clean() fast check.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/6892cf5883c459f36bda26f30ceb16742b20b84b.1633373302.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c