1. 16 3月, 2012 4 次提交
  2. 11 3月, 2012 10 次提交
    • N
      target: Bump core version to v4.1.0-rc2-ml + fabric versions · 9765b1f3
      Nicholas Bellinger 提交于
      Bump core version to v4.1.0-rc2-ml, and for versions from the
      following mainline fabric modules:
      
      loopback: v2.1-rc2
      tcm_fc: v0.4
      iscsi-target: v4.1.0-rc2
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9765b1f3
    • N
      tcm_fc: Fix fc_exch memory leak in ft_send_resp_status · 031ed4d5
      Nicholas Bellinger 提交于
      This patch fixes a bug in tcm_fc where fc_exch memory from fc_exch_mgr->ep_pool
      is currently being leaked by ft_send_resp_status() usage.  Following current
      code in ft_queue_status() response path, using lport->tt.seq_send() needs to be
      followed by a lport->tt.exch_done() in order to release fc_exch memory back into
      libfc_em kmem_cache.
      
      ft_send_resp_status() code is currently used in pre submit se_cmd ft_send_work()
      error exceptions, TM request setup exceptions, and main TM response callback
      path in ft_queue_tm_resp().  This bugfix addresses the leak in these cases.
      
      Cc: Mark D Rustad <mark.d.rustad@intel.com>
      Cc: Kiran Patil <kiran.patil@intel.com>
      Cc: Robert Love <robert.w.love@intel.com>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      031ed4d5
    • N
      target: Drop unused legacy target_core_fabric_ops API callers · c7ec05c8
      Nicholas Bellinger 提交于
      This patch drops the following unused legacy API callers from target_core_fabric.h:
      
      *) TFO->fall_back_to_erl0()
      *) TFO->stop_session()
      *) TFO->sess_logged_in()
      *) TFO->is_state_remove()
      
      This patch also removes the stub usage in loopback, tcm_fc, iscsi_target,
      and ib_srpt fabric modules.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c7ec05c8
    • N
      iscsi-target: Convert to use target_put_session + sess_kref · 99367f01
      Nicholas Bellinger 提交于
      This patch converts iscsi-target session code to use se_sess->sess_kref
      counting for iscsi session shutdown.  The following cases include:
      
      *) last iscsit_close_connection() shutdown path to invoke close session
      *) iscsit_logout_post_handler_closesession() for explict logout
      *) iscsit_free_session() caller for explict shutdown
      
      It also moves iscsit_stop_session() call from lio_tpg_close_session()
      into lio_tpg_shutdown_session() TFO callbacks to invoke an explict
      shutdown, and also changes iscsi_check_for_session_reinstatement()
      login code to use se_sess->sess_kref.
      
      (v2: Make iscsit_handle_time2retain_timeout() use target_put_session)
      
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      99367f01
    • N
      target: Convert se_node_acl->acl_group removal to use ->acl_kref · 337c0607
      Nicholas Bellinger 提交于
      This patch converts core_tpg_del_initiator_node_acl() shutdown from configfs
      context to use se_node_acl->acl_kref and ->acl_free_comp in order to wait for
      outstanding fabric callbacks to complete via transport_deregister_session()
      callbacks before waking ->acl_free_comp from the last ->acl_kref put.
      
      It also changes core_tpg_del_initiator_node_acl() to setup a local sess_list
      with target_get_session() + acl->acl_stop = 1 for active sessions that will
      be shutdown, and changes transport_deregister_session_configfs() to check
      for ->acl_stop usage.
      
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Joern Engel <joern@logfs.org>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      337c0607
    • N
      target: Add se_node_acl->acl_kref for ->acl_free_comp usage · afb999ff
      Nicholas Bellinger 提交于
      This patch adds se_node_acl->acl_kref for use with ->acl_free_comp
      during explict se_node_acl release.  It adds kref_init() during
      se_node_acl setup, kref_get() during __transport_register_session()
      -> target_put_nacl() with existing transport_deregister_session()
      fabric callback usage.
      
      It also moves transport_free_session() to release *se_sess memory
      after target_put_nacl() execution in transport_deregister_session()
      
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Joern Engel <joern@logfs.org>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      afb999ff
    • N
      target: Add se_node_acl->acl_free_comp for NodeACL release path · 01468346
      Nicholas Bellinger 提交于
      Add se_node_acl->acl_free_comp for NodeACL release path to wait for outstanding
      fabric session shutdown to complete in transport_deregister_session() before
      finishing NodeACL release from configfs process context.
      
      Also make transport_deregister_session() clear the comp_nacl bit
      to skip se_node_acl->acl_free_comp completion for dynamically generated
      NodeACL during fabric session shutdown.
      
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Joern Engel <joern@logfs.org>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      01468346
    • N
      target: Add se_sess->sess_kref + get/put helpers · 41ac82b6
      Nicholas Bellinger 提交于
      This patch adds basic se_session->sess_kref and get/put helpers for fabric
      session reference counting.  It sets the initial kref in transport_init_session()
      and adds a target_release_session() callback to invoke TFO->close_session()
      for final session shutdown.
      
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Joern Engel <joern@logfs.org>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      41ac82b6
    • N
      target: Convert session_lock to irqsave · 140854cb
      Nicholas Bellinger 提交于
      This patch converts the remaining struct se_portal_group->session_lock
      usage to use irqsave+irqrestore to address the following warnings for
      hardware target mode interrupt context usage.  This change generate
      other warnings for current iscsi-target mode still using ->session_lock
      with spin_lock_bh, which will need to be converted in a seperate patch.
      
      [  492.480728] [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ]
      [  492.488194] 3.0.0+ #23
      [  492.490820] ------------------------------------------------------
      [  492.497704] sh/7162 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire:
      [  492.504493] (&(&se_tpg->session_lock)->rlock){+.....}, at: [<ffffffffa022364d>] transport_deregister_session+0x2d/0x163 [target_core_mod]
        492.518390]
      [  492.518390] and this task is already holding:
      [  492.524897] (&(&ha->hardware_lock)->rlock){-.-...}, at: [<ffffffffa00b9146>] qla_tgt_stop_phase1+0x5e/0x27e [qla2xxx]
      [  492.536856] which would create a new lock dependency:
      [  492.542481] (&(&ha->hardware_lock)->rlock){-.-...} -> (&(&se_tpg->session_lock)->rlock){+.....}
      [  492.552321]
      [  492.552321] but this new dependency connects a HARDIRQ-irq-safe lock:
      [  492.561149] (&(&ha->hardware_lock)->rlock){-.-...}
      [  492.566400] ... which became HARDIRQ-irq-safe at:
      [  492.571841]   [<ffffffff81064720>] __lock_acquire+0x68f/0x921
      [  492.578247]   [<ffffffff81064eff>] lock_acquire+0xe0/0x10d
      [  492.584367]   [<ffffffff813a74c6>] _raw_spin_lock_irqsave+0x44/0x56
      [  492.591358]   [<ffffffffa009b1be>] qla24xx_msix_default+0x5c/0x2aa [qla2xxx]
      [  492.599227]   [<ffffffff81088582>] handle_irq_event_percpu+0x5a/0x197
      [  492.606413]   [<ffffffff810886fb>] handle_irq_event+0x3c/0x5c
      [  492.612822]   [<ffffffff8108a6dc>] handle_edge_irq+0xcc/0xf1
      [  492.619138]   [<ffffffff810039b9>] handle_irq+0x83/0x8e
      [  492.624971]   [<ffffffff8100333e>] do_IRQ+0x48/0xaf
      [  492.630413]   [<ffffffff813a7cd3>] ret_from_intr+0x0/0x1a
      [  492.636437]   [<ffffffff81001dc1>] cpu_idle+0x5b/0x8d
      [  492.642073]   [<ffffffff81392709>] rest_init+0xad/0xb4
      [  492.647809]   [<ffffffff81a1cbbc>] start_kernel+0x366/0x371
      [  492.654030]   [<ffffffff81a1c2b1>] x86_64_start_reservations+0xb8/0xbc
      [  492.661311]   [<ffffffff81a1c3b6>] x86_64_start_kernel+0x101/0x110
      [  492.668204]
      [  492.668205] to a HARDIRQ-irq-unsafe lock:
      [  492.674324] (&(&se_tpg->session_lock)->rlock){+.....}
      [  492.679862] ... which became HARDIRQ-irq-unsafe at:
      [  492.685497] ...  [<ffffffff8106479a>] __lock_acquire+0x709/0x921
      [  492.692209]   [<ffffffff81064eff>] lock_acquire+0xe0/0x10d
      [  492.698330]   [<ffffffff813a75ed>] _raw_spin_lock_bh+0x31/0x40
      [  492.704836]   [<ffffffffa021c208>] core_tpg_del_initiator_node_acl+0x89/0x336 [target_core_mod]
      [  492.714546]   [<ffffffffa02fb075>] tcm_qla2xxx_drop_nodeacl+0x20/0x2d [tcm_qla2xxx]
      [  492.723087]   [<ffffffffa02108d9>] target_fabric_nacl_base_release+0x22/0x24 [target_core_mod]
      [  492.732698]   [<ffffffffa01661c8>] config_item_release+0x7d/0xa3 [configfs]
      [  492.740465]   [<ffffffff811d48fe>] kref_put+0x43/0x4d
      [  492.746101]   [<ffffffffa0166149>] config_item_put+0x19/0x1b [configfs]
      [  492.753481]   [<ffffffffa0164987>] configfs_rmdir+0x1eb/0x258 [configfs]
      [  492.760957]   [<ffffffff810ecc54>] vfs_rmdir+0x79/0xd0
      [  492.766690]   [<ffffffff810eec4a>] do_rmdir+0xc2/0x111
      [  492.772423]   [<ffffffff810eecd0>] sys_rmdir+0x11/0x13
      [  492.778156]   [<ffffffff813ae4d2>] system_call_fastpath+0x16/0x1b
      [  492.784953]
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      140854cb
    • M
      target: Fix typo in drivers/target · 5e58b029
      Masanari Iida 提交于
      Correct spelling "exeeds" to "exceeds" in iscsi/iscsi_target_nego.c
      Correct spelling "diabled" to "disabled" in target_core_configfs.c
      Signed-off-by: NMasanari Iida <standby24x7@gmail.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5e58b029
  3. 09 3月, 2012 1 次提交
  4. 26 2月, 2012 25 次提交