Lines Matching refs:iod

85 	struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(req);  in nvme_loop_complete_rq()  local
88 sg_free_table_chained(&iod->sg_table, true); in nvme_loop_complete_rq()
134 struct nvme_loop_iod *iod = in nvme_loop_execute_work() local
137 nvmet_req_execute(&iod->req); in nvme_loop_execute_work()
143 struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(rq); in nvme_loop_timeout() local
146 nvme_reset_ctrl(&iod->queue->ctrl->ctrl); in nvme_loop_timeout()
160 struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(req); in nvme_loop_queue_rq() local
167 ret = nvme_setup_cmd(ns, req, &iod->cmd); in nvme_loop_queue_rq()
172 iod->cmd.common.flags |= NVME_CMD_SGL_METABUF; in nvme_loop_queue_rq()
173 iod->req.port = queue->ctrl->port; in nvme_loop_queue_rq()
174 if (!nvmet_req_init(&iod->req, &queue->nvme_cq, in nvme_loop_queue_rq()
179 iod->sg_table.sgl = iod->first_sgl; in nvme_loop_queue_rq()
180 if (sg_alloc_table_chained(&iod->sg_table, in nvme_loop_queue_rq()
182 iod->sg_table.sgl)) in nvme_loop_queue_rq()
185 iod->req.sg = iod->sg_table.sgl; in nvme_loop_queue_rq()
186 iod->req.sg_cnt = blk_rq_map_sg(req->q, req, iod->sg_table.sgl); in nvme_loop_queue_rq()
187 iod->req.transfer_len = blk_rq_payload_bytes(req); in nvme_loop_queue_rq()
190 schedule_work(&iod->work); in nvme_loop_queue_rq()
198 struct nvme_loop_iod *iod = &ctrl->async_event_iod; in nvme_loop_submit_async_event() local
200 memset(&iod->cmd, 0, sizeof(iod->cmd)); in nvme_loop_submit_async_event()
201 iod->cmd.common.opcode = nvme_admin_async_event; in nvme_loop_submit_async_event()
202 iod->cmd.common.command_id = NVME_AQ_BLK_MQ_DEPTH; in nvme_loop_submit_async_event()
203 iod->cmd.common.flags |= NVME_CMD_SGL_METABUF; in nvme_loop_submit_async_event()
205 if (!nvmet_req_init(&iod->req, &queue->nvme_cq, &queue->nvme_sq, in nvme_loop_submit_async_event()
211 schedule_work(&iod->work); in nvme_loop_submit_async_event()
215 struct nvme_loop_iod *iod, unsigned int queue_idx) in nvme_loop_init_iod() argument
217 iod->req.cmd = &iod->cmd; in nvme_loop_init_iod()
218 iod->req.rsp = &iod->rsp; in nvme_loop_init_iod()
219 iod->queue = &ctrl->queues[queue_idx]; in nvme_loop_init_iod()
220 INIT_WORK(&iod->work, nvme_loop_execute_work); in nvme_loop_init_iod()