Lines Matching refs:iod
76 struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(req); in nvme_loop_complete_rq() local
78 sg_free_table_chained(&iod->sg_table, NVME_INLINE_SG_CNT); in nvme_loop_complete_rq()
125 struct nvme_loop_iod *iod = in nvme_loop_execute_work() local
128 iod->req.execute(&iod->req); in nvme_loop_execute_work()
137 struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(req); in nvme_loop_queue_rq() local
144 ret = nvme_setup_cmd(ns, req, &iod->cmd); in nvme_loop_queue_rq()
149 iod->cmd.common.flags |= NVME_CMD_SGL_METABUF; in nvme_loop_queue_rq()
150 iod->req.port = queue->ctrl->port; in nvme_loop_queue_rq()
151 if (!nvmet_req_init(&iod->req, &queue->nvme_cq, in nvme_loop_queue_rq()
156 iod->sg_table.sgl = iod->first_sgl; in nvme_loop_queue_rq()
157 if (sg_alloc_table_chained(&iod->sg_table, in nvme_loop_queue_rq()
159 iod->sg_table.sgl, NVME_INLINE_SG_CNT)) { in nvme_loop_queue_rq()
164 iod->req.sg = iod->sg_table.sgl; in nvme_loop_queue_rq()
165 iod->req.sg_cnt = blk_rq_map_sg(req->q, req, iod->sg_table.sgl); in nvme_loop_queue_rq()
166 iod->req.transfer_len = blk_rq_payload_bytes(req); in nvme_loop_queue_rq()
169 schedule_work(&iod->work); in nvme_loop_queue_rq()
177 struct nvme_loop_iod *iod = &ctrl->async_event_iod; in nvme_loop_submit_async_event() local
179 memset(&iod->cmd, 0, sizeof(iod->cmd)); in nvme_loop_submit_async_event()
180 iod->cmd.common.opcode = nvme_admin_async_event; in nvme_loop_submit_async_event()
181 iod->cmd.common.command_id = NVME_AQ_BLK_MQ_DEPTH; in nvme_loop_submit_async_event()
182 iod->cmd.common.flags |= NVME_CMD_SGL_METABUF; in nvme_loop_submit_async_event()
184 if (!nvmet_req_init(&iod->req, &queue->nvme_cq, &queue->nvme_sq, in nvme_loop_submit_async_event()
190 schedule_work(&iod->work); in nvme_loop_submit_async_event()
194 struct nvme_loop_iod *iod, unsigned int queue_idx) in nvme_loop_init_iod() argument
196 iod->req.cmd = &iod->cmd; in nvme_loop_init_iod()
197 iod->req.cqe = &iod->cqe; in nvme_loop_init_iod()
198 iod->queue = &ctrl->queues[queue_idx]; in nvme_loop_init_iod()
199 INIT_WORK(&iod->work, nvme_loop_execute_work); in nvme_loop_init_iod()