Re: se_dev_entry.deve_cmds needed?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Fri, 2012-02-10 at 11:48 -0800, Roland Dreier wrote:
> Hey Nico,
> 
> The only places I can find that refer to struct se_dev_entry.deve_cmds are:
> 
> void core_dec_lacl_count(struct se_node_acl *se_nacl, struct se_cmd *se_cmd)
> {
> 	struct se_dev_entry *deve;
> 	unsigned long flags;
> 
> 	spin_lock_irqsave(&se_nacl->device_list_lock, flags);
> 	deve = &se_nacl->device_list[se_cmd->orig_fe_lun];
> 	deve->deve_cmds--;
> 	spin_unlock_irqrestore(&se_nacl->device_list_lock, flags);
> }
> 
> and
> 
> int transport_lookup_cmd_lun_cdb(struct se_cmd *se_cmd, u32
> unpacked_lun, unsigned char *cdb)
> {
> ...
> 		deve->deve_cmds++;
> ...
> }
> 
> is this a remnant of something old, or is there a plan to use it for something?
> 

So this was originally used as a informational counter for active
se_dev_entry commands, but as you've noticed it's no longer used and can
be removed.

> Also does anything make sure we don't call core_free_device_list_for_node() with
> commands in flight?
> 

Yes. core_tpg_del_initiator_node_acl() will call TFO->close_session()
first to stop active sessions before core_free_device_list_for_node().

Depending on the fabric, the sessions may already have been all shutdown
for the endpoint during TPG disable (eg: tcm_qla2xxx) before NodeACLs
are being removed, or may still be active and are shutdown individually
in core_tpg_del_initiator_node_acl() (eg: iscsi_target)

--nab


--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Photos]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

Add to Google Powered by Linux