summaryrefslogtreecommitdiff
path: root/include/target/target_core_base.h
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2023-03-25 00:39:15 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2023-03-25 00:39:15 +0300
commitae2fb3cb0f00482c0ec0079e4244bdee3e1fc46b (patch)
tree39102f757a3ecbabdd6ea259f2b659821ea5c374 /include/target/target_core_base.h
parent5c8c74ef20e7973c270498dbbf96170c9f92dae3 (diff)
parentea87981a0ee8fb8ced1c87d004a541b60623ff97 (diff)
downloadlinux-ae2fb3cb0f00482c0ec0079e4244bdee3e1fc46b.tar.xz
Merge patch series "target: TMF and recovery fixes"
Mike Christie <michael.christie@oracle.com> says: The following patches apply over Martin's 6.4 branches and Linus's tree. They fix a couple regressions in iscsit that occur when there are TMRs executing and a connection is closed. It also includes Dimitry's fixes in related code paths for cmd cleanup when ERL2 is used and the write pending hang during conn cleanup. This version of the patchset brings it back to just regressions and fixes for bugs we have a lot of users hitting. I'm going to fix isert and get it hooked into iscsit properly in a second patchset, because this one was getting so large. I've also moved my cleanup type of patches for a 3rd patchset. Link: https://lore.kernel.org/r/20230319015620.96006-1-michael.christie@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/target/target_core_base.h')
-rw-r--r--include/target/target_core_base.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index e52d0915b3d8..5f8e96f1516f 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -494,6 +494,7 @@ struct se_cmd {
struct se_lun *se_lun;
/* Only used for internal passthrough and legacy TCM fabric modules */
struct se_session *se_sess;
+ struct target_cmd_counter *cmd_cnt;
struct se_tmr_req *se_tmr_req;
struct llist_node se_cmd_list;
struct completion *free_compl;
@@ -619,22 +620,26 @@ static inline struct se_node_acl *fabric_stat_to_nacl(struct config_item *item)
acl_fabric_stat_group);
}
-struct se_session {
+struct target_cmd_counter {
+ struct percpu_ref refcnt;
+ wait_queue_head_t refcnt_wq;
+ struct completion stop_done;
atomic_t stopped;
+};
+
+struct se_session {
u64 sess_bin_isid;
enum target_prot_op sup_prot_ops;
enum target_prot_type sess_prot_type;
struct se_node_acl *se_node_acl;
struct se_portal_group *se_tpg;
void *fabric_sess_ptr;
- struct percpu_ref cmd_count;
struct list_head sess_list;
struct list_head sess_acl_list;
spinlock_t sess_cmd_lock;
- wait_queue_head_t cmd_count_wq;
- struct completion stop_done;
void *sess_cmd_map;
struct sbitmap_queue sess_tag_pool;
+ struct target_cmd_counter *cmd_cnt;
};
struct se_device;
@@ -863,6 +868,7 @@ struct se_device {
struct rcu_head rcu_head;
int queue_cnt;
struct se_device_queue *queues;
+ struct mutex lun_reset_mutex;
};
struct target_opcode_descriptor {