1. 16 3月, 2012 2 次提交
  2. 11 3月, 2012 5 次提交
    • 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
      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
  3. 26 2月, 2012 8 次提交
  4. 18 1月, 2012 1 次提交
  5. 16 12月, 2011 1 次提交
    • R
      target: Set additional sense length field in sense data · 895f3022
      Roland Dreier 提交于
      The target code was not setting the additional sense length field in the
      sense data it returned, which meant that at least the Linux stack
      ignored the ASC/ASCQ fields.  For example, without this patch, on a
      tcm_loop device:
      
          # sg_raw -v /dev/sda 2 0 0 0 0 0
      
      gives
      
              cdb to send: 02 00 00 00 00 00
          SCSI Status: Check Condition
      
          Sense Information:
           Fixed format, current;  Sense key: Illegal Request
            Raw sense data (in hex):
                  70 00 05 00 00 00 00 00
      
      while after the patch we correctly get the following (which matches what
      a regular disk returns):
      
              cdb to send: 02 00 00 00 00 00
          SCSI Status: Check Condition
      
          Sense Information:
           Fixed format, current;  Sense key: Illegal Request
           Additional sense: Invalid command operation code
           Raw sense data (in hex):
                  70 00 05 00 00 00 00 0a  00 00 00 00 20 00 00 00
                  00 00
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      895f3022
  6. 14 12月, 2011 9 次提交
  7. 06 12月, 2011 9 次提交
  8. 04 11月, 2011 3 次提交
    • C
      target: remove SCF_EMULATE_CDB_ASYNC · d29a5b6a
      Christoph Hellwig 提交于
      All ->execute_task instances now need to complete the I/O explicitly,
      which can either happen synchronously or asynchronously.
      
      Note that a lot of the CDB emulations appear to return success even if
      some lowlevel operations failed.  Given that this is an existing issue
      this patch doesn't change that fact.
      
      (nab: Adding missing switch breaks in PR-IN + PR_OUT)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d29a5b6a
    • C
      target: pass the se_task to the CDB emulation callback · e76a35d6
      Christoph Hellwig 提交于
      We want to be able to handle all CDBs through it and remove hacks like
      always using the first task in a CDB in target_report_luns.
      
      Also rename the callback to ->execute_task to better describe its use.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      e76a35d6
    • N
      target: Add generic active I/O shutdown logic · a17f091d
      Nicholas Bellinger 提交于
      This patch adds the initial pieces of generic active I/O shutdown logic.
      This is intended to be a 'opt-in' feature for fabric modules that
      includes the following functions to provide a mechinism for fabric
      modules to track se_cmd via se_session->sess_cmd_list:
      
      *) target_get_sess_cmd() - Add se_cmd to sess->sess_cmd_list, called
         from fabric module incoming I/O path.
      *) target_put_sess_cmd() - Check for completion or drop se_cmd from
         ->sess_cmd_list
      *) target_splice_sess_cmd_list() - Splice active I/O list from
         ->sess_cmd_list to ->sess_wait_list, can called with HW fabric
         lock held.
      *) target_wait_for_sess_cmds() - Walk ->sess_wait_list waiting on
         individual ->cmd_wait_comp.  Optional transport_wait_for_tasks()
         call.
      
      target_splice_sess_cmd_list() is allowed to be called under HW fabric
      lock, and performs the splice into se_sess->sess_wait_list and set
      se_cmd->cmd_wait_set.  Then target_wait_for_sess_cmds() walks the list
      waiting for individual target_put_sess_cmd() fabric callbacks to
      complete.
      
      It also adds TFO->check_release_cmd() to split the completion and memory
      release calls, where a fabric module uses target_put_sess_cmd() to check
      for I/O completion during session shutdown.  This is currently pushed out
      into fabric modules as current fabric code may sleep here waiting for
      TFO->check_stop_free() to complete in main response path, and because
      target_wait_for_sess_cmds() calling TFO->release_cmd() to free fabric
      descriptor memory directly.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      a17f091d
  9. 02 11月, 2011 1 次提交
    • N
      target: Remove core TRANSPORT_FREE_CMD_INTR usage · 3151d069
      Nicholas Bellinger 提交于
      This patch drops TRANSPORT_FREE_CMD_INTR usage from target core, which
      includes the removal of transport_generic_free_cmd_intr() symbol,
      TRANSPORT_FREE_CMD_INTR usage in transport_processing_thread(), and
      special case LUN_RESET handling to skip TRANSPORT_FREE_CMD_INTR processing
      in core_tmr_drain_cmd_list().  We now expect that fabric modules will
      use an internal workqueue to provide process context when releasing
      se_cmd descriptor resources via transport_generic_free_cmd().
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Madhuranath Iyengar <mni@risingtidesystems.com>
      Signed-off-by: NNicholas Bellinger <nab@risingtidesystems.com>
      3151d069
  10. 24 10月, 2011 1 次提交
    • N
      target: Remove legacy se_task->task_timer and associated logic · 2e982ab9
      Nicholas Bellinger 提交于
      This patch removes the legacy usage of se_task->task_timer and associated
      infrastructure that originally was used as a way to help manage buggy backend
      SCSI LLDs that in certain cases would never return back an outstanding task.
      
      This includes the removal of target_complete_timeout_work(), timeout logic
      from transport_complete_task(), transport_task_timeout_handler(),
      transport_start_task_timer(), the per device task_timeout configfs attribute,
      and all task_timeout associated structure members and defines in
      target_core_base.h
      
      This is being removed in preparation to make transport_complete_task() run
      in lock-less mode.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2e982ab9