[PATCH v3 2/4] io_uring: Pass whole sqe to commands

Christoph Hellwig hch at lst.de
Sun Apr 30 21:30:07 PDT 2023


>  static int ublk_ch_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags)
>  {
> -	struct ublksrv_io_cmd *ub_cmd = (struct ublksrv_io_cmd *)cmd->cmd;
> +	struct ublksrv_io_cmd *ub_cmd = (struct ublksrv_io_cmd *)cmd->sqe->cmd;

This still adds all the crazy casting!!

As I already explained two times, last time including actual working
code, please add a helper that takes a io_uring_cmd * argument, and
returns cmd->sqe->cmd with a void * type.  With that all the casting
can be removed.



More information about the Linux-nvme mailing list