1. 25 5月, 2011 4 次提交
    • N
      [SCSI] target: Convert TASK_ATTR to scsi_tcq.h definitions · e66ecd50
      Nicholas Bellinger 提交于
      This patch converts target core and follwing scsi-misc upstream fabric
      modules to use include/scsi/scsi_tcq.h includes for SIMPLE, HEAD_OF_QUEUE
      and ORDERED SCSI tasks instead of scsi/libsas.h with TASK_ATTR*
      
      *) tcm_loop: Convert tcm_loop_allocate_core_cmd() + tcm_loop_device_reset() to
         scsi_tcq.h
      *) tcm_fc: Convert ft_send_cmd() from FCP_PTA_* to scsi_tcq.h
      Reported-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      e66ecd50
    • N
      [SCSI] target: Fix task->task_execute_queue=1 clear bug + LUN_RESET OOPs · af57c3ac
      Nicholas Bellinger 提交于
      This patch fixes a bug where task->task_execute_queue=1 was not being
      cleared once se_task had been removed from se_device->execute_task_list,
      resulting in an OOPs in core_tmr_lun_reset() for the task->task_active=0
      case where transport_remove_task_from_execute_queue() was incorrectly
      being called.
      
      This patch fixes two cases in transport_get_task_from_execute_queue()
      and transport_remove_task_from_execute_queue() to properly clear
      task->task_execute_queue=0 once list_del(&task->t_execute_list) has
      been called.
      
      It also adds an explict check in transport_remove_task_from_execute_queue()
      to dump_stack + return if called with task->task_execute_queue=0.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      af57c3ac
    • N
      [SCSI] target: Fix bug with task_sg chained transport_free_dev_tasks release · f4366772
      Nicholas Bellinger 提交于
      This patch addresses a bug in the target core release path for HW
      operation where transport_free_dev_tasks() was incorrectly being called
      from transport_lun_remove_cmd() while releasing a se_cmd reference and
      calling struct target_core_fabric_ops->queue_data_in().
      
      This would result in a OOPs with HW target mode when the release of
      se_task->task_sg[] would happen before pci_unmap_sg() can be called in
      HW target mode fabric module code.  This patch addresses the issue by
      moving transport_free_dev_tasks() from transport_lun_remove_cmd() into
      transport_generic_free_cmd(), and adding TRANSPORT_FREE_CMD_INTR and
      transport_generic_free_cmd_intr() to allow se_cmd descriptor release
      to happen fromfrom within transport_processing_thread() process context
      when release of se_cmd is not possible from HW interrupt context.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      f4366772
    • N
      [SCSI] target: Fix multi task->task_sg[] chaining logic bug · 97868c89
      Nicholas Bellinger 提交于
      This patch fixes a bug in transport_do_task_sg_chain() used by HW target
      mode modules with sg_chain() to provide a single sg_next() walkable memory
      layout for use with pci_map_sg() and friends.  This patch addresses an
      issue with mapping multiple small block max_sector tasks across multiple
      struct se_task->task_sg[] mappings for HW target mode operation.
      
      This was causing OOPs with (cmd->t_task->t_tasks_no > 1) I/O traffic for
      HW target drivers using transport_do_task_sg_chain(), and has been tested
      so far with tcm_fc(openfcoe), tcm_qla2xxx, and ib_srpt fabrics with
      t_tasks_no > 1 IBLOCK backends using a smaller max_sectors to trigger the
      original issue.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Acked-by: NKiran Patil <kiran.patil@intel.com>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      97868c89
  2. 10 4月, 2011 1 次提交
  3. 31 3月, 2011 1 次提交
  4. 24 3月, 2011 4 次提交
  5. 02 3月, 2011 1 次提交
  6. 01 3月, 2011 1 次提交
    • N
      [SCSI] target: Fix t_transport_aborted handling in LUN_RESET + active I/O shutdown · 52208ae3
      Nicholas Bellinger 提交于
      This patch addresses two outstanding bugs related to
      T_TASK(cmd)->t_transport_aborted handling during TMR LUN_RESET and
      active I/O shutdown.
      
      This first involves adding two explict t_transport_aborted=1
      assignments in core_tmr_lun_reset() in order to signal the task has
      been aborted, and updating transport_generic_wait_for_tasks() to skip
      sleeping when t_transport_aborted=1 has been set.  This fixes an issue
      where transport_generic_wait_for_tasks() would end up sleeping
      indefinately when called from fabric module context while TMR
      LUN_RESET was happening with long outstanding backend struct se_task
      not yet being completed.
      
      The second adds a missing call to
      transport_remove_task_from_execute_queue() when
      task->task_execute_queue=1 is set in order to fix an OOPs when
      task->t_execute_list has not been dropped.  It also fixes the same
      case in transport_processing_shutdown() to prevent the issue from
      happening during active I/O struct se_device shutdown.
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      52208ae3
  7. 13 2月, 2011 2 次提交
  8. 15 1月, 2011 1 次提交
    • N
      [SCSI] target: Add LIO target core v4.0.0-rc6 · c66ac9db
      Nicholas Bellinger 提交于
      LIO target is a full featured in-kernel target framework with the
      following feature set:
      
      High-performance, non-blocking, multithreaded architecture with SIMD
      support.
      
      Advanced SCSI feature set:
      
          * Persistent Reservations (PRs)
          * Asymmetric Logical Unit Assignment (ALUA)
          * Protocol and intra-nexus multiplexing, load-balancing and failover (MC/S)
          * Full Error Recovery (ERL=0,1,2)
          * Active/active task migration and session continuation (ERL=2)
          * Thin LUN provisioning (UNMAP and WRITE_SAMExx)
      
      Multiprotocol target plugins
      
      Storage media independence:
      
          * Virtualization of all storage media; transparent mapping of IO to LUNs
          * No hard limits on number of LUNs per Target; maximum LUN size ~750 TB
          * Backstores: SATA, SAS, SCSI, BluRay, DVD, FLASH, USB, ramdisk, etc.
      
      Standards compliance:
      
          * Full compliance with IETF (RFC 3720)
          * Full implementation of SPC-4 PRs and ALUA
      
      Significant code cleanups done by Christoph Hellwig.
      
      [jejb: fix up for new block bdev exclusive interface. Minor fixes from
       Randy Dunlap and Dan Carpenter.]
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      c66ac9db