diff options
author | Ming Lei <ming.lei@redhat.com> | 2023-02-20 07:14:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-30 17:11:11 +0300 |
commit | b7803afc77bee77e7df6662e1959df0038fbaac3 (patch) | |
tree | e0c8778a877c3e8472ed932493a56b5172f87aa3 | |
parent | f016326d31d010433b2a1a08a4856c214ae829eb (diff) | |
download | linux-b7803afc77bee77e7df6662e1959df0038fbaac3.tar.xz |
ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd
commit 9c7c4bc986932218fd0df9d2a100509772028fb1 upstream.
sizeof(struct ublksrv_io_cmd) is 16bytes, which can be held in 64byte SQE,
so not necessary to check IO_URING_F_SQE128.
With this change, we get chance to save half SQ ring memory.
Fixed: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230220041413.1524335-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/block/ublk_drv.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 4459cfbdbcb1..c2f0f74193f0 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -1223,9 +1223,6 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd, __func__, cmd->cmd_op, ub_cmd->q_id, tag, ub_cmd->result); - if (!(issue_flags & IO_URING_F_SQE128)) - goto out; - if (ub_cmd->q_id >= ub->dev_info.nr_hw_queues) goto out; |