From 680b73c5f2fb60336707b53b2b2792d2c01b69dc Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 12 Sep 2011 21:51:14 +0200 Subject: target: remove transport_generic_handle_cdb Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_transport.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 46aae4f94ede..0482a28629ff 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -171,7 +171,6 @@ void *transport_kmap_first_data_page(struct se_cmd *cmd); void transport_kunmap_first_data_page(struct se_cmd *cmd); extern void transport_free_se_cmd(struct se_cmd *); extern int transport_generic_allocate_tasks(struct se_cmd *, unsigned char *); -extern int transport_generic_handle_cdb(struct se_cmd *); extern int transport_handle_cdb_direct(struct se_cmd *); extern int transport_generic_handle_cdb_map(struct se_cmd *); extern int transport_generic_handle_data(struct se_cmd *); -- cgit v1.2.3 From 2dbc43d256c5371ebc294e3534620663eb80a5ce Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 13 Sep 2011 23:08:19 +0200 Subject: target: remove transport_free_se_cmd It is only called by transport_release_cmd, so inline it there. Also add a kerneldoc comment for transport_release_cmd while we are at it. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_transport.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 0482a28629ff..99a671e0f9da 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -169,7 +169,6 @@ extern void transport_init_se_cmd(struct se_cmd *, unsigned char *); void *transport_kmap_first_data_page(struct se_cmd *cmd); void transport_kunmap_first_data_page(struct se_cmd *cmd); -extern void transport_free_se_cmd(struct se_cmd *); extern int transport_generic_allocate_tasks(struct se_cmd *, unsigned char *); extern int transport_handle_cdb_direct(struct se_cmd *); extern int transport_generic_handle_cdb_map(struct se_cmd *); -- cgit v1.2.3 From 82f1c8a4e7739eae9f1c32c2c419efdc19b8af41 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 13 Sep 2011 23:09:01 +0200 Subject: target: push session reinstatement out of transport_generic_free_cmd Push session reinstatement out of transport_generic_free_cmd into the only caller that actually needs it. Clean up transport_generic_free_cmd a bit, and remove the useless comment. I'd love to add a more useful kerneldoc comment for it, but as this point I'm still a bit confused in where it stands in the command release stack. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_transport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 99a671e0f9da..a113129fa22e 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -184,7 +184,7 @@ extern int transport_check_aborted_status(struct se_cmd *, int); extern int transport_send_check_condition_and_sense(struct se_cmd *, u8, int); extern void transport_send_task_abort(struct se_cmd *); extern void transport_release_cmd(struct se_cmd *); -extern void transport_generic_free_cmd(struct se_cmd *, int, int); +extern bool transport_generic_free_cmd(struct se_cmd *, int); extern void transport_generic_wait_for_cmds(struct se_cmd *, int); extern int transport_init_task_sg(struct se_task *, struct se_mem *, u32); extern int transport_map_mem_to_sg(struct se_task *, struct list_head *, -- cgit v1.2.3 From 39c05f321a4b27f3036392eed68bd94ce2267155 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sat, 8 Oct 2011 13:59:52 -0700 Subject: target: Remove session_reinstatement parameter from ->transport_wait_for_tasks This patch removes the unnecessary session_reinstatement parameter from se_cmd->transport_wait_for_tasks(), logic in transport_generic_wait_for_tasks, and usage within iscsi-target code. This also includes the removal of the 'bool' return from transport_put_cmd() + transport_generic_free_cmd() that is no longer necessary. Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 2 +- include/target/target_core_transport.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 27040653005e..c10e351bc1f5 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -480,7 +480,7 @@ struct se_cmd { struct target_core_fabric_ops *se_tfo; int (*transport_emulate_cdb)(struct se_cmd *); void (*transport_split_cdb)(unsigned long long, u32, unsigned char *); - void (*transport_wait_for_tasks)(struct se_cmd *, int, int); + void (*transport_wait_for_tasks)(struct se_cmd *, int); void (*transport_complete_callback)(struct se_cmd *); int (*transport_qf_callback)(struct se_cmd *); diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index a113129fa22e..e67feeb88b69 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -184,7 +184,7 @@ extern int transport_check_aborted_status(struct se_cmd *, int); extern int transport_send_check_condition_and_sense(struct se_cmd *, u8, int); extern void transport_send_task_abort(struct se_cmd *); extern void transport_release_cmd(struct se_cmd *); -extern bool transport_generic_free_cmd(struct se_cmd *, int); +extern void transport_generic_free_cmd(struct se_cmd *, int); extern void transport_generic_wait_for_cmds(struct se_cmd *, int); extern int transport_init_task_sg(struct se_task *, struct se_mem *, u32); extern int transport_map_mem_to_sg(struct se_task *, struct list_head *, -- cgit v1.2.3 From a3eedc227bfa7c9e21ef3cebe164d06a4c507a71 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 25 Sep 2011 14:56:43 -0400 Subject: target: remove unused se_subsystem_api methods The cdb_none, map_data_SG and map_control_SG methods have no callers left and can be removed now. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_transport.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'include') diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index e67feeb88b69..549b6b332b1b 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -233,18 +233,6 @@ struct se_subsystem_api { * Used for global se_subsystem_api list_head */ struct list_head sub_api_list; - /* - * For SCF_SCSI_NON_DATA_CDB - */ - int (*cdb_none)(struct se_task *); - /* - * For SCF_SCSI_DATA_SG_IO_CDB - */ - int (*map_data_SG)(struct se_task *); - /* - * For SCF_SCSI_CONTROL_SG_IO_CDB - */ - int (*map_control_SG)(struct se_task *); /* * attach_hba(): */ -- cgit v1.2.3 From dd503a5fcc0dfb8b5fd887bd967b6f431176864b Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Thu, 6 Oct 2011 09:56:16 -0700 Subject: target: Have core_tmr_alloc_req() take an explicit GFP_xxx flag Testing in_interrupt() to know when sleeping is allowed is not really reliable (since eg it won't be true if the caller is holding a spinlock). Instead have the caller tell core_tmr_alloc_req() what GFP_xxx to use; every caller except tcm_qla2xxx can use GFP_KERNEL. Signed-off-by: Roland Dreier Signed-off-by: Nicholas Bellinger --- include/target/target_core_tmr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_tmr.h b/include/target/target_core_tmr.h index bd5596807478..d5876e17d3fb 100644 --- a/include/target/target_core_tmr.h +++ b/include/target/target_core_tmr.h @@ -27,7 +27,7 @@ enum tcm_tmrsp_table { extern struct kmem_cache *se_tmr_req_cache; -extern struct se_tmr_req *core_tmr_alloc_req(struct se_cmd *, void *, u8); +extern struct se_tmr_req *core_tmr_alloc_req(struct se_cmd *, void *, u8, gfp_t); extern void core_tmr_release_req(struct se_tmr_req *); extern int core_tmr_lun_reset(struct se_device *, struct se_tmr_req *, struct list_head *, struct se_cmd *); -- cgit v1.2.3 From d14921d6ad192868184686b3af5bb99cf3380510 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sun, 9 Oct 2011 01:00:58 -0700 Subject: target: Convert ->transport_wait_for_tasks usage to transport_generic_free_cmd This patch converts se_cmd->transport_wait_for_tasks(se_cmd, 1) usage to use transport_generic_free_cmd() directly in target-core and iscsi-target fabric usage. The includes: *) Removal of the optional transport_generic_free_cmd() call from within transport_generic_wait_for_tasks() *) Usage of existing SCF_SUPPORTED_SAM_OPCODE to determine when transport_generic_wait_for_tasks() processing may occur instead of checking se_cmd->transport_wait_for_tasks() *) Move transport_generic_wait_for_tasks() call ahead of core_dec_lacl_count() and transport_lun_remove_cmd() in transport_generic_free_cmd() to follow existing logic for iscsi-target w/ se_cmd->transport_wait_for_tasks(se_cmd, 1) *) Removal of se_cmd->transport_wait_for_tasks() function pointer *) Rename transport_generic_wait_for_tasks() -> transport_wait_for_tasks(), and add docbook comment. *) Add EXPORT_SYMBOL for transport_wait_for_tasks() For the case in iscsi_target_erl2.c:iscsit_prepare_cmds_for_realligance() where se_cmd->transport_wait_for_tasks(se_cmd, 0) is called, this patch adds a direct call to transport_wait_for_tasks(). (hch: Fix transport_generic_free_cmd() usage in iscsit_release_commands_from_conn) (nab: Add patch: Ensure that TMRs hit wait_for_tasks logic during release) Reported-by: Christoph Hellwig Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 - include/target/target_core_transport.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index c10e351bc1f5..872cafcb2681 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -480,7 +480,6 @@ struct se_cmd { struct target_core_fabric_ops *se_tfo; int (*transport_emulate_cdb)(struct se_cmd *); void (*transport_split_cdb)(unsigned long long, u32, unsigned char *); - void (*transport_wait_for_tasks)(struct se_cmd *, int); void (*transport_complete_callback)(struct se_cmd *); int (*transport_qf_callback)(struct se_cmd *); diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 549b6b332b1b..371c24aff23e 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -180,6 +180,7 @@ extern void __transport_stop_task_timer(struct se_task *, unsigned long *); extern int transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *, u32, struct scatterlist *, u32); extern int transport_clear_lun_from_sessions(struct se_lun *); +extern void transport_wait_for_tasks(struct se_cmd *); extern int transport_check_aborted_status(struct se_cmd *, int); extern int transport_send_check_condition_and_sense(struct se_cmd *, u8, int); extern void transport_send_task_abort(struct se_cmd *); -- cgit v1.2.3 From 8dc52b54207f361f7abf6cbe26f5199ae8b7cf23 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sun, 9 Oct 2011 02:02:51 -0700 Subject: target: Merge transport_cmd_finish_abort_tmr into transport_cmd_finish_abort This patch merges transport_cmd_finish_abort_tmr() logic into a single transport_cmd_finish_abort() function by adding a cmd->se_tmr_req check around transport_lun_remove_cmd(), and updates the single caller within core_tmr_drain_tmr_list(). Reported-by: Christoph Hellwig Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_transport.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 371c24aff23e..c91516910e3e 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -134,7 +134,6 @@ extern void transport_free_session(struct se_session *); extern void transport_deregister_session_configfs(struct se_session *); extern void transport_deregister_session(struct se_session *); extern void transport_cmd_finish_abort(struct se_cmd *, int); -extern void transport_cmd_finish_abort_tmr(struct se_cmd *); extern void transport_complete_sync_cache(struct se_cmd *, int); extern void transport_complete_task(struct se_task *, int); extern void transport_add_task_to_execute_queue(struct se_task *, -- cgit v1.2.3 From c0427f155614908ca1147cd5b6a0d5cdcaef8327 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 12 Oct 2011 11:06:56 -0400 Subject: target: Cleanup unused target_core_base.h bits This is a squashed version of the following target_core_base.h cleanup patches: target: remove the unused SHUTDOWN_SIGS defintion target: remove unused se_mem leftovers target: remove the unused map_func_t typedef target: move TRANSPORT_IOV_DATA_BUFFER to the iscsi-specific code Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 3 --- include/target/target_core_transport.h | 7 ------- 2 files changed, 10 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 872cafcb2681..c00224e8d6c4 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -10,10 +10,7 @@ #include #define TARGET_CORE_MOD_VERSION "v4.1.0-rc1-ml" -#define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT)) -/* Used by transport_generic_allocate_iovecs() */ -#define TRANSPORT_IOV_DATA_BUFFER 5 /* Maximum Number of LUNs per Target Portal Group */ /* Don't raise above 511 or REPORT_LUNS needs to handle >1 page */ #define TRANSPORT_MAX_LUNS_PER_TPG 256 diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index c91516910e3e..ccd85b380d6b 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -110,11 +110,8 @@ #define MOD_MAX_SECTORS(ms, bs) (ms % (PAGE_SIZE / bs)) -struct se_mem; struct se_subsystem_api; -extern struct kmem_cache *se_mem_cache; - extern int init_se_kmem_caches(void); extern void release_se_kmem_caches(void); extern u32 scsi_get_new_index(scsi_index_t); @@ -186,10 +183,6 @@ extern void transport_send_task_abort(struct se_cmd *); extern void transport_release_cmd(struct se_cmd *); extern void transport_generic_free_cmd(struct se_cmd *, int); extern void transport_generic_wait_for_cmds(struct se_cmd *, int); -extern int transport_init_task_sg(struct se_task *, struct se_mem *, u32); -extern int transport_map_mem_to_sg(struct se_task *, struct list_head *, - struct scatterlist *, struct se_mem *, - struct se_mem **, u32 *, u32 *); extern void transport_do_task_sg_chain(struct se_cmd *); extern void transport_generic_process_write(struct se_cmd *); extern int transport_generic_new_cmd(struct se_cmd *); -- cgit v1.2.3 From 42bf829eee0e36371a3df43978b14572c716cbe7 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 12 Oct 2011 11:07:00 -0400 Subject: target: Cleanup unused se_task bits This is a squashed version of the following se_task cleanup patches: target: remove the unused task_state_flags field in se_task target: remove the unused se_obj_ptr field in se_task target: remove the se_dev field in se_task Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 3 --- include/target/target_core_transport.h | 3 --- 2 files changed, 6 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index c00224e8d6c4..6c49db403205 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -405,7 +405,6 @@ struct se_task { u8 task_scsi_status; u8 task_flags; int task_error_status; - int task_state_flags; bool task_padded_sg; unsigned long long task_lba; u32 task_no; @@ -413,7 +412,6 @@ struct se_task { u32 task_size; enum dma_data_direction task_data_direction; struct se_cmd *task_se_cmd; - struct se_device *se_dev; struct completion task_stop_comp; atomic_t task_active; atomic_t task_execute_queue; @@ -422,7 +420,6 @@ struct se_task { atomic_t task_stop; atomic_t task_state_active; struct timer_list task_timer; - struct se_device *se_obj_ptr; struct list_head t_list; struct list_head t_execute_list; struct list_head t_state_list; diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index ccd85b380d6b..c93cf0ae37a4 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -45,9 +45,6 @@ #define TRANSPORT_TIMEOUT_TYPE_TAPE 600 #define TRANSPORT_TIMEOUT_TYPE_OTHER 300 -/* For se_task->task_state_flags */ -#define TSF_EXCEPTION_CLEARED 0x01 - /* * struct se_subsystem_dev->su_dev_flags */ -- cgit v1.2.3 From 6c76bf951cb099f5573954b1f56c1121c3a41c72 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 12 Oct 2011 11:07:03 -0400 Subject: target: make more use of the task_flags field in se_task Replace various atomic_t variables that were mostly under t_state_lock with new flags in task_flags. Note that the execution error path didn't take t_state_lock before, so add it there. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 6c49db403205..5e3dd1418bac 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -72,9 +72,13 @@ enum transport_tpg_type_table { }; /* Used for generate timer flags */ -enum timer_flags_table { - TF_RUNNING = 0x01, - TF_STOP = 0x02, +enum se_task_flags { + TF_ACTIVE = (1 << 0), + TF_SENT = (1 << 1), + TF_TIMEOUT = (1 << 2), + TF_REQUEST_STOP = (1 << 3), + TF_TIMER_RUNNING = (1 << 4), + TF_TIMER_STOP = (1 << 5), }; /* Special transport agnostic struct se_cmd->t_states */ @@ -413,11 +417,7 @@ struct se_task { enum dma_data_direction task_data_direction; struct se_cmd *task_se_cmd; struct completion task_stop_comp; - atomic_t task_active; atomic_t task_execute_queue; - atomic_t task_timeout; - atomic_t task_sent; - atomic_t task_stop; atomic_t task_state_active; struct timer_list task_timer; struct list_head t_list; -- cgit v1.2.3 From 04629b7bde553e3703577779f53cb0ba1eddd2c0 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 12 Oct 2011 11:07:04 -0400 Subject: target: Remove unnecessary se_task members This is a squashed version of the following unnecessary se_task structure member removal patches: target: remove the task_execute_queue field in se_task Instead of using a separate flag we can simply do list_emptry checks on t_execute_list if we make sure to always use list_del_init to remove a task from the list. Also factor some duplicate code into a new __transport_remove_task_from_execute_queue helper. target: remove the read-only task_no field in se_task The task_no field never was initialized and only used in debug printks, so kill it. target: remove the task_padded_sg field in se_task This field is only check in one place and not actually needed there. Rationale: - transport_do_task_sg_chain asserts that we have task_sg_chaining set early on - we only make use of the sg_prev_nents field we calculate based on it if there is another sg list that gets chained onto this one, which never happens for the last (or only) task. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 3 --- include/target/target_core_transport.h | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 5e3dd1418bac..45291b23bc03 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -409,15 +409,12 @@ struct se_task { u8 task_scsi_status; u8 task_flags; int task_error_status; - bool task_padded_sg; unsigned long long task_lba; - u32 task_no; u32 task_sectors; u32 task_size; enum dma_data_direction task_data_direction; struct se_cmd *task_se_cmd; struct completion task_stop_comp; - atomic_t task_execute_queue; atomic_t task_state_active; struct timer_list task_timer; struct list_head t_list; diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index c93cf0ae37a4..c5eb259c2e2f 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -135,6 +135,8 @@ extern void transport_add_task_to_execute_queue(struct se_task *, struct se_device *); extern void transport_remove_task_from_execute_queue(struct se_task *, struct se_device *); +extern void __transport_remove_task_from_execute_queue(struct se_task *, + struct se_device *); unsigned char *transport_dump_cmd_direction(struct se_cmd *); extern void transport_dump_dev_state(struct se_device *, char *, int *); extern void transport_dump_dev_info(struct se_device *, struct se_lun *, -- cgit v1.2.3 From 3189b067eeae4646f3c7fa0ed0d14659a682baa8 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 12 Oct 2011 11:07:07 -0400 Subject: target: pack struct se_task more tightly Rearrange the fields in se_task to avoid holes. Also increase the flags field to 16 bits as we have the space for it, and this makes adding new flags safer. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 45291b23bc03..a6c23485068e 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -402,24 +402,24 @@ struct se_queue_obj { } ____cacheline_aligned; struct se_task { - unsigned char task_sense; - struct scatterlist *task_sg; - u32 task_sg_nents; - struct scatterlist *task_sg_bidi; - u8 task_scsi_status; - u8 task_flags; - int task_error_status; unsigned long long task_lba; - u32 task_sectors; - u32 task_size; + u32 task_sectors; + u32 task_size; + struct se_cmd *task_se_cmd; + struct scatterlist *task_sg; + struct scatterlist *task_sg_bidi; + u32 task_sg_nents; + u16 task_flags; + u8 task_sense; + u8 task_scsi_status; + int task_error_status; enum dma_data_direction task_data_direction; - struct se_cmd *task_se_cmd; - struct completion task_stop_comp; - atomic_t task_state_active; + atomic_t task_state_active; struct timer_list task_timer; - struct list_head t_list; - struct list_head t_execute_list; - struct list_head t_state_list; + struct list_head t_list; + struct list_head t_execute_list; + struct list_head t_state_list; + struct completion task_stop_comp; } ____cacheline_aligned; struct se_cmd { -- cgit v1.2.3 From 485fd0d1e3b8010b538bd0b209f3592acc825677 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 12 Oct 2011 11:09:12 -0400 Subject: target: replace ->get_cdb with a target_get_task_cdb helper Instead of calling out to the backends from the core to get a per-task CDB and then modify it for the LBA/len pair used for this CDB provide a helper that writes the adjusted CDB into a provided buffer and call this method from ->do_task in pscsi. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_transport.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include') diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index c5eb259c2e2f..171c2359bc79 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -190,6 +190,7 @@ extern int transport_generic_do_tmr(struct se_cmd *); extern int core_alua_check_nonop_delay(struct se_cmd *); /* From target_core_cdb.c */ extern int transport_emulate_control_cdb(struct se_task *); +extern void target_get_task_cdb(struct se_task *task, unsigned char *cdb); /* * Each se_transport_task_t can have N number of possible struct se_task's @@ -308,10 +309,6 @@ struct se_subsystem_api { */ ssize_t (*show_configfs_dev_params)(struct se_hba *, struct se_subsystem_dev *, char *); - /* - * get_cdb(): - */ - unsigned char *(*get_cdb)(struct se_task *); /* * get_device_rev(): */ -- cgit v1.2.3 From b937d27052e5759b1308782166fe47bc76e05b4d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 12 Oct 2011 11:09:13 -0400 Subject: target: remove the ->transport_split_cdb callback in se_cmd Add a switch statement implementing the CDB LBA/len update directly in target_get_task_cdb and remove the old ->transport_split_cdb callback and all its implementations. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index a6c23485068e..16d7a4985639 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -470,7 +470,6 @@ struct se_cmd { struct list_head se_queue_node; struct target_core_fabric_ops *se_tfo; int (*transport_emulate_cdb)(struct se_cmd *); - void (*transport_split_cdb)(unsigned long long, u32, unsigned char *); void (*transport_complete_callback)(struct se_cmd *); int (*transport_qf_callback)(struct se_cmd *); -- cgit v1.2.3 From f55918fa3202a646dad2404f7de008108edc5048 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 14 Oct 2011 07:30:17 -0400 Subject: target: clean up the backend interface to caching parameters Remove the dpo_emulated, fua_write_emulated, fua_read_emulated and write_cache_emulated methods, and replace them with a simple bitfields in se_subsystem_api in those cases where they ever returned one. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_transport.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 171c2359bc79..9c7e32870f87 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -218,6 +218,10 @@ struct se_subsystem_api { * Transport Type. */ u8 transport_type; + + unsigned int fua_write_emulated : 1; + unsigned int write_cache_emulated : 1; + /* * struct module for struct se_hba references */ @@ -253,22 +257,6 @@ struct se_subsystem_api { */ void (*free_device)(void *); - /* - * dpo_emulated(): - */ - int (*dpo_emulated)(struct se_device *); - /* - * fua_write_emulated(): - */ - int (*fua_write_emulated)(struct se_device *); - /* - * fua_read_emulated(): - */ - int (*fua_read_emulated)(struct se_device *); - /* - * write_cache_emulated(): - */ - int (*write_cache_emulated)(struct se_device *); /* * transport_complete(): * -- cgit v1.2.3 From e057f53308a5f071556ee80586b99ee755bf07f5 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 17 Oct 2011 13:56:41 -0400 Subject: target: remove the transport_qf_callback se_cmd callback Remove the need for the transport_qf_callback callback by making sure we have specific states with specific handlers for the two queue full cases. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 16d7a4985639..2d47aa9f762a 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -102,6 +102,7 @@ enum transport_state_table { TRANSPORT_NEW_CMD_MAP = 16, TRANSPORT_FREE_CMD_INTR = 17, TRANSPORT_COMPLETE_QF_WP = 18, + TRANSPORT_COMPLETE_QF_OK = 19, }; /* Used for struct se_cmd->se_cmd_flags */ @@ -471,7 +472,6 @@ struct se_cmd { struct target_core_fabric_ops *se_tfo; int (*transport_emulate_cdb)(struct se_cmd *); void (*transport_complete_callback)(struct se_cmd *); - int (*transport_qf_callback)(struct se_cmd *); unsigned char *t_task_cdb; unsigned char __t_task_cdb[TCM_MAX_COMMAND_SIZE]; -- cgit v1.2.3 From f7a5cc0b310af887f5391ba886d3d9254ac8920a Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 17 Oct 2011 13:56:42 -0400 Subject: target: remove SCF_EMULATE_QUEUE_FULL Add a new boolean at_head parameter to transport_add_cmd_to_queue and thus obsolete the SCF_EMULATE_QUEUE_FULL flag. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 2d47aa9f762a..77b3de846340 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -127,7 +127,6 @@ enum se_cmd_flags_table { SCF_UNUSED = 0x00100000, SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC = 0x00400000, SCF_EMULATE_CDB_ASYNC = 0x01000000, - SCF_EMULATE_QUEUE_FULL = 0x02000000, }; /* struct se_dev_entry->lun_flags and struct se_lun->lun_access */ -- cgit v1.2.3 From cdbb70bb4c17dad0ee23a357030021892a0f60f0 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 17 Oct 2011 13:56:46 -0400 Subject: target: factor some duplicate code for stopping a task Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_transport.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 9c7e32870f87..1ba5835426fc 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -171,6 +171,7 @@ extern int transport_generic_handle_data(struct se_cmd *); extern void transport_new_cmd_failure(struct se_cmd *); extern int transport_generic_handle_tmr(struct se_cmd *); extern void transport_generic_free_cmd_intr(struct se_cmd *); +extern bool target_stop_task(struct se_task *task, unsigned long *flags); extern void __transport_stop_task_timer(struct se_task *, unsigned long *); extern int transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *, u32, struct scatterlist *, u32); -- cgit v1.2.3 From e99d48a62bfc6e64548e0d5085240c5024eca471 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 17 Oct 2011 13:56:47 -0400 Subject: target: remove TF_TIMER_STOP TF_TIMER_STOP is useless as it only helps to mitigate a tiny race during deleting the timer. But given that we have cleared TF_ACTIVE at this point we already have another mitigation a few lines down the function. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 77b3de846340..8f02a65de75f 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -78,7 +78,6 @@ enum se_task_flags { TF_TIMEOUT = (1 << 2), TF_REQUEST_STOP = (1 << 3), TF_TIMER_RUNNING = (1 << 4), - TF_TIMER_STOP = (1 << 5), }; /* Special transport agnostic struct se_cmd->t_states */ -- cgit v1.2.3 From cc5d0f0f61645ca43d9a7320ec2f268bad5016c5 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 17 Oct 2011 13:56:48 -0400 Subject: target: stop task timers earlier Currently we stop the timers for all tasks in a command fairly late during I/O completion, which is fairly pointless and requires all kinds of safety checks. Instead delete pending timers early on in transport_complete_task, thus ensuring no new timers firest after that. We take t_state_lock a bit later in that function thus making sure currenly running timers are out of the criticial section. To be completely sure the timer has finished we also add another del_timer_sync call when freeing the task. This also allows removing TF_TIMER_RUNNING as it would be equivalent to TF_ACTIVE now. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 - include/target/target_core_transport.h | 1 - 2 files changed, 2 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 8f02a65de75f..027193650749 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -77,7 +77,6 @@ enum se_task_flags { TF_SENT = (1 << 1), TF_TIMEOUT = (1 << 2), TF_REQUEST_STOP = (1 << 3), - TF_TIMER_RUNNING = (1 << 4), }; /* Special transport agnostic struct se_cmd->t_states */ diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 1ba5835426fc..c8538c5d3fbf 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -172,7 +172,6 @@ extern void transport_new_cmd_failure(struct se_cmd *); extern int transport_generic_handle_tmr(struct se_cmd *); extern void transport_generic_free_cmd_intr(struct se_cmd *); extern bool target_stop_task(struct se_task *task, unsigned long *flags); -extern void __transport_stop_task_timer(struct se_task *, unsigned long *); extern int transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *, u32, struct scatterlist *, u32); extern int transport_clear_lun_from_sessions(struct se_lun *); -- cgit v1.2.3 From bfaf40ada2e15bc972cab4cd5452a88720e30647 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 17 Oct 2011 13:56:50 -0400 Subject: target: remove the TRANSPORT_REMOVE state We never queue an command with this state, and only set it in a completely bogus place in tcm_fc. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 027193650749..ced065c1428d 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -95,7 +95,6 @@ enum transport_state_table { TRANSPORT_ISTATE_PROCESSING = 11, TRANSPORT_ISTATE_PROCESSED = 12, TRANSPORT_KILL = 13, - TRANSPORT_REMOVE = 14, TRANSPORT_FREE = 15, TRANSPORT_NEW_CMD_MAP = 16, TRANSPORT_FREE_CMD_INTR = 17, -- cgit v1.2.3 From f2da9dbdb54f2e9fa00dd01af6ff2ab06b4d90b7 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 17 Oct 2011 13:56:51 -0400 Subject: target: remove TRANSPORT_DEFERRED_CMD state We never check for this state, and it makes testing for a completed state much harder given that it overrides the existing state. Also remove the unused deferred_t_state which is related to it. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index ced065c1428d..6e2dc3ebff37 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -83,7 +83,6 @@ enum se_task_flags { enum transport_state_table { TRANSPORT_NO_STATE = 0, TRANSPORT_NEW_CMD = 1, - TRANSPORT_DEFERRED_CMD = 2, TRANSPORT_WRITE_PENDING = 3, TRANSPORT_PROCESS_WRITE = 4, TRANSPORT_PROCESSING = 5, @@ -434,8 +433,6 @@ struct se_cmd { int sam_task_attr; /* Transport protocol dependent state, see transport_state_table */ enum transport_state_table t_state; - /* Transport protocol dependent state for out of order CmdSNs */ - int deferred_t_state; /* Transport specific error status */ int transport_error_status; /* See se_cmd_flags_table */ -- cgit v1.2.3 From 59aaad1ec44d9a77c32b873b001f31c5af47fcc7 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 17 Oct 2011 13:56:52 -0400 Subject: target: remove unused TRANSPORT_ states Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 6e2dc3ebff37..07104bf0a9c8 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -90,11 +90,7 @@ enum transport_state_table { TRANSPORT_COMPLETE_FAILURE = 7, TRANSPORT_COMPLETE_TIMEOUT = 8, TRANSPORT_PROCESS_TMR = 9, - TRANSPORT_TMR_COMPLETE = 10, TRANSPORT_ISTATE_PROCESSING = 11, - TRANSPORT_ISTATE_PROCESSED = 12, - TRANSPORT_KILL = 13, - TRANSPORT_FREE = 15, TRANSPORT_NEW_CMD_MAP = 16, TRANSPORT_FREE_CMD_INTR = 17, TRANSPORT_COMPLETE_QF_WP = 18, -- cgit v1.2.3 From 35e0e757537b9239172e35db773dd062727fd612 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 17 Oct 2011 13:56:53 -0400 Subject: target: use a workqueue for I/O completions Instead of abusing the target processing thread for offloading I/O completion in the backends to user context add a new workqueue. This means completions can be processed as fast as available CPU time allows it, including in parallel with other completions and more importantly I/O submission or QUEUE FULL retries. This should give much better performance especially on loaded systems. As a fallout we can merge all the completed states into a single one. On the downside this change complicates lun reset handling a bit by requiring us to cancel a work item only for those states that have it initialized. The alternative would be to either always initialize the work item to a dummy handler, or always use the same handler and do a switch on the state. The long term solution will be a flag that says that the command has an initialized work item, but that's only going to be useful once we have more users. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 07104bf0a9c8..8e2c83d4fbad 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -86,9 +86,7 @@ enum transport_state_table { TRANSPORT_WRITE_PENDING = 3, TRANSPORT_PROCESS_WRITE = 4, TRANSPORT_PROCESSING = 5, - TRANSPORT_COMPLETE_OK = 6, - TRANSPORT_COMPLETE_FAILURE = 7, - TRANSPORT_COMPLETE_TIMEOUT = 8, + TRANSPORT_COMPLETE = 6, TRANSPORT_PROCESS_TMR = 9, TRANSPORT_ISTATE_PROCESSING = 11, TRANSPORT_NEW_CMD_MAP = 16, @@ -492,6 +490,8 @@ struct se_cmd { struct completion transport_lun_stop_comp; struct scatterlist *t_tasks_sg_chained; + struct work_struct work; + /* * Used for pre-registered fabric SGL passthrough WRITE and READ * with the special SCF_PASSTHROUGH_CONTIG_TO_SG case for TCM_Loop -- cgit v1.2.3 From dbc5623eb2898f5b5dcdc0b16077bb3f58629c78 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sat, 22 Oct 2011 01:03:54 -0700 Subject: target: transport_subsystem_check_init cleanups Remove the now unnecessary extra call to transport_subsystem_check_init() in target_core_register_fabric(), and also merge transport_subsystem_reqmods() directly into transport_subsystem_check_init(). Reported-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_transport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index c8538c5d3fbf..32c586346c0e 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -113,7 +113,7 @@ extern int init_se_kmem_caches(void); extern void release_se_kmem_caches(void); extern u32 scsi_get_new_index(scsi_index_t); extern void transport_init_queue_obj(struct se_queue_obj *); -extern int transport_subsystem_check_init(void); +extern void transport_subsystem_check_init(void); extern int transport_subsystem_register(struct se_subsystem_api *); extern void transport_subsystem_release(struct se_subsystem_api *); extern void transport_load_plugins(void); -- cgit v1.2.3 From 7c1c6af37af69a4ac4a6485c968496d257245b5d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 18 Oct 2011 06:57:00 -0400 Subject: target: remove the task_sg_bidi field se_task and pSCSI BIDI support This field is never used given that BIDI handling happens at the command and not the task level. Remove it and the dead code in pscsi that tries to work on it. It also prevents pSCSI passthrough for the two currently enabled BIDI commands now that task->task_sg_bidi support has been removed. Signed-off-by: Christoph Hellwig Cc: Boaz Harrosh Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 8e2c83d4fbad..132266b15b7c 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -397,7 +397,6 @@ struct se_task { u32 task_size; struct se_cmd *task_se_cmd; struct scatterlist *task_sg; - struct scatterlist *task_sg_bidi; u32 task_sg_nents; u16 task_flags; u8 task_sense; -- cgit v1.2.3 From 415a090ade7e674018e3fa4255938e4c312339b3 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sun, 23 Oct 2011 18:16:13 -0700 Subject: target: Fix incorrect transport_sent usage This patch converts target-core to use se_cmd->t_transport_sent instead of a duplicated se_cmd->transport_sent member in a handful of locations. It also updates iscsi_target to properly use ->t_transport_sent instead of it's own iscsi_cmd_t->transport_sent value that was not being assigned. Reported-by: Christoph Hellwig Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 132266b15b7c..d210f1fe9962 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -439,7 +439,6 @@ struct se_cmd { u32 orig_fe_lun; /* Persistent Reservation key */ u64 pr_res_key; - atomic_t transport_sent; /* Used for sense data */ void *sense_buffer; struct list_head se_delayed_node; -- cgit v1.2.3 From 2e982ab92dff057c639d4a43ccfa275be62f5e59 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sun, 23 Oct 2011 18:46:36 -0700 Subject: target: Remove legacy se_task->task_timer and associated logic This patch removes the legacy usage of se_task->task_timer and associated infrastructure that originally was used as a way to help manage buggy backend SCSI LLDs that in certain cases would never return back an outstanding task. This includes the removal of target_complete_timeout_work(), timeout logic from transport_complete_task(), transport_task_timeout_handler(), transport_start_task_timer(), the per device task_timeout configfs attribute, and all task_timeout associated structure members and defines in target_core_base.h This is being removed in preparation to make transport_complete_task() run in lock-less mode. Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 7 +------ include/target/target_core_transport.h | 16 +++------------- 2 files changed, 4 insertions(+), 19 deletions(-) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index d210f1fe9962..35aa786f93da 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -75,8 +75,7 @@ enum transport_tpg_type_table { enum se_task_flags { TF_ACTIVE = (1 << 0), TF_SENT = (1 << 1), - TF_TIMEOUT = (1 << 2), - TF_REQUEST_STOP = (1 << 3), + TF_REQUEST_STOP = (1 << 2), }; /* Special transport agnostic struct se_cmd->t_states */ @@ -404,7 +403,6 @@ struct se_task { int task_error_status; enum dma_data_direction task_data_direction; atomic_t task_state_active; - struct timer_list task_timer; struct list_head t_list; struct list_head t_execute_list; struct list_head t_state_list; @@ -469,7 +467,6 @@ struct se_cmd { atomic_t t_se_count; atomic_t t_task_cdbs_left; atomic_t t_task_cdbs_ex_left; - atomic_t t_task_cdbs_timeout_left; atomic_t t_task_cdbs_sent; atomic_t t_transport_aborted; atomic_t t_transport_active; @@ -477,7 +474,6 @@ struct se_cmd { atomic_t t_transport_queue_active; atomic_t t_transport_sent; atomic_t t_transport_stop; - atomic_t t_transport_timeout; atomic_t transport_dev_active; atomic_t transport_lun_active; atomic_t transport_lun_fe_stop; @@ -646,7 +642,6 @@ struct se_dev_attrib { u32 optimal_sectors; u32 hw_queue_depth; u32 queue_depth; - u32 task_timeout; u32 max_unmap_lba_count; u32 max_unmap_block_desc_count; u32 unmap_granularity; diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 32c586346c0e..a037a1a6fbba 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -22,10 +22,9 @@ #define PYX_TRANSPORT_LU_COMM_FAILURE -7 #define PYX_TRANSPORT_UNKNOWN_MODE_PAGE -8 #define PYX_TRANSPORT_WRITE_PROTECTED -9 -#define PYX_TRANSPORT_TASK_TIMEOUT -10 -#define PYX_TRANSPORT_RESERVATION_CONFLICT -11 -#define PYX_TRANSPORT_ILLEGAL_REQUEST -12 -#define PYX_TRANSPORT_USE_SENSE_REASON -13 +#define PYX_TRANSPORT_RESERVATION_CONFLICT -10 +#define PYX_TRANSPORT_ILLEGAL_REQUEST -11 +#define PYX_TRANSPORT_USE_SENSE_REASON -12 #ifndef SAM_STAT_RESERVATION_CONFLICT #define SAM_STAT_RESERVATION_CONFLICT 0x18 @@ -38,13 +37,6 @@ #define TRANSPORT_PLUGIN_VHBA_PDEV 2 #define TRANSPORT_PLUGIN_VHBA_VDEV 3 -/* For SE OBJ Plugins, in seconds */ -#define TRANSPORT_TIMEOUT_TUR 10 -#define TRANSPORT_TIMEOUT_TYPE_DISK 60 -#define TRANSPORT_TIMEOUT_TYPE_ROM 120 -#define TRANSPORT_TIMEOUT_TYPE_TAPE 600 -#define TRANSPORT_TIMEOUT_TYPE_OTHER 300 - /* * struct se_subsystem_dev->su_dev_flags */ @@ -61,8 +53,6 @@ #define DF_SPC2_RESERVATIONS_WITH_ISID 0x00000004 /* struct se_dev_attrib sanity values */ -/* 10 Minutes */ -#define DA_TASK_TIMEOUT_MAX 600 /* Default max_unmap_lba_count */ #define DA_MAX_UNMAP_LBA_COUNT 0 /* Default max_unmap_block_desc_count */ -- cgit v1.2.3