]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7531304774540d66c375c8713f86f658cfc91105
tree5e64b3964c2651b7e52868409b93870fae8894f9
parent692d2ba883c1beaed191ac4798101049fc942fcd
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