On Thu, Oct 10, 2024 at 11:45:03AM +0800, Ming Lei wrote: > > static void ublk_queue_cmd(struct ublk_queue *ubq, struct request *rq) > > { > > - struct ublk_rq_data *data = blk_mq_rq_to_pdu(rq); > > - > > - if (llist_add(&data->node, &ubq->io_cmds)) { > > - struct ublk_io *io = &ubq->ios[rq->tag]; > > + struct ublk_io *io = &ubq->ios[rq->tag]; > > > > - io_uring_cmd_complete_in_task(io->cmd, ublk_rq_task_work_cb); > > - } > > + ublk_get_uring_cmd_pdu(io->cmd)->req = rq; > > + io_uring_cmd_complete_in_task(io->cmd, __ublk_rq_task_work); > > } > > I'd suggest to comment that io_uring_cmd_complete_in_task() needs to > maintain io command order. Sorry, can you explain why this is important? Generally speaking out-of-order completion of I/Os is considered okay, so what's the issue if the dispatch to the ublk server here is not in order?