Re: [RFC PATCH v3 3/3] nvme: wire up support for async passthrough
From: Jens Axboe <axboe@kernel.dk>
Date: 2021-03-17 17:22:12
Also in:
io-uring
On 3/17/21 10:59 AM, Christoph Hellwig wrote:
On Wed, Mar 17, 2021 at 10:49:28AM -0600, Jens Axboe wrote:quoted
I will post it soon, only reason I haven't reposted is that I'm not that happy with how the sqe split is done (and that it's done in the first place). But I'll probably just post the current version for comments, and hopefully we can get it to where it needs to be soon.Yes, I don't like that at all either. I almost wonder if we should use an entirely different format after opcode and flags, although I suspect fd would be nice to have in the same spot as well.
Exactly - trying to think of how best to do this. It's somewhat a shame that I didn't place user_data right after fd, or even at the end of the struct. But oh well. One idea would be to have io_uring_sqe_hdr and have that be op/flags/prio/fd as we should have those for anything, and just embed that at the top of both io_uring_sqe (our general command), and io_uring_whatever which is what the passthrough stuff would use. Not sure, I need to dabble in the code a bit and see how we can make it the cleanest.
On a related note: I think it really should have a generic cmd dispatching mechanism like ioctls have, preferably even enforcing the _IO* mechanism.
Yes, we could certainly do that. I don't want to turn it into a free-for-all and the wild west of passthrough, some notion of coherent definitions would be prudent. -- Jens Axboe _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme