diff options
author | Breno Leitao <leitao@debian.org> | 2023-01-12 15:44:10 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-01-29 23:17:41 +0100 |
commit | a7dd27828b00be8c0c7520c53baf0b360f4d8bea (patch) | |
tree | ac63dfdabd190f9a1a8cd34893e2d0223573c41f /io_uring/opdef.c | |
parent | io_uring: refactor __io_req_complete_post (diff) | |
download | linux-a7dd27828b00be8c0c7520c53baf0b360f4d8bea.tar.xz linux-a7dd27828b00be8c0c7520c53baf0b360f4d8bea.zip |
io_uring: Rename struct io_op_def
The current io_op_def struct is becoming huge and the name is a bit
generic.
The goal of this patch is to rename this struct to `io_issue_def`. This
struct will contain the hot functions associated with the issue code
path.
For now, this patch only renames the structure, and an upcoming patch
will break up the structure in two, moving the non-issue fields to a
secondary struct.
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/20230112144411.2624698-1-leitao@debian.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/opdef.c')
-rw-r--r-- | io_uring/opdef.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/io_uring/opdef.c b/io_uring/opdef.c index 3aa0d65c50e3..3c95e70a625e 100644 --- a/io_uring/opdef.c +++ b/io_uring/opdef.c @@ -46,7 +46,7 @@ static __maybe_unused int io_eopnotsupp_prep(struct io_kiocb *kiocb, return -EOPNOTSUPP; } -const struct io_op_def io_op_defs[] = { +const struct io_issue_def io_issue_defs[] = { [IORING_OP_NOP] = { .audit_skip = 1, .iopoll = 1, @@ -536,7 +536,7 @@ const struct io_op_def io_op_defs[] = { const char *io_uring_get_opcode(u8 opcode) { if (opcode < IORING_OP_LAST) - return io_op_defs[opcode].name; + return io_issue_defs[opcode].name; return "INVALID"; } @@ -544,12 +544,12 @@ void __init io_uring_optable_init(void) { int i; - BUILD_BUG_ON(ARRAY_SIZE(io_op_defs) != IORING_OP_LAST); + BUILD_BUG_ON(ARRAY_SIZE(io_issue_defs) != IORING_OP_LAST); - for (i = 0; i < ARRAY_SIZE(io_op_defs); i++) { - BUG_ON(!io_op_defs[i].prep); - if (io_op_defs[i].prep != io_eopnotsupp_prep) - BUG_ON(!io_op_defs[i].issue); - WARN_ON_ONCE(!io_op_defs[i].name); + for (i = 0; i < ARRAY_SIZE(io_issue_defs); i++) { + BUG_ON(!io_issue_defs[i].prep); + if (io_issue_defs[i].prep != io_eopnotsupp_prep) + BUG_ON(!io_issue_defs[i].issue); + WARN_ON_ONCE(!io_issue_defs[i].name); } } |