1. 14 12月, 2011 7 次提交
  2. 06 12月, 2011 11 次提交
  3. 04 11月, 2011 6 次提交
    • C
      target: use ->exectute_task for all CDB emulation · 5bda90c8
      Christoph Hellwig 提交于
      Instead of calling into transport_emulate_control_cdb from
      __transport_execute_tasks for some CDBs always set up ->exectute_tasks
      in the command sequence and use it uniformly.
      
      (nab: Add default passthrough break for SERVICE_ACTION_IN)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5bda90c8
    • 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
    • C
      target: split core_scsi3_emulate_pr · 617c0e06
      Christoph Hellwig 提交于
      Split core_scsi2_emulate_crh into one routine each for the
      PERSISTENT_RESERVE_IN and PERSISTENT_RESERVE_OUT side.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      617c0e06
    • C
      target: split core_scsi2_emulate_crh · eacac00c
      Christoph Hellwig 提交于
      Split core_scsi2_emulate_crh into one routine each for the reserve and
      release side.  The common code now is in a helper called by both
      routines.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      eacac00c
    • 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
  4. 03 11月, 2011 1 次提交
  5. 02 11月, 2011 2 次提交
    • 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
    • N
      target: Make TFO->check_stop_free return free status · 88dd9e26
      Nicholas Bellinger 提交于
      This patch converts target_core_fabric_ops->check_stop_free() usage in
      transport_cmd_check_stop() and associated fabric module usage to
      return '1' when the passed se_cmd has been released directly within
      ->check_stop_free(), or return '0' when the passed se_cmd has not
      been released.
      
      This addresses an issue where transport_cmd_finish_abort() ->
      transport_cmd_check_stop_to_fabric() was leaking descriptors during
      LUN_RESET for modules using ->check_stop_free(), but not directly
      releasing se_cmd in all cases.
      
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@risingtidesystems.com>
      88dd9e26
  6. 01 11月, 2011 1 次提交
  7. 27 10月, 2011 1 次提交
    • N
      target: Check -ENOMEM to signal QUEUE_FULL from fabric callbacks · f147abb4
      Nicholas Bellinger 提交于
      This patch changes target core to also check for -ENOMEM from fabric callbacks
      to signal QUEUE_FULL status, instead of just -EAGAIN in order to catch a
      larger set of fabric failure cases that want to trigger QUEUE_FULL logic.
      This includes the callbacks for ->write_pending(), ->queue_data_in() and
      ->queue_status().
      
      It also makes transport_generic_write_pending() return zero upon QUEUE_FULL,
      and removes two unnecessary -EAGAIN checks to catch write pending QUEUE_FULL
      cases from transport_generic_new_cmd() failures in transport_handle_cdb_direct()
      and transport_processing_thread():TRANSPORT_NEW_CMD_MAP state.
      Reported-by: NBart Van Assche <bvanassche@acm.org>
      Cc: Bart Van Assche <bvanassche@acm.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      f147abb4
  8. 24 10月, 2011 11 次提交