提交 33c3fafc 编写于 作者: C Christoph Hellwig 提交者: Nicholas Bellinger

target: remove the t_tasks_bidi se_cmd field

And use a SCF_BIDI flag instead.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 2d3a4b51
...@@ -113,11 +113,9 @@ static struct se_cmd *tcm_loop_allocate_core_cmd( ...@@ -113,11 +113,9 @@ static struct se_cmd *tcm_loop_allocate_core_cmd(
scsi_bufflen(sc), sc->sc_data_direction, sam_task_attr, scsi_bufflen(sc), sc->sc_data_direction, sam_task_attr,
&tl_cmd->tl_sense_buf[0]); &tl_cmd->tl_sense_buf[0]);
/*
* Signal BIDI usage with T_TASK(cmd)->t_tasks_bidi
*/
if (scsi_bidi_cmnd(sc)) if (scsi_bidi_cmnd(sc))
se_cmd->t_tasks_bidi = 1; se_cmd->se_cmd_flags |= SCF_BIDI;
/* /*
* Locate the struct se_lun pointer and attach it to struct se_cmd * Locate the struct se_lun pointer and attach it to struct se_cmd
*/ */
...@@ -154,7 +152,7 @@ static int tcm_loop_new_cmd_map(struct se_cmd *se_cmd) ...@@ -154,7 +152,7 @@ static int tcm_loop_new_cmd_map(struct se_cmd *se_cmd)
* For BIDI commands, pass in the extra READ buffer * For BIDI commands, pass in the extra READ buffer
* to transport_generic_map_mem_to_cmd() below.. * to transport_generic_map_mem_to_cmd() below..
*/ */
if (se_cmd->t_tasks_bidi) { if (se_cmd->se_cmd_flags & SCF_BIDI) {
struct scsi_data_buffer *sdb = scsi_in(sc); struct scsi_data_buffer *sdb = scsi_in(sc);
sgl_bidi = sdb->table.sgl; sgl_bidi = sdb->table.sgl;
......
...@@ -2598,7 +2598,7 @@ static int transport_generic_cmd_sequencer( ...@@ -2598,7 +2598,7 @@ static int transport_generic_cmd_sequencer(
break; break;
case XDWRITEREAD_10: case XDWRITEREAD_10:
if ((cmd->data_direction != DMA_TO_DEVICE) || if ((cmd->data_direction != DMA_TO_DEVICE) ||
!(cmd->t_tasks_bidi)) !(cmd->se_cmd_flags & SCF_BIDI))
goto out_invalid_cdb_field; goto out_invalid_cdb_field;
sectors = transport_get_sectors_10(cdb, cmd, &sector_ret); sectors = transport_get_sectors_10(cdb, cmd, &sector_ret);
if (sector_ret) if (sector_ret)
......
...@@ -106,6 +106,7 @@ enum se_cmd_flags_table { ...@@ -106,6 +106,7 @@ enum se_cmd_flags_table {
SCF_FUA = 0x00000200, SCF_FUA = 0x00000200,
SCF_SE_LUN_CMD = 0x00000800, SCF_SE_LUN_CMD = 0x00000800,
SCF_SE_ALLOW_EOO = 0x00001000, SCF_SE_ALLOW_EOO = 0x00001000,
SCF_BIDI = 0x00002000,
SCF_SENT_CHECK_CONDITION = 0x00004000, SCF_SENT_CHECK_CONDITION = 0x00004000,
SCF_OVERFLOW_BIT = 0x00008000, SCF_OVERFLOW_BIT = 0x00008000,
SCF_UNDERFLOW_BIT = 0x00010000, SCF_UNDERFLOW_BIT = 0x00010000,
...@@ -459,7 +460,6 @@ struct se_cmd { ...@@ -459,7 +460,6 @@ struct se_cmd {
unsigned char __t_task_cdb[TCM_MAX_COMMAND_SIZE]; unsigned char __t_task_cdb[TCM_MAX_COMMAND_SIZE];
unsigned long long t_task_lba; unsigned long long t_task_lba;
int t_tasks_failed; int t_tasks_failed;
bool t_tasks_bidi;
u32 t_tasks_sg_chained_no; u32 t_tasks_sg_chained_no;
atomic_t t_fe_count; atomic_t t_fe_count;
atomic_t t_se_count; atomic_t t_se_count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册