target: fold se_task.task_sense into task_flags
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
c4795fb20e
commit
ef804a849f
|
@ -709,7 +709,7 @@ void transport_complete_task(struct se_task *task, int success)
|
||||||
if (dev && dev->transport->transport_complete) {
|
if (dev && dev->transport->transport_complete) {
|
||||||
if (dev->transport->transport_complete(task) != 0) {
|
if (dev->transport->transport_complete(task) != 0) {
|
||||||
cmd->se_cmd_flags |= SCF_TRANSPORT_TASK_SENSE;
|
cmd->se_cmd_flags |= SCF_TRANSPORT_TASK_SENSE;
|
||||||
task->task_sense = 1;
|
task->task_flags |= TF_HAS_SENSE;
|
||||||
success = 1;
|
success = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2346,7 +2346,7 @@ static int transport_get_sense_data(struct se_cmd *cmd)
|
||||||
|
|
||||||
list_for_each_entry_safe(task, task_tmp,
|
list_for_each_entry_safe(task, task_tmp,
|
||||||
&cmd->t_task_list, t_list) {
|
&cmd->t_task_list, t_list) {
|
||||||
if (!task->task_sense)
|
if (!(task->task_flags & TF_HAS_SENSE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!dev->transport->get_sense_buffer) {
|
if (!dev->transport->get_sense_buffer) {
|
||||||
|
|
|
@ -138,11 +138,12 @@ enum transport_tpg_type_table {
|
||||||
TRANSPORT_TPG_TYPE_DISCOVERY = 1,
|
TRANSPORT_TPG_TYPE_DISCOVERY = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Used for generate timer flags */
|
/* struct se_task->task_flags */
|
||||||
enum se_task_flags {
|
enum se_task_flags {
|
||||||
TF_ACTIVE = (1 << 0),
|
TF_ACTIVE = (1 << 0),
|
||||||
TF_SENT = (1 << 1),
|
TF_SENT = (1 << 1),
|
||||||
TF_REQUEST_STOP = (1 << 2),
|
TF_REQUEST_STOP = (1 << 2),
|
||||||
|
TF_HAS_SENSE = (1 << 3),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Special transport agnostic struct se_cmd->t_states */
|
/* Special transport agnostic struct se_cmd->t_states */
|
||||||
|
@ -488,7 +489,6 @@ struct se_task {
|
||||||
struct scatterlist *task_sg;
|
struct scatterlist *task_sg;
|
||||||
u32 task_sg_nents;
|
u32 task_sg_nents;
|
||||||
u16 task_flags;
|
u16 task_flags;
|
||||||
u8 task_sense;
|
|
||||||
u8 task_scsi_status;
|
u8 task_scsi_status;
|
||||||
int task_error_status;
|
int task_error_status;
|
||||||
enum dma_data_direction task_data_direction;
|
enum dma_data_direction task_data_direction;
|
||||||
|
|
Loading…
Reference in New Issue