1. 20 11月, 2013 2 次提交
  2. 14 11月, 2013 3 次提交
  3. 13 11月, 2013 3 次提交
  4. 09 11月, 2013 1 次提交
  5. 08 11月, 2013 3 次提交
    • N
      target: Drop left-over se_lun->lun_cmd_list shutdown code · 4a9a6c8d
      Nicholas Bellinger 提交于
      Now with percpu refcounting for se_lun in place, go ahead and drop
      the legacy per se_cmd accounting for se_lun shutdown.
      
      This includes __transport_clear_lun_from_sessions(), the associated
      transport_lun_wait_for_tasks() logic, along with a handful of now
      unused se_cmd structure members and ->transport_state bits.
      
      Cc: Kent Overstreet <kmo@daterainc.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      4a9a6c8d
    • N
      target: Add percpu refcounting for se_lun access · 5277797d
      Nicholas Bellinger 提交于
      This patch adds percpu refcounting for se_lun access that allows the
      association of an se_lun + se_cmd in transport_lookup_cmd_lun() to
      occur without an extra list_head for tracking outstanding I/O during
      se_lun shutdown.
      
      This effectively changes se_lun shutdown logic to wait for outstanding
      I/O percpu references to complete in transport_lun_remove_cmd() using
      se_lun->lun_ref_comp, instead of explicitly draining the per se_lun
      command list and waiting for individual se_cmd descriptor processing
      to complete.
      
      Cc: Kent Overstreet <kmo@daterainc.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5277797d
    • N
      iscsi-target: Do not generate REJECTs for zero-length DataOUT · dbcbc95c
      Nicholas Bellinger 提交于
      This patch changes iscsit_check_dataout_hdr() to no longer generate
      REJECTs for zero-length DataOUTs, and instead simply ignore these
      requests.
      
      This follows RFC-3720, Section 10.7.7.  DataSegmentLength
      
        "This is the data payload length of a SCSI Data-In or SCSI Data-Out PDU.
         The sending of 0 length data segments should be avoided, but initiators
         and targets MUST be able to properly receive 0 length data segments."
      Reported-by: NSantosh Kulkarni <santosh.kulkarni@calsoftinc.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      dbcbc95c
  6. 24 10月, 2013 3 次提交
  7. 17 10月, 2013 8 次提交
  8. 02 10月, 2013 1 次提交
    • N
      tcm_fc: Convert to per-cpu command map pre-allocation of ft_cmd · 5f544cfa
      Nicholas Bellinger 提交于
      This patch converts tcm_fc to use transport_init_session_tags()
      pre-allocation logic for struct ft_cmd descriptors using per-cpu
      session tag pooling in order to effectively avoid memory allocation
      + release for each received I/O.
      
      It adds percpu_ida_alloc() in ft_recv_cmd() to obtain an tag and
      locate ft_cmd from se_sess->sess_cmd_map[], and percpu_ida_free()
      in ft_free_cmd() to release the tag based upon se_cmd->map_tag id.
      
      It also uses a TCM_FC_DEFAULT_TAGS value of 512, that puts the
      per se_sess->sess_cmd_map allocation at ~360K on 64-bit.
      
      v2 changes:
      
        - Handle possible tag < 0 failure with GFP_ATOMIC
      
      Cc: Mark Rustad <mark.d.rustad@intel.com>
      Cc: Robert Love <robert.w.love@intel.com>
      Cc: Kent Overstreet <kmo@daterainc.com>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      5f544cfa
  9. 11 9月, 2013 16 次提交
    • N
      target/iscsi: Bump versions to v4.1.0 · 2999ee7f
      Nicholas Bellinger 提交于
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2999ee7f
    • N
      target: Update copyright ownership/year information to 2013 · 4c76251e
      Nicholas Bellinger 提交于
      Update copyright ownership/year information for target-core,
      loopback, iscsi-target, tcm_qla2xx, vhost and iser-target.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      4c76251e
    • N
      iscsi-target: Bump default TCP listen backlog to 256 · 837f6452
      Nicholas Bellinger 提交于
      This patch bumps the default TCP listen backlog within iscsit_setup_np()
      from 5 to 256, in order to reduce the overall latency caused by a small
      backlog with 100's of simultaneous login attempts directed to the same
      single network portal.
      
      Also add a ISCSIT_TCP_BACKLOG macro in iscsi_target_core.h.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      837f6452
    • G
      target: Fix >= v3.9+ regression in PR APTPL + ALUA metadata write-out · f730f915
      Gera Kazakov 提交于
      This patch fixes a >= v3.9+ regression in __core_scsi3_write_aptpl_to_file()
      + core_alua_write_tpg_metadata() write-out, where a return value of -EIO was
      incorrectly being returned upon success.
      
      This bug was originally introduced in:
      
      commit 0e9b10a9
      Author: Al Viro <viro@zeniv.linux.org.uk>
      Date:   Sat Feb 23 15:22:43 2013 -0500
      
          target: writev() on single-element vector is pointless
      
      However, given that the return of core_scsi3_update_and_write_aptpl()
      was not used to determine if a command should be returned with non GOOD
      status, this bug was not being triggered in PR logic until v3.11-rc1 by
      commit:
      
      commit 459f213b
      Author: Andy Grover <agrover@redhat.com>
      Date:   Thu May 16 10:41:02 2013 -0700
      
          target: Allocate aptpl_buf inside update_and_write_aptpl()
      
      So, go ahead and only return -EIO if kernel_write() returned a
      negative value.
      Reported-by: NGera Kazakov <gkazakov@msn.com>
      Signed-off-by: NGera Kazakov <gkazakov@msn.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: stable@vger.kernel.org # 3.9+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f730f915
    • N
      iscsi-target; Bump default CmdSN Depth to 64 · 38f7d6ed
      Nicholas Bellinger 提交于
      This patch bumps the default TA_DEFAULT_CMDSN_DEPTH from 16 -> 64,
      which is closer to a sane default for larger pipes @ 10 Gb/sec
      with traditional iSCSI, or @ 40/56 Gb/sec Ethernet/Infiniband with
      iSCSI Extentions for RDMA.
      
      There is really no downside to increasing this default value for
      1 Gb/sec.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      38f7d6ed
    • N
      iscsi-target: Remove unnecessary wait_for_completion in iscsi_get_thread_set · 12e4101a
      Nicholas Bellinger 提交于
      This patch removes an unnecessary wait_for_completion within
      iscsi_get_thread_set(), that would wait for 1 second before
      trying to obtain an inactive struct iscsi_thread_set from
      iscsi_get_ts_from_inactive_list().
      
      Since iscsi_allocate_thread_sets() will already be adding the
      newly allocated iscsi_thread_set to the inactive list directly,
      there is no need to wait here.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      12e4101a
    • N
      iscsi-target: Add thread_set->ts_activate_sem + use common deallocate · 5ab41ca4
      Nicholas Bellinger 提交于
      This patch removes the iscsi_thread_set->[rx,tx]_post_start_comp that
      was originally used synchronize startup between rx and tx threads within
      a single thread_set.
      
      Instead, use a single ->ts_activate_sem in iscsi_activate_thread_set()
      to wait for both processes to awake in the RX/TX pre handlers.
      
      Also, go ahead and refactor thread_set deallocate code into a common
      iscsi_deallocate_thread_one(), and update iscsi_deallocate_thread_sets()
      and iscsi_deallocate_extra_thread_sets() use this code
      
      v3 changes:
        - Make iscsi_deallocate_thread_one defined as static (Fengguang)
      
      v2 changes:
        - Set ISCSI_THREAD_SET_ACTIVE before calling complete in
          iscsi_activate_thread_set
        - Protect ts->conn sanity checks with ->ts_state_lock in
          RX/TX pre handlers
        - Add ->ts_activate_sem to save extra context switches per
          iscsi_activate_thread_set() call.
        - Refactor thread_set shutdown into iscsi_deallocate_thread_one()
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5ab41ca4
    • N
      iscsi-target: Fix race with thread_pre_handler flush_signals + ISCSI_THREAD_SET_DIE · d5705c4a
      Nicholas Bellinger 提交于
      This patch addresses an long standing race in iscsi_[rx,tx]_thread_pre_handler()
      use of flush_signals(), and between iscsi_deallocate_extra_thread_sets() setting
      ISCSI_THREAD_SET_DIE before calling kthread_stop().
      
      It addresses the issue by both holding ts_state_lock before calling send_sig()
      in iscsi_deallocate_extra_thread_sets(), as well as only calling flush_signals()
      when ts->status != ISCSI_THREAD_SET_DIE within iscsi_[rx,tx]_thread_pre_handler()
      code.
      
      v2 changes:
        - Add explicit complete(&ts->[rx,tx]_start_comp); before kthread_stop() in
          iscsi_deallocate_extra_thread_sets()
        - Drop left-over send_sig() calls in iscsi_deallocate_extra_thread_sets()
        - Add kthread_should_stop() check in iscsi_signal_thread_pre_handler()
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d5705c4a
    • W
      target: remove unused including <linux/version.h> · 0105c257
      Wei Yongjun 提交于
      Remove including <linux/version.h> that don't need it.
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      0105c257
    • N
      target: Enable global EXTENDED_COPY setup/release · f99715ac
      Nicholas Bellinger 提交于
      Add calls to target_xcopy_setup_pt() + target_xcopy_release_pt() to
      target_core_init_configfs() and target_core_exit_configfs()
      respectively.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Cc: Chris Mason <chris.mason@fusionio.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Zach Brown <zab@redhat.com>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      f99715ac
    • N
      target: Add Third Party Copy (3PC) bit in INQUIRY response · d397a445
      Nicholas Bellinger 提交于
      This patch adds the Third Party Copy (3PC) bit to signal support
      for EXTENDED_COPY within standard inquiry response data.
      
      Also add emulate_3pc device attribute in configfs (enabled by default)
      to allow the exposure of this bit to be disabled, if necessary.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Cc: Chris Mason <chris.mason@fusionio.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Zach Brown <zab@redhat.com>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      d397a445
    • N
      target: Enable EXTENDED_COPY setup in spc_parse_cdb · 04b1b795
      Nicholas Bellinger 提交于
      Setup up the se_cmd->execute_cmd() pointers for EXTENDED_COPY and
      RECEIVE_COPY_RESULTS handling within spc_parse_cdb()
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Cc: Chris Mason <chris.mason@fusionio.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Zach Brown <zab@redhat.com>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      04b1b795
    • N
      target: Add support for EXTENDED_COPY copy offload emulation · cbf031f4
      Nicholas Bellinger 提交于
      This patch adds support for EXTENDED_COPY emulation from SPC-3, that
      enables full copy offload target support within both a single virtual
      backend device, and across multiple virtual backend devices.  It also
      functions independent of target fabric, and supports copy offload
      across multiple target fabric ports.
      
      This implemenation supports both EXTENDED_COPY PUSH and PULL models
      of operation, so the actual CDB may be received on either source or
      desination logical unit.
      
      For Target Descriptors, it currently supports the NAA IEEE Registered
      Extended designator (type 0xe4), which allows the reference of target
      ports to occur independent of fabric type using EVPD 0x83 WWNs.
      
      For Segment Descriptors, it currently supports copy from block to
      block (0x02) mode.
      
      It also honors any present SCSI reservations of the destination target
      port.  Note that only Supports No List Identifier (SNLID=1) mode is
      supported.
      
      Also included is basic RECEIVE_COPY_RESULTS with service action type
      OPERATING PARAMETERS (0x03) required for SNLID=1 operation.
      
      v3 changes:
        - Fix incorrect return type in target_do_receive_copy_results()
          (Fengguang)
      
      v2 changes:
        - Use target_alloc_sgl() instead of transport_generic_get_mem()
        - Convert debug output to use pr_debug()
        - Convert target_xcopy_parse_target_descriptors() NAA IEEN WWN
          dump to use 0x%16phN format specification
        - Drop unnecessary xcopy_pt_cmd->xpt_passthrough_wsem, and
          associated usage in xcopy_pt_write_pending() and
          target_xcopy_issue_pt_cmd()
        - Add check for unsupported EXTENDED_COPY(LID4) service action
          bits in target_do_xcopy()
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Cc: Chris Mason <chris.mason@fusionio.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Zach Brown <zab@redhat.com>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      cbf031f4
    • N
      target: Avoid non-existent tg_pt_gp_mem in target_alua_state_check · 89c12cc9
      Nicholas Bellinger 提交于
      This patch adds an check for a non-existent port->sep_alua_tg_pt_gp_mem
      within target_alua_state_check(), which is not present for internally
      dispatched EXTENDED_COPY WRITE I/O to the destination target port.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Cc: Chris Mason <chris.mason@fusionio.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Zach Brown <zab@redhat.com>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      89c12cc9
    • N
      target: Add global device list for EXTENDED_COPY · d9ea32bf
      Nicholas Bellinger 提交于
      EXTENDED_COPY needs to be able to search a global list of devices
      based on NAA WWN device identifiers, so add a simple g_device_list
      protected by g_device_mutex.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Cc: Chris Mason <chris.mason@fusionio.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Zach Brown <zab@redhat.com>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      d9ea32bf
    • N
      target: Make helpers non static for EXTENDED_COPY command setup · c5ff8d6b
      Nicholas Bellinger 提交于
      Both target_alloc_sgl() and transport_generic_map_mem_to_cmd() are
      required by EXTENDED_COPY logic when setting up internally dispatched
      command descriptors, so go ahead and make both of these non static.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Cc: Chris Mason <chris.mason@fusionio.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Zach Brown <zab@redhat.com>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      c5ff8d6b