Skip to content

Commit 2acd09f

Browse files
Andy GroverNicholas Bellinger
authored andcommitted
target: Remove unused struct members in se_dev_entry
Some were incremented, but never used anywhere from what I could tell. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent b8d26b3 commit 2acd09f

4 files changed

Lines changed: 0 additions & 21 deletions

File tree

‎drivers/target/target_core_device.c‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun)
6868
struct se_dev_entry *deve = se_cmd->se_deve;
6969

7070
deve->total_cmds++;
71-
deve->total_bytes += se_cmd->data_length;
7271

7372
if ((se_cmd->data_direction == DMA_TO_DEVICE) &&
7473
(deve->lun_flags & TRANSPORT_LUNFLAGS_READ_ONLY)) {
@@ -85,8 +84,6 @@ transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun)
8584
else if (se_cmd->data_direction == DMA_FROM_DEVICE)
8685
deve->read_bytes += se_cmd->data_length;
8786

88-
deve->deve_cmds++;
89-
9087
se_lun = deve->se_lun;
9188
se_cmd->se_lun = deve->se_lun;
9289
se_cmd->pr_res_key = deve->pr_res_key;
@@ -275,17 +272,6 @@ int core_free_device_list_for_node(
275272
return 0;
276273
}
277274

278-
void core_dec_lacl_count(struct se_node_acl *se_nacl, struct se_cmd *se_cmd)
279-
{
280-
struct se_dev_entry *deve;
281-
unsigned long flags;
282-
283-
spin_lock_irqsave(&se_nacl->device_list_lock, flags);
284-
deve = se_nacl->device_list[se_cmd->orig_fe_lun];
285-
deve->deve_cmds--;
286-
spin_unlock_irqrestore(&se_nacl->device_list_lock, flags);
287-
}
288-
289275
void core_update_device_list_access(
290276
u32 mapped_lun,
291277
u32 lun_access,

‎drivers/target/target_core_internal.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extern struct t10_alua_lu_gp *default_lu_gp;
88
struct se_dev_entry *core_get_se_deve_from_rtpi(struct se_node_acl *, u16);
99
int core_free_device_list_for_node(struct se_node_acl *,
1010
struct se_portal_group *);
11-
void core_dec_lacl_count(struct se_node_acl *, struct se_cmd *);
1211
void core_update_device_list_access(u32, u32, struct se_node_acl *);
1312
int core_enable_device_list_for_node(struct se_lun *, struct se_lun_acl *,
1413
u32, u32, struct se_node_acl *, struct se_portal_group *);

‎drivers/target/target_core_transport.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,8 +2163,6 @@ void transport_generic_free_cmd(struct se_cmd *cmd, int wait_for_tasks)
21632163
if (wait_for_tasks)
21642164
transport_wait_for_tasks(cmd);
21652165

2166-
core_dec_lacl_count(cmd->se_sess->se_node_acl, cmd);
2167-
21682166
if (cmd->se_lun)
21692167
transport_lun_remove_cmd(cmd);
21702168

‎include/target/target_core_base.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,8 @@ struct se_dev_entry {
572572
bool def_pr_registered;
573573
/* See transport_lunflags_table */
574574
u32 lun_flags;
575-
u32 deve_cmds;
576575
u32 mapped_lun;
577-
u32 average_bytes;
578-
u32 last_byte_count;
579576
u32 total_cmds;
580-
u32 total_bytes;
581577
u64 pr_res_key;
582578
u64 creation_time;
583579
u32 attach_count;

0 commit comments

Comments
 (0)