1. 10 9月, 2013 2 次提交
    • N
      iscsi-target: Add login negotiation multi-plexing support · d381a801
      Nicholas Bellinger 提交于
      This patch adds support for login negotiation multi-plexing in
      iscsi-target code.
      
      This involves handling the first login request PDU + payload and
      login response PDU + payload within __iscsi_target_login_thread()
      process context, and then changing struct sock->sk_data_ready()
      so that all subsequent exchanges are handled by workqueue process
      context, to allow other incoming login requests to be received
      in parallel by __iscsi_target_login_thread().
      
      Upon login negotiation completion (or failure), ->sk_data_ready()
      is replaced with the original kernel sockets handler saved in
      iscsi_conn->orig_data_ready.
      
      v3 changes:
        - Convert iscsi_target_sk_data_ready() lock access to
          write[lock,unlock]_bh()
        - Only clear LOGIN_FLAGS_READ_ACTIVE when iscsi_target_do_login()
          returns zero
        - Add LOGIN_FLAGS_READY + LOGIN_FLAGS_CLOSED bit checks to
          iscsi_target_sk_data_ready()
        - Make INIT_DELAYED_WORK() + iscsi_target_set_sock_callbacks() setup
          happen earlier by moving from iscsi_target_start_negotiation() into
          iscsi_target_locate_portal()
        - Set LOGIN_FLAGS_READY bit in iscsi_target_start_negotiation()
          after iscsi_target_do_login() returns zero.
      
      v2 changes:
        - Add login_timer in iscsi_target_do_login_rx() to avoid
          possible endless sleep with MSG_WAITALL for traditional
          iscsi-target in certain network configurations.
        - Convert lprintk() -> pr_debug()
        - Remove forward declarations of iscsi_target_set_sock_callbacks(),
          iscsi_target_restore_sock_callbacks() and iscsi_target_sk_data_ready()
        - Make iscsi_target_set_sock_callbacks + iscsi_target_restore_sock_callbacks()
          static (Fengguang)
        - Make iscsi_target_do_login_rx() safe for iser-target w/o conn->sock
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d381a801
    • N
      iscsi-target: Prepare login code for multi-plexing support · a91eb7d9
      Nicholas Bellinger 提交于
      This patch prepares the iscsi-target login code for multi-plexing
      support.  This includes:
      
       - Adding iscsi_tpg_np->tpg_np_kref + iscsit_login_kref_put() for
         handling callback of iscsi_tpg_np->tpg_np_comp
       - Adding kref_put() in iscsit_deaccess_np()
       - Adding kref_put() and wait_for_completion() in
         iscsit_reset_np_thread()
       - Refactor login failure path release logic into
         iscsi_target_login_sess_out()
       - Update __iscsi_target_login_thread() to handle
         iscsi_post_login_handler() asynchronous completion
       - Add shutdown parameter for iscsit_clear_tpg_np_login_thread*()
      
      v3 changes:
       - Convert iscsi_portal_group->np_login_lock to ->np_login_sem
       - Add LOGIN_FLAGS definitions
      
      v2 changes:
       - Remove duplicate call to iscsi_post_login_handler() in
         __iscsi_target_login_thread()
       - Drop unused iscsi_np->np_login_tpg
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      a91eb7d9
  2. 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