Commit db1620a2 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Nicholas Bellinger

target: remove the unused SCF_* flags

This patch contains a squashed version to remove unused  SCF_* flags:

target: remove the unused SCF_SE_DISABLE_ONLINE_CHECK flag
target: remove the unused SCF_CMD_PASSTHROUGH_NOALLOC flag
target: remove the unused SCF_EMULATE_SYNC_UNMAP flag
target: remove the unused SCF_EMULATE_SYNC_CACHE flag
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent dc2e652d
...@@ -2431,14 +2431,12 @@ static int transport_execute_tasks(struct se_cmd *cmd) ...@@ -2431,14 +2431,12 @@ static int transport_execute_tasks(struct se_cmd *cmd)
{ {
int add_tasks; int add_tasks;
if (!(cmd->se_cmd_flags & SCF_SE_DISABLE_ONLINE_CHECK)) { if (se_dev_check_online(cmd->se_orig_obj_ptr) != 0) {
if (se_dev_check_online(cmd->se_orig_obj_ptr) != 0) { cmd->transport_error_status = PYX_TRANSPORT_LU_COMM_FAILURE;
cmd->transport_error_status = transport_generic_request_failure(cmd, NULL, 0, 1);
PYX_TRANSPORT_LU_COMM_FAILURE; return 0;
transport_generic_request_failure(cmd, NULL, 0, 1);
return 0;
}
} }
/* /*
* Call transport_cmd_check_stop() to see if a fabric exception * Call transport_cmd_check_stop() to see if a fabric exception
* has occurred that prevents execution. * has occurred that prevents execution.
...@@ -3398,18 +3396,6 @@ static int transport_generic_cmd_sequencer( ...@@ -3398,18 +3396,6 @@ static int transport_generic_cmd_sequencer(
break; break;
case UNMAP: case UNMAP:
size = get_unaligned_be16(&cdb[7]); size = get_unaligned_be16(&cdb[7]);
passthrough = (dev->transport->transport_type ==
TRANSPORT_PLUGIN_PHBA_PDEV);
/*
* Determine if the received UNMAP used to for direct passthrough
* into Linux/SCSI with struct request via TCM/pSCSI or we are
* signaling the use of internal transport_generic_unmap() emulation
* for UNMAP -> Linux/BLOCK disbard with TCM/IBLOCK and TCM/FILEIO
* subsystem plugin backstores.
*/
if (!(passthrough))
cmd->se_cmd_flags |= SCF_EMULATE_SYNC_UNMAP;
cmd->se_cmd_flags |= SCF_SCSI_CONTROL_NONSG_IO_CDB; cmd->se_cmd_flags |= SCF_SCSI_CONTROL_NONSG_IO_CDB;
break; break;
case WRITE_SAME_16: case WRITE_SAME_16:
...@@ -3760,12 +3746,6 @@ static inline void transport_free_pages(struct se_cmd *cmd) ...@@ -3760,12 +3746,6 @@ static inline void transport_free_pages(struct se_cmd *cmd)
return; return;
} }
/*
* Caller will handle releasing of struct se_mem.
*/
if (cmd->se_cmd_flags & SCF_CMD_PASSTHROUGH_NOALLOC)
return;
list_for_each_entry_safe(se_mem, se_mem_tmp, list_for_each_entry_safe(se_mem, se_mem_tmp,
&cmd->t_mem_list, se_list) { &cmd->t_mem_list, se_list) {
/* /*
......
...@@ -112,11 +112,9 @@ enum se_cmd_flags_table { ...@@ -112,11 +112,9 @@ enum se_cmd_flags_table {
SCF_SCSI_NON_DATA_CDB = 0x00000040, SCF_SCSI_NON_DATA_CDB = 0x00000040,
SCF_SCSI_CDB_EXCEPTION = 0x00000080, SCF_SCSI_CDB_EXCEPTION = 0x00000080,
SCF_SCSI_RESERVATION_CONFLICT = 0x00000100, SCF_SCSI_RESERVATION_CONFLICT = 0x00000100,
SCF_CMD_PASSTHROUGH_NOALLOC = 0x00000200,
SCF_SE_CMD_FAILED = 0x00000400, SCF_SE_CMD_FAILED = 0x00000400,
SCF_SE_LUN_CMD = 0x00000800, SCF_SE_LUN_CMD = 0x00000800,
SCF_SE_ALLOW_EOO = 0x00001000, SCF_SE_ALLOW_EOO = 0x00001000,
SCF_SE_DISABLE_ONLINE_CHECK = 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,
...@@ -126,9 +124,7 @@ enum se_cmd_flags_table { ...@@ -126,9 +124,7 @@ enum se_cmd_flags_table {
SCF_UNUSED = 0x00100000, SCF_UNUSED = 0x00100000,
SCF_PASSTHROUGH_CONTIG_TO_SG = 0x00200000, SCF_PASSTHROUGH_CONTIG_TO_SG = 0x00200000,
SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC = 0x00400000, SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC = 0x00400000,
SCF_EMULATE_SYNC_CACHE = 0x00800000,
SCF_EMULATE_CDB_ASYNC = 0x01000000, SCF_EMULATE_CDB_ASYNC = 0x01000000,
SCF_EMULATE_SYNC_UNMAP = 0x02000000
}; };
/* struct se_dev_entry->lun_flags and struct se_lun->lun_access */ /* struct se_dev_entry->lun_flags and struct se_lun->lun_access */
......
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