On Tue, Apr 5, 2022 at 11:30 AM Christoph Hellwig <hch@xxxxxx> 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.