1. 30 Mar, 2016 2 commits
  2. 06 Mar, 2016 1 commit
  3. 20 Jan, 2016 2 commits
    • Nicholas Bellinger's avatar
      target: Convert ACL change queue_depth se_session reference usage · d36ad77f
      Nicholas Bellinger authored
      This patch converts core_tpg_set_initiator_node_queue_depth()
      to use struct se_node_acl->acl_sess_list when performing
      explicit se_tpg_tfo->shutdown_session() for active sessions,
      in order for new se_node_acl->queue_depth to take effect.
      This follows how core_tpg_del_initiator_node_acl() currently
      works when invoking se_tpg_tfo->shutdown-session(), and ahead
      of the next patch to take se_node_acl->acl_kref during lookup,
      the extra get_initiator_node_acl() can go away. In order to
      achieve this, go ahead and change target_get_session() to use
      kref_get_unless_zero() and propigate up the return value
      to know when a session is already being released.
      This is because se_node_acl->acl_group is already protecting
      se_node_acl->acl_group reference via configfs, and shutdown
      within core_tpg_del_initiator_node_acl() won't occur until
      sys_write() to core_tpg_set_initiator_node_queue_depth()
      attribute returns back to user-space.
      Also, drop the left-over iscsi-target hack, and obtain
      se_portal_group->session_lock in lio_tpg_shutdown_session()
      internally. Remove iscsi-target wrapper and unused se_tpg +
      force parameters and associated code.
      Reported-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Nicholas Bellinger's avatar
      iscsi-target: Fix potential dead-lock during node acl delete · 26a99c19
      Nicholas Bellinger authored
      This patch is a iscsi-target specific bug-fix for a dead-lock
      that can occur during explicit struct se_node_acl->acl_group
      se_session deletion via configfs rmdir(2), when iscsi-target
      time2retain timer is still active.
      It changes iscsi-target to obtain se_portal_group->session_lock
      internally using spin_in_locked() to check for the specific
      se_node_acl configfs shutdown rmdir(2) case.
      Note this patch is intended for stable, and the subsequent
      v4.5-rc patch converts target_core_tpg.c to use proper
      se_sess->sess_kref reference counting for both se_node_acl
      deletion + se_node_acl->queue_depth se_session restart.
      Reported-by: default avatar: Sagi Grimberg <sagig@mellanox.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: stable@vger.kernel.org # 3.10+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
  4. 13 Oct, 2015 1 commit
  5. 27 Aug, 2015 4 commits
  6. 03 Aug, 2015 1 commit
  7. 02 Aug, 2015 1 commit
  8. 16 Jun, 2015 1 commit
    • Nicholas Bellinger's avatar
      target: Drop unnecessary core_tpg_register TFO parameter · bc0c94b1
      Nicholas Bellinger authored
      This patch drops unnecessary target_core_fabric_ops parameter usage
      for core_tpg_register() during fabric driver TFO->fabric_make_tpg()
      se_portal_group creation callback execution.
      Instead, use the existing se_wwn->wwn_tf->tf_ops pointer to ensure
      fabric driver is really using the same TFO provided at module_init
      Also go ahead and drop the forward TFO declarations tree-wide, and
      handling the special case for iscsi-target discovery TPG.
      Cc: Christoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
  9. 30 May, 2015 9 commits
  10. 14 Apr, 2015 1 commit
    • Christoph Hellwig's avatar
      target: simplify the target template registration API · 9ac8928e
      Christoph Hellwig authored
      Instead of calling target_fabric_configfs_init() +
      target_fabric_configfs_register() / target_fabric_configfs_deregister()
      target_fabric_configfs_free() from every target driver, rewrite the API
      so that we have simple register/unregister functions that operate on
      a const operations vector.
      This patch also fixes a memory leak in several target drivers. Several
      target drivers namely called target_fabric_configfs_deregister()
      without calling target_fabric_configfs_free().
      A large part of this patch is based on earlier changes from
      Bart Van Assche <bart.vanassche@sandisk.com>.
      (v2: Add a new TF_CIT_SETUP_DRV macro so that the core configfs code
      can declare attributes as either core only or for drivers)
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
  11. 08 Apr, 2015 1 commit
    • Nicholas Bellinger's avatar
      iscsi/iser-target: Add fabric_prot_type attribute support · 901c04a3
      Nicholas Bellinger authored
      This patch updates iscsi/iser-target to add a new fabric_prot_type
      TPG attribute for iser-target, used for controlling LLD level
      protection into LIO when the backend device does not support T10-PI.
      This is required for ib_isert to enable WRITE_STRIP + READ_INSERT
      hardware offloads.
      It's disabled by default and controls which se_sesion->sess_prot_type
      are set at iscsi_target_locate_portal() session registration time.
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
  12. 06 Mar, 2015 1 commit
  13. 30 Jan, 2015 1 commit
  14. 15 Jan, 2015 1 commit
  15. 17 Sep, 2014 1 commit
  16. 07 Apr, 2014 2 commits
    • Nicholas Bellinger's avatar
      target: Add TFO->abort_task for aborted task resources release · 131e6abc
      Nicholas Bellinger authored
      Now that TASK_ABORTED status is not generated for all cases by
      TMR ABORT_TASK + LUN_RESET, a new TFO->abort_task() caller is
      necessary in order to give fabric drivers a chance to unmap
      hardware / software resources before the se_cmd descriptor is
      released via the normal TFO->release_cmd() codepath.
      This patch adds TFO->aborted_task() in core_tmr_abort_task()
      in place of the original transport_send_task_abort(), and
      also updates all fabric drivers to implement this caller.
      The fabric drivers that include changes to perform cleanup
      via ->aborted_task() are:
        - iscsi-target
        - iser-target
        - srpt
        - tcm_qla2xxx
      The fabric drivers that currently set ->aborted_task() to
      NOPs are:
        - loopback
        - tcm_fc
        - usb-gadget
        - sbp-target
        - vhost-scsi
      For the latter five, there appears to be no additional cleanup
      required before invoking TFO->release_cmd() to release the
      se_cmd descriptor.
      v2 changes:
        - Move ->aborted_task() call into transport_cmd_finish_abort (Alex)
      Cc: Alex Leung <amleung21@yahoo.com>
      Cc: Mark Rustad <mark.d.rustad@intel.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Vu Pham <vu@mellanox.com>
      Cc: Chris Boot <bootc@bootc.net>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Sagi Grimberg's avatar
      Target/configfs: Expose iSCSI network portal group T10-PI support · 8085176f
      Sagi Grimberg authored
      User may enable T10-PI support per network portal group. any connection
      established on top of it, will be required to serve protected transactions.
      Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
  17. 11 Dec, 2013 1 commit
  18. 20 Nov, 2013 1 commit
  19. 12 Nov, 2013 1 commit
    • Nicholas Bellinger's avatar
      iscsi-target: Fix mutex_trylock usage in iscsit_increment_maxcmdsn · 5e8e6b4b
      Nicholas Bellinger authored
      This patch fixes a >= v3.10 regression bug with mutex_trylock() usage
      within iscsit_increment_maxcmdsn(), that was originally added to allow
      for a special case where ->cmdsn_mutex was already held from the
      iscsit_execute_cmd() exception path for ib_isert.
      When !mutex_trylock() was occuring under contention during normal RX/TX
      process context codepaths, the bug was manifesting itself as the following
      protocol error:
        Received CmdSN: 0x000fcbb7 is greater than MaxCmdSN: 0x000fcbb6, protocol error.
        Received CmdSN: 0x000fcbb8 is greater than MaxCmdSN: 0x000fcbb6, protocol error.
      This patch simply avoids the direct ib_isert callback in lio_queue_status()
      for the special iscsi_execute_cmd() exception cases, that allows the problematic
      mutex_trylock() usage in iscsit_increment_maxcmdsn() to go away.
      Reported-by: default avatarMoussa Ba <moussaba@micron.com>
      Tested-by: default avatarMoussa Ba <moussaba@micron.com>
      Cc: <stable@vger.kernel.org> # v3.10+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
  20. 23 Oct, 2013 1 commit
  21. 16 Oct, 2013 2 commits
  22. 10 Sep, 2013 1 commit
  23. 09 Sep, 2013 1 commit
    • Nicholas Bellinger's avatar
      iscsi/iser-target: Convert to command priv_size usage · d703ce2f
      Nicholas Bellinger authored
      This command converts iscsi/isert-target to use allocations based on
      iscsit_transport->priv_size within iscsit_allocate_cmd(), instead of
      using an embedded isert_cmd->iscsi_cmd.
      This includes removing iscsit_transport->alloc_cmd() usage, along
      with updating isert-target code to use iscsit_priv_cmd().
      Also, remove left-over iscsit_transport->release_cmd() usage for
      direct calls to iscsit_release_cmd(), and drop the now unused
      lio_cmd_cache and isert_cmd_cache.
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Kent Overstreet <kmo@daterainc.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@daterainc.com>
  24. 12 Aug, 2013 1 commit
  25. 07 Jul, 2013 1 commit