[RFC 3/5] io_uring: add infra and support for IORING_OP_URING_CMD

Kanchan Joshi joshiiitr at gmail.com
Tue Apr 5 09:27:59 PDT 2022


On Tue, Apr 5, 2022 at 11:30 AM Christoph Hellwig <hch at lst.de> wrote:
>
> On Mon, Apr 04, 2022 at 08:44:20PM +0530, Kanchan Joshi wrote:
> > Another stuff that got left out from the previous series :-(
> > Using this field for a bit of sanity checking at the moment. Like this in nvme:
> >
> > + if (ioucmd->cmd_len != sizeof(struct nvme_passthru_cmd64))
> > + return -EINVAL;
> > + cptr = (struct nvme_passthru_cmd64 *)ioucmd->cmd;
>
> Do we actually need that sanity checking?  Each command should have
> a known length bound by the SQE size, right?

Right, and that check can go in io_uring without needing this field
(as we keep cmd_len in sqe already).
Will remove this from io_uring_cmd struct.



More information about the Linux-nvme mailing list