liburing: provide uring_cmd prep function
The uring_cmd needs to ensure __pad1 is clear, which is a reserved field
for opcode. If a prior submission for a different opcode at that same
entry did use that field, the command would fail the kernel's checks if
the caller didn't explicity clear it. Provide an init helper for this
opcode.
Also, the nvme uring_cmd tests had a couple places setting the sqe addr
and length, which are unused fields, so they shouldn't have been doing
that, though it had been harmless to do so since the kernel isn't
checking these fields.
Provide a helper function specific to the uring_cmd preparation.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2 files changed