Re: [PATCH 0/5] target: Add se_session->sess_kref + convert iscsi/qla2xxx fabrics

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

On Tue, 2012-02-28 at 00:12 -0800, Roland Dreier wrote:
> On Mon, Feb 27, 2012 at 11:51 PM, Nicholas A. Bellinger
> <nab@xxxxxxxxxxxxxxx> wrote:
> > I'm not sure what you mean here wrt to tcm_loop, as sessions are
> > generated from a configfs attribute and mapped 1:1 with target
> > endpoints.
> I meant make the tcm_qla2xxx implementation of shutdown_session
> and close_session closer to tcm_loop, which has:
> static int tcm_loop_shutdown_session(struct se_session *se_sess)
> {
>         return 0;
> }
> static void tcm_loop_close_session(struct se_session *se_sess)
> {
>         return;
> };
> When we remove ACLs in tcm_qla2xxx, we don't actually
> kick out any initiators that may be logged into our FC ports,
> so it's not clear to me why we try to shut down sessions.

The sessions associated with the se_node_acl->acl_group are required to
be shutdown because they may be referencing struct se_node_acl memory,
and the configfs rmdir operation for se_node_acl->acl_group or any
group) is not allowed to fail.

For fabrics that don't allow demo_mode usage, the session login attempts
are rejected once the NodeACL has been removed.  For tcm_qla2xxx we
ended up using demo-mode to allow login to virtual LUN=0 in order to
address some issues with some FC clients that have problems having
fabric login being rejected..

> The conditions that are true in qla_tgt_fc_port_added() are
> true no matter what ACLs we have so it doesn't seem like
> a good idea to make our session database out of sync with
> the FW state when removing ACLs.

It means a new dynamic se_node_acl is being generated for FW state that
still contains an active fabric session, that may end up converted again
to an explict NodeACL with MappedLUNs.  The FW state is still
represented by se_node_acl that can be accessed via configfs operations,
so it's not really out of state.


To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[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