Skip to content

Commit 5c73b67

Browse files
Jörn EngelNicholas Bellinger
authored andcommitted
target: remove unused struct fields
Some are never used, some are set but never read, dev_hoq_count is incremented and decremented, but never read. Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent 1289a05 commit 5c73b67

4 files changed

Lines changed: 0 additions & 30 deletions

File tree

‎drivers/target/iscsi/iscsi_target_core.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,6 @@ struct iscsi_conn {
534534
atomic_t connection_exit;
535535
atomic_t connection_recovery;
536536
atomic_t connection_reinstatement;
537-
atomic_t connection_wait;
538537
atomic_t connection_wait_rcfr;
539538
atomic_t sleep_on_conn_wait_comp;
540539
atomic_t transport_failed;
@@ -642,7 +641,6 @@ struct iscsi_session {
642641
atomic_t session_reinstatement;
643642
atomic_t session_stop_active;
644643
atomic_t sleep_on_sess_wait_comp;
645-
atomic_t transport_wait_cmds;
646644
/* connection list */
647645
struct list_head sess_conn_list;
648646
struct list_head cr_active_list;

‎drivers/target/target_core_alua.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,6 @@ void core_alua_free_lu_gp(struct t10_alua_lu_gp *lu_gp)
11911191
* struct t10_alua_lu_gp.
11921192
*/
11931193
spin_lock(&lu_gps_lock);
1194-
atomic_set(&lu_gp->lu_gp_shutdown, 1);
11951194
list_del(&lu_gp->lu_gp_node);
11961195
alua_lu_gps_count--;
11971196
spin_unlock(&lu_gps_lock);
@@ -1445,7 +1444,6 @@ struct t10_alua_tg_pt_gp_member *core_alua_allocate_tg_pt_gp_mem(
14451444

14461445
tg_pt_gp_mem->tg_pt = port;
14471446
port->sep_alua_tg_pt_gp_mem = tg_pt_gp_mem;
1448-
atomic_set(&port->sep_tg_pt_gp_active, 1);
14491447

14501448
return tg_pt_gp_mem;
14511449
}

‎drivers/target/target_core_transport.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,6 @@ struct se_device *transport_add_device_to_core_hba(
13261326
dev->se_hba = hba;
13271327
dev->se_sub_dev = se_dev;
13281328
dev->transport = transport;
1329-
atomic_set(&dev->active_cmds, 0);
13301329
INIT_LIST_HEAD(&dev->dev_list);
13311330
INIT_LIST_HEAD(&dev->dev_sep_list);
13321331
INIT_LIST_HEAD(&dev->dev_tmr_list);
@@ -1336,11 +1335,8 @@ struct se_device *transport_add_device_to_core_hba(
13361335
INIT_LIST_HEAD(&dev->qf_cmd_list);
13371336
spin_lock_init(&dev->execute_task_lock);
13381337
spin_lock_init(&dev->delayed_cmd_lock);
1339-
spin_lock_init(&dev->state_task_lock);
1340-
spin_lock_init(&dev->dev_alua_lock);
13411338
spin_lock_init(&dev->dev_reservation_lock);
13421339
spin_lock_init(&dev->dev_status_lock);
1343-
spin_lock_init(&dev->dev_status_thr_lock);
13441340
spin_lock_init(&dev->se_port_lock);
13451341
spin_lock_init(&dev->se_tmr_lock);
13461342
spin_lock_init(&dev->qf_cmd_lock);
@@ -1952,8 +1948,6 @@ static inline int transport_execute_task_attr(struct se_cmd *cmd)
19521948
* to allow the passed struct se_cmd list of tasks to the front of the list.
19531949
*/
19541950
if (cmd->sam_task_attr == MSG_HEAD_TAG) {
1955-
atomic_inc(&cmd->se_dev->dev_hoq_count);
1956-
smp_mb__after_atomic_inc();
19571951
pr_debug("Added HEAD_OF_QUEUE for CDB:"
19581952
" 0x%02x, se_ordered_id: %u\n",
19591953
cmd->t_task_cdb[0],
@@ -3095,8 +3089,6 @@ static void transport_complete_task_attr(struct se_cmd *cmd)
30953089
" SIMPLE: %u\n", dev->dev_cur_ordered_id,
30963090
cmd->se_ordered_id);
30973091
} else if (cmd->sam_task_attr == MSG_HEAD_TAG) {
3098-
atomic_dec(&dev->dev_hoq_count);
3099-
smp_mb__after_atomic_dec();
31003092
dev->dev_cur_ordered_id++;
31013093
pr_debug("Incremented dev_cur_ordered_id: %u for"
31023094
" HEAD_OF_QUEUE: %u\n", dev->dev_cur_ordered_id,

‎include/target/target_core_base.h‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ struct t10_alua_lu_gp {
213213
u16 lu_gp_id;
214214
int lu_gp_valid_id;
215215
u32 lu_gp_members;
216-
atomic_t lu_gp_shutdown;
217216
atomic_t lu_gp_ref_cnt;
218217
spinlock_t lu_gp_lock;
219218
struct config_group lu_gp_group;
@@ -679,9 +678,6 @@ struct se_subsystem_dev {
679678
} ____cacheline_aligned;
680679

681680
struct se_device {
682-
/* Set to 1 if thread is NOT sleeping on thread_sem */
683-
u8 thread_active;
684-
u8 dev_status_timer_flags;
685681
/* RELATIVE TARGET PORT IDENTIFER Counter */
686682
u16 dev_rpti_counter;
687683
/* Used for SAM Task Attribute ordering */
@@ -706,14 +702,10 @@ struct se_device {
706702
u64 write_bytes;
707703
spinlock_t stats_lock;
708704
/* Active commands on this virtual SE device */
709-
atomic_t active_cmds;
710705
atomic_t simple_cmds;
711706
atomic_t depth_left;
712707
atomic_t dev_ordered_id;
713-
atomic_t dev_tur_active;
714708
atomic_t execute_tasks;
715-
atomic_t dev_status_thr_count;
716-
atomic_t dev_hoq_count;
717709
atomic_t dev_ordered_sync;
718710
atomic_t dev_qf_count;
719711
struct se_obj dev_obj;
@@ -722,12 +714,8 @@ struct se_device {
722714
struct se_queue_obj dev_queue_obj;
723715
spinlock_t delayed_cmd_lock;
724716
spinlock_t execute_task_lock;
725-
spinlock_t state_task_lock;
726-
spinlock_t dev_alua_lock;
727717
spinlock_t dev_reservation_lock;
728-
spinlock_t dev_state_lock;
729718
spinlock_t dev_status_lock;
730-
spinlock_t dev_status_thr_lock;
731719
spinlock_t se_port_lock;
732720
spinlock_t se_tmr_lock;
733721
spinlock_t qf_cmd_lock;
@@ -739,11 +727,8 @@ struct se_device {
739727
struct t10_pr_registration *dev_pr_res_holder;
740728
struct list_head dev_sep_list;
741729
struct list_head dev_tmr_list;
742-
struct timer_list dev_status_timer;
743730
/* Pointer to descriptor for processing thread */
744731
struct task_struct *process_thread;
745-
pid_t process_thread_pid;
746-
struct task_struct *dev_mgmt_thread;
747732
struct work_struct qf_work_queue;
748733
struct list_head delayed_cmd_list;
749734
struct list_head execute_task_list;
@@ -756,8 +741,6 @@ struct se_device {
756741
struct se_subsystem_api *transport;
757742
/* Linked list for struct se_hba struct se_device list */
758743
struct list_head dev_list;
759-
/* Linked list for struct se_global->g_se_dev_list */
760-
struct list_head g_se_dev_list;
761744
} ____cacheline_aligned;
762745

763746
struct se_hba {
@@ -819,7 +802,6 @@ struct se_port {
819802
u32 sep_index;
820803
struct scsi_port_stats sep_stats;
821804
/* Used for ALUA Target Port Groups membership */
822-
atomic_t sep_tg_pt_gp_active;
823805
atomic_t sep_tg_pt_secondary_offline;
824806
/* Used for PR ALL_TG_PT=1 */
825807
atomic_t sep_tg_pt_ref_cnt;

0 commit comments

Comments
 (0)