> +struct iocb_submit {
> + const struct io_uring_iocb *iocb;
> + unsigned int index;
> +};
> +
> +struct io_work {
> + struct work_struct work;
> + struct io_ring_ctx *ctx;
> + struct io_uring_iocb iocb;
> + unsigned iocb_index;
> +};
I think we should use struct iocb_submit everywhere where we pass
an iocb + index, including in the io_work structure. Here is how
I did that to my old tree:
http://git.infradead.org/users/hch/misc.git/commitdiff/65929ed6f143a1c996305a10a15fd7f64d32595f
Btw, I think we can also remove the separate io_work allocation,
just do the io_get_req in the submission context, and overlay
the io_work onto the iocb in a union of some sort. This avoids
a whole memory allocation.