OSDN Git Service

io_uring: optimise sqe-to-req flags translation
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 18 Jan 2020 17:22:41 +0000 (20:22 +0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 21 Jan 2020 00:04:07 +0000 (17:04 -0700)
commit6b47ee6ecab142f938a40bf3b297abac74218ee2
tree5e64b3964c2651b7e52868409b93870fae8894f9
parent87987898a1dbc69b1138f7c10eb9abd655c03396
io_uring: optimise sqe-to-req flags translation

For each IOSQE_* flag there is a corresponding REQ_F_* flag. And there
is a repetitive pattern of their translation:
e.g. if (sqe->flags & SQE_FLAG*) req->flags |= REQ_F_FLAG*

Use same numeric values/bits for them and copy instead of manual
handling.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h