Commit 42892679 authored by Mike Christie's avatar Mike Christie Committed by Martin K. Petersen

scsi: target: core: Kill transport_handle_cdb_direct()

Move the code from transport_handle_cdb_direct() to target_submit() and
have iSCSI call target_submit().
Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20230928020907.5730-5-michael.christie@oracle.comSigned-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 5c48a4ea
...@@ -948,7 +948,7 @@ int iscsit_execute_cmd(struct iscsit_cmd *cmd, int ooo) ...@@ -948,7 +948,7 @@ int iscsit_execute_cmd(struct iscsit_cmd *cmd, int ooo)
iscsit_set_unsolicited_dataout(cmd); iscsit_set_unsolicited_dataout(cmd);
} }
return transport_handle_cdb_direct(&cmd->se_cmd); return target_submit(&cmd->se_cmd);
case ISCSI_OP_NOOP_OUT: case ISCSI_OP_NOOP_OUT:
case ISCSI_OP_TEXT: case ISCSI_OP_TEXT:
......
...@@ -318,7 +318,7 @@ static int iscsit_task_reassign_complete_read( ...@@ -318,7 +318,7 @@ static int iscsit_task_reassign_complete_read(
pr_debug("READ ITT: 0x%08x: t_state: %d never sent to" pr_debug("READ ITT: 0x%08x: t_state: %d never sent to"
" transport\n", cmd->init_task_tag, " transport\n", cmd->init_task_tag,
cmd->se_cmd.t_state); cmd->se_cmd.t_state);
transport_handle_cdb_direct(se_cmd); target_submit(se_cmd);
return 0; return 0;
} }
......
...@@ -1575,12 +1575,14 @@ target_cmd_parse_cdb(struct se_cmd *cmd) ...@@ -1575,12 +1575,14 @@ target_cmd_parse_cdb(struct se_cmd *cmd)
} }
EXPORT_SYMBOL(target_cmd_parse_cdb); EXPORT_SYMBOL(target_cmd_parse_cdb);
/* /**
* Used by fabric module frontends to queue tasks directly. * target_submit - perform final initialization and submit cmd to LIO core
* May only be used from process context. * @cmd: command descriptor to submit
*
* target_submit_prep or something similar must have been called on the cmd,
* and this must be called from process context.
*/ */
int transport_handle_cdb_direct( int target_submit(struct se_cmd *cmd)
struct se_cmd *cmd)
{ {
sense_reason_t ret; sense_reason_t ret;
...@@ -1640,7 +1642,7 @@ int transport_handle_cdb_direct( ...@@ -1640,7 +1642,7 @@ int transport_handle_cdb_direct(
transport_generic_request_failure(cmd, ret); transport_generic_request_failure(cmd, ret);
return 0; return 0;
} }
EXPORT_SYMBOL(transport_handle_cdb_direct); EXPORT_SYMBOL_GPL(target_submit);
sense_reason_t sense_reason_t
transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *sgl, transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *sgl,
...@@ -1807,19 +1809,6 @@ int target_submit_prep(struct se_cmd *se_cmd, unsigned char *cdb, ...@@ -1807,19 +1809,6 @@ int target_submit_prep(struct se_cmd *se_cmd, unsigned char *cdb,
} }
EXPORT_SYMBOL_GPL(target_submit_prep); EXPORT_SYMBOL_GPL(target_submit_prep);
/**
* target_submit - perform final initialization and submit cmd to LIO core
* @se_cmd: command descriptor to submit
*
* target_submit_prep must have been called on the cmd, and this must be
* called from process context.
*/
void target_submit(struct se_cmd *se_cmd)
{
transport_handle_cdb_direct(se_cmd);
}
EXPORT_SYMBOL_GPL(target_submit);
/** /**
* target_submit_cmd - lookup unpacked lun and submit uninitialized se_cmd * target_submit_cmd - lookup unpacked lun and submit uninitialized se_cmd
* *
......
...@@ -175,7 +175,7 @@ int target_submit_prep(struct se_cmd *se_cmd, unsigned char *cdb, ...@@ -175,7 +175,7 @@ int target_submit_prep(struct se_cmd *se_cmd, unsigned char *cdb,
struct scatterlist *sgl, u32 sgl_count, struct scatterlist *sgl, u32 sgl_count,
struct scatterlist *sgl_bidi, u32 sgl_bidi_count, struct scatterlist *sgl_bidi, u32 sgl_bidi_count,
struct scatterlist *sgl_prot, u32 sgl_prot_count, gfp_t gfp); struct scatterlist *sgl_prot, u32 sgl_prot_count, gfp_t gfp);
void target_submit(struct se_cmd *se_cmd); int target_submit(struct se_cmd *se_cmd);
sense_reason_t transport_lookup_cmd_lun(struct se_cmd *); sense_reason_t transport_lookup_cmd_lun(struct se_cmd *);
sense_reason_t target_cmd_init_cdb(struct se_cmd *se_cmd, unsigned char *cdb, sense_reason_t target_cmd_init_cdb(struct se_cmd *se_cmd, unsigned char *cdb,
gfp_t gfp); gfp_t gfp);
...@@ -188,7 +188,6 @@ int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess, ...@@ -188,7 +188,6 @@ int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
unsigned char *sense, u64 unpacked_lun, unsigned char *sense, u64 unpacked_lun,
void *fabric_tmr_ptr, unsigned char tm_type, void *fabric_tmr_ptr, unsigned char tm_type,
gfp_t, u64, int); gfp_t, u64, int);
int transport_handle_cdb_direct(struct se_cmd *);
sense_reason_t transport_generic_new_cmd(struct se_cmd *); sense_reason_t transport_generic_new_cmd(struct se_cmd *);
void target_put_cmd_and_wait(struct se_cmd *cmd); void target_put_cmd_and_wait(struct se_cmd *cmd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment