1. 02 11月, 2011 2 次提交
    • N
      iscsi-target: Fix non-immediate TMR handling · 5a4c8666
      Nicholas Bellinger 提交于
      This patch addresses two issues with non immediate TMR handling in
      iscsit_handle_task_mgt_cmd().  The first involves breakage due to
      v3.1-rc conversion of iscsit_sequence_cmd(), which upon good status
      would hit the iscsit_add_reject_from_cmd() block of code.  This patch
      adds an explict check for CMDSN_ERROR_CANNOT_RECOVER.
      
      The second adds a check to return when non immediate TMR operation is
      detected after iscsit_ack_from_expstatsn(), as iscsit_sequence_cmd()
      -> iscsit_execute_cmd() will have called transport_generic_handle_tmr()
      for the non immediate TMR case already.
      
      Cc: Andy Grover <agrover@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5a4c8666
    • N
      iscsi-target: Add missing CMDSN_LOWER_THAN_EXP check in iscsit_handle_scsi_cmd · 7e32da55
      Nicholas Bellinger 提交于
      This patch adds a missing CMDSN_LOWER_THAN_EXP return check for
      iscsit_sequence_cmd() in iscsit_handle_scsi_cmd() that was incorrectly
      dropped during the v3.1-rc cleanups to use iscsit_sequence_cmd().
      
      Cc: Andy Grover <agrover@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      7e32da55
  2. 24 10月, 2011 5 次提交
    • C
      target: Cleanup unused target_core_base.h bits · c0427f15
      Christoph Hellwig 提交于
      This is a squashed version of the following target_core_base.h
      cleanup patches:
      
          target: remove the unused SHUTDOWN_SIGS defintion
          target: remove unused se_mem leftovers
          target: remove the unused map_func_t typedef
          target: move TRANSPORT_IOV_DATA_BUFFER to the iscsi-specific code
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c0427f15
    • N
      iscsi-target: Remove SCF_SE_LUN_CMD flag abuses · d270190a
      Nicholas Bellinger 提交于
      This patch removes a number of SCF_SE_LUN_CMD flag abuses within iscsi-target
      code to determine when iscsit_release_cmd() or transport_generic_free_cmd()
      should be called while releasing an individual iscsi_cmd descriptor.
      
      In the place of SCF_SE_LUN_CMD checks, this patch converts existing code to
      use a new iscsit_free_cmd() that inspects iscsi_cmd->iscsi_opcode types to
      determine which of the above functions should be invoked.  It also removes the
      now unnecessary special case checking in iscsit_release_commands_from_conn().
      
      (hch: Use iscsit_free_cmd instead of open-coded alternative)
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d270190a
    • N
      target: Convert ->transport_wait_for_tasks usage to transport_generic_free_cmd · d14921d6
      Nicholas Bellinger 提交于
      This patch converts se_cmd->transport_wait_for_tasks(se_cmd, 1) usage to use
      transport_generic_free_cmd() directly in target-core and iscsi-target fabric
      usage.  The includes:
      
      *) Removal of the optional transport_generic_free_cmd() call from within
         transport_generic_wait_for_tasks()
      *) Usage of existing SCF_SUPPORTED_SAM_OPCODE to determine when
         transport_generic_wait_for_tasks() processing may occur instead of
         checking se_cmd->transport_wait_for_tasks()
      *) Move transport_generic_wait_for_tasks() call ahead of core_dec_lacl_count()
         and transport_lun_remove_cmd() in transport_generic_free_cmd() to follow
         existing logic for iscsi-target w/ se_cmd->transport_wait_for_tasks(se_cmd, 1)
      *) Removal of se_cmd->transport_wait_for_tasks() function pointer
      *) Rename transport_generic_wait_for_tasks() -> transport_wait_for_tasks(), and
         add docbook comment.
      *) Add EXPORT_SYMBOL for transport_wait_for_tasks()
      
      For the case in iscsi_target_erl2.c:iscsit_prepare_cmds_for_realligance()
      where se_cmd->transport_wait_for_tasks(se_cmd, 0) is called, this patch
      adds a direct call to transport_wait_for_tasks().
      
      (hch: Fix transport_generic_free_cmd() usage in iscsit_release_commands_from_conn)
      (nab: Add patch: Ensure that TMRs hit wait_for_tasks logic during release)
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d14921d6
    • N
      target: Remove session_reinstatement parameter from ->transport_wait_for_tasks · 39c05f32
      Nicholas Bellinger 提交于
      This patch removes the unnecessary session_reinstatement parameter from
      se_cmd->transport_wait_for_tasks(), logic in transport_generic_wait_for_tasks,
      and usage within iscsi-target code.
      
      This also includes the removal of the 'bool' return from transport_put_cmd() +
      transport_generic_free_cmd() that is no longer necessary.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      39c05f32
    • C
      target: push session reinstatement out of transport_generic_free_cmd · 82f1c8a4
      Christoph Hellwig 提交于
      Push session reinstatement out of transport_generic_free_cmd into the only
      caller that actually needs it.  Clean up transport_generic_free_cmd a bit,
      and remove the useless comment.  I'd love to add a more useful kerneldoc
      comment for it, but as this point I'm still a bit confused in where it
      stands in the command release stack.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      82f1c8a4
  3. 23 8月, 2011 1 次提交
  4. 28 7月, 2011 3 次提交
  5. 26 7月, 2011 1 次提交
    • N
      iscsi-target: Add iSCSI fabric support for target v4.1 · e48354ce
      Nicholas Bellinger 提交于
      The Linux-iSCSI.org target module is a full featured in-kernel
      software implementation of iSCSI target mode (RFC-3720) for the
      current WIP mainline target v4.1 infrastructure code for the v3.1
      kernel.  More information can be found here:
      
      http://linux-iscsi.org/wiki/ISCSI
      
      This includes support for:
      
         * RFC-3720 defined request / response state machines and support for
           all defined iSCSI operation codes from Section 10.2.1.2 using libiscsi
           include/scsi/iscsi_proto.h PDU definitions
         * Target v4.1 compatible control plane using the generic layout in
           target_core_fabric_configfs.c and fabric dependent attributes
           within /sys/kernel/config/target/iscsi/ subdirectories.
         * Target v4.1 compatible iSCSI statistics based on RFC-4544 (iSCSI MIBS)
         * Support for IPv6 and IPv4 network portals in M:N mapping to TPGs
         * iSCSI Error Recovery Hierarchy support
         * Per iSCSI connection RX/TX thread pair scheduling affinity
         * crc32c + crc32c_intel SSEv4 instruction offload support using libcrypto
         * CHAP Authentication support using libcrypto
         * Conversion to use internal SGl allocation with iscsit_alloc_buffs() ->
           transport_generic_map_mem_to_cmd()
      
      (nab: Fix iscsi_proto.h struct scsi_lun usage from linux-next in commit:
            iscsi: Use struct scsi_lun in iscsi structs instead of u8[8])
      (nab: Fix 32-bit compile warnings)
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NAndy Grover <agrover@redhat.com>
      Acked-by: NRoland Dreier <roland@kernel.org>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      e48354ce