Lines Matching defs:se_cmd

48 transport_lookup_cmd_lun(struct se_cmd *se_cmd)
51 struct se_session *se_sess = se_cmd->se_sess;
57 deve = target_nacl_find_deve(nacl, se_cmd->orig_fe_lun);
61 if (se_cmd->data_direction == DMA_TO_DEVICE)
62 atomic_long_add(se_cmd->data_length,
64 else if (se_cmd->data_direction == DMA_FROM_DEVICE)
65 atomic_long_add(se_cmd->data_length,
68 if ((se_cmd->data_direction == DMA_TO_DEVICE) &&
72 se_cmd->se_tfo->fabric_name,
73 se_cmd->orig_fe_lun);
85 se_cmd->se_lun = se_lun;
86 se_cmd->pr_res_key = deve->pr_res_key;
87 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD;
88 se_cmd->lun_ref_active = true;
99 if (se_cmd->orig_fe_lun != 0) {
102 se_cmd->se_tfo->fabric_name,
103 se_cmd->orig_fe_lun,
111 if ((se_cmd->data_direction != DMA_FROM_DEVICE) &&
112 (se_cmd->data_direction != DMA_NONE))
119 se_cmd->se_lun = se_sess->se_tpg->tpg_virt_lun0;
120 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD;
121 se_cmd->lun_ref_active = true;
129 se_cmd->se_dev = rcu_dereference_raw(se_lun->lun_se_dev);
130 atomic_long_inc(&se_cmd->se_dev->num_cmds);
132 if (se_cmd->data_direction == DMA_TO_DEVICE)
133 atomic_long_add(se_cmd->data_length,
134 &se_cmd->se_dev->write_bytes);
135 else if (se_cmd->data_direction == DMA_FROM_DEVICE)
136 atomic_long_add(se_cmd->data_length,
137 &se_cmd->se_dev->read_bytes);
143 int transport_lookup_tmr_lun(struct se_cmd *se_cmd)
147 struct se_session *se_sess = se_cmd->se_sess;
149 struct se_tmr_req *se_tmr = se_cmd->se_tmr_req;
152 deve = target_nacl_find_deve(nacl, se_cmd->orig_fe_lun);
161 se_cmd->se_lun = se_lun;
162 se_cmd->pr_res_key = deve->pr_res_key;
163 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD;
164 se_cmd->lun_ref_active = true;
172 se_cmd->se_tfo->fabric_name,
173 se_cmd->orig_fe_lun,
177 se_cmd->se_dev = rcu_dereference_raw(se_lun->lun_se_dev);
184 bool target_lun_is_rdonly(struct se_cmd *cmd)
1059 passthrough_parse_cdb(struct se_cmd *cmd,
1060 sense_reason_t (*exec_cmd)(struct se_cmd *cmd))