target: Add SCF_SCSI_TMR_CDB usage and drop se_tmr_req_cache

Change the test for if a cmd is a tmr request to checking if
SCF_SCSI_TMR_CDB (a new flag) is set in cmd->se_cmd_flags.

Also remove se_tmr_req_cache usage in favor of kzalloc usage,
and make core_tmr_alloc_req() return int + setup se_cmd->se_tmr_req
directly and fix up various fabric module usages

Cc: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
Andy Grover
2012-01-19 13:39:17 -08:00
committed by Nicholas Bellinger
parent 35b2cdc4fe
commit c8e31f26fe
8 changed files with 51 additions and 61 deletions

View File

@@ -356,6 +356,7 @@ static void ft_send_tm(struct ft_cmd *cmd)
struct se_tmr_req *tmr;
struct fcp_cmnd *fcp;
struct ft_sess *sess;
int rc;
u8 tm_func;
transport_init_se_cmd(&cmd->se_cmd, &ft_configfs->tf_ops,
@@ -392,13 +393,12 @@ static void ft_send_tm(struct ft_cmd *cmd)
}
pr_debug("alloc tm cmd fn %d\n", tm_func);
tmr = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func, GFP_KERNEL);
if (!tmr) {
rc = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func, GFP_KERNEL);
if (rc < 0) {
pr_debug("alloc failed\n");
ft_send_resp_code_and_free(cmd, FCP_TMF_FAILED);
return;
}
cmd->se_cmd.se_tmr_req = tmr;
switch (fcp->fc_tm_flags) {
case FCP_TMF_LUN_RESET: