summaryrefslogtreecommitdiff
path: root/include/target/target_core_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/target/target_core_base.h')
-rw-r--r--include/target/target_core_base.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 549947d407cf..63dd12124139 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -195,7 +195,6 @@ enum target_sc_flags_table {
TARGET_SCF_ACK_KREF = 0x02,
TARGET_SCF_UNKNOWN_SIZE = 0x04,
TARGET_SCF_USE_CPUID = 0x08,
- TARGET_SCF_LOOKUP_LUN_FROM_TAG = 0x10,
};
/* fabric independent task management function values */
@@ -540,7 +539,11 @@ struct se_cmd {
struct scatterlist *t_prot_sg;
unsigned int t_prot_nents;
sense_reason_t pi_err;
- sector_t bad_sector;
+ u64 sense_info;
+ /*
+ * CPU LIO will execute the cmd on. Defaults to the CPU the cmd is
+ * initialized on. Drivers can override.
+ */
int cpuid;
};
@@ -609,7 +612,7 @@ static inline struct se_node_acl *fabric_stat_to_nacl(struct config_item *item)
}
struct se_session {
- unsigned sess_tearing_down:1;
+ atomic_t stopped;
u64 sess_bin_isid;
enum target_prot_op sup_prot_ops;
enum target_prot_type sess_prot_type;
@@ -619,9 +622,9 @@ struct se_session {
struct percpu_ref cmd_count;
struct list_head sess_list;
struct list_head sess_acl_list;
- struct list_head sess_cmd_list;
spinlock_t sess_cmd_lock;
- wait_queue_head_t cmd_list_wq;
+ wait_queue_head_t cmd_count_wq;
+ struct completion stop_done;
void *sess_cmd_map;
struct sbitmap_queue sess_tag_pool;
};
@@ -761,6 +764,11 @@ struct se_dev_stat_grps {
struct config_group scsi_lu_group;
};
+struct se_device_queue {
+ struct list_head state_list;
+ spinlock_t lock;
+};
+
struct se_device {
/* RELATIVE TARGET PORT IDENTIFER Counter */
u16 dev_rpti_counter;
@@ -793,7 +801,6 @@ struct se_device {
atomic_t dev_qf_count;
u32 export_count;
spinlock_t delayed_cmd_lock;
- spinlock_t execute_task_lock;
spinlock_t dev_reservation_lock;
unsigned int dev_reservation_flags;
#define DRF_SPC2_RESERVATIONS 0x00000001
@@ -812,7 +819,6 @@ struct se_device {
struct list_head dev_tmr_list;
struct work_struct qf_work_queue;
struct list_head delayed_cmd_list;
- struct list_head state_list;
struct list_head qf_cmd_list;
/* Pointer to associated SE HBA */
struct se_hba *se_hba;
@@ -839,6 +845,8 @@ struct se_device {
/* For se_lun->lun_se_dev RCU read-side critical access */
u32 hba_index;
struct rcu_head rcu_head;
+ int queue_cnt;
+ struct se_device_queue *queues;
};
struct se_hba {