1. 27 5月, 2011 5 次提交
    • N
      [SCSI] target: Convert REPORT_LUNs to use int_to_scsilun · 1078da16
      Nicholas Bellinger 提交于
      This patch converts transport_core_report_lun_response() to use
      drivers/scsi/scsi_scan.c:int_to_scsilun instead of using the
      struct target_core_fabric_ops->pack_lun() fabric provided API vector.
      
      It also removes the tfo->pack_lun check from target_fabric_tf_ops_check()
      and removes from struct target_core_fabric_ops->pack_lun() from
      target_core_fabric_ops.h, and the following mainline scsi-misc fabric
      modules:
      
      *) tcm_loop: Drop tcm_loop_pack_lun() usage
      *) tcm_fc: Drop ft_pack_lun() usage
      Reported-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      1078da16
    • N
      [SCSI] target: Fix task->task_execute_queue=1 clear bug + LUN_RESET OOPs · ccf4d680
      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>
      ccf4d680
    • N
      [SCSI] target: Fix bug with task_sg chained transport_free_dev_tasks release · 42c6951e
      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>
      42c6951e
    • N
      [SCSI] target: Fix interrupt context bug with stats_lock and core_tmr_alloc_req · 1e7de68c
      Nicholas Bellinger 提交于
      This patch fixes two bugs wrt to the interrupt context usage of target
      core with HW target mode drivers.  It first converts the usage of struct
      se_device->stats_lock in transport_get_lun_for_cmd() and core_tmr_lun_reset()
      to properly use spin_lock_irq() to address an BUG with CONFIG_LOCKDEP_SUPPORT=y
      enabled.
      
      This patch also adds a 'in_interrupt()' check to allow GFP_ATOMIC usage from
      core_tmr_alloc_req() to fix a 'sleeping in interrupt context' BUG with HW
      target fabrics that require this logic to function.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      1e7de68c
    • N
      [SCSI] target: Fix multi task->task_sg[] chaining logic bug · 4a8fcc2c
      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>
      4a8fcc2c
  2. 20 5月, 2011 1 次提交
  3. 17 5月, 2011 34 次提交