1. 14 11月, 2013 1 次提交
  2. 13 11月, 2013 1 次提交
  3. 09 11月, 2013 1 次提交
  4. 08 11月, 2013 2 次提交
    • 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
  5. 24 10月, 2013 1 次提交
  6. 17 10月, 2013 2 次提交
  7. 11 9月, 2013 7 次提交
    • N
      target/iscsi: Bump versions to v4.1.0 · 2999ee7f
      Nicholas Bellinger 提交于
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2999ee7f
    • 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: 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: 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
    • N
      target/tcm_qla2xxx: Add/use target_reverse_dma_direction() in target_core_fabric.h · b3faa2e8
      Nicholas Bellinger 提交于
      Reversing the dma_data_direction for pci_map_sg() friends is useful
      for other drivers, so move it from tcm_qla2xxx into inline code
      within target_core_fabric.h.
      
      Also drop internal usage of equivlient in tcm_qla2xxx fabric code.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Cc: Chad Dupuis <chad.dupuis@qlogic.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      b3faa2e8
    • N
      target: Add support for COMPARE_AND_WRITE emulation · 68ff9b9b
      Nicholas Bellinger 提交于
      This patch adds support for COMPARE_AND_WRITE emulation on a per block
      basis.  This logic is used as an atomic test and set primative currently
      used by VMWare ESX VAAI for performing array side locking of individual
      VMFS extent ownership.
      
      This includes the COMPARE_AND_WRITE CDB parsing within sbc_parse_cdb(),
      and does the majority of the work within the compare_and_write_callback()
      to perform the verify instance user data comparision, and subsequent
      write instance user data I/O submission upon a successfull comparision.
      
      The synchronization is enforced by se_device->caw_sem, that is obtained
      before the initial READ I/O submission in sbc_compare_and_write().  The
      mutex is then released upon MISCOMPARE in compare_and_write_callback(),
      or upon WRITE instance user-data completion in compare_and_write_post().
      
      The implementation currently assumes a single logical block (NoLB=1).
      
      v4 changes:
       - Explicitly clear cmd->transport_complete_callback for two failure
         cases in sbc_compare_and_write() in order to avoid double unlock
         of ->caw_sem in compare_and_write_callback() (Dan Carpenter)
      
      v3 changes:
       - Convert se_device->caw_mutex to ->caw_sem
      
      v2 changes:
       - Set SCF_COMPARE_AND_WRITE and cmd->execute_cmd() to
         sbc_compare_and_write() during setup in sbc_parse_cdb()
       - Use sbc_compare_and_write() for initial READ submission with
         DMA_FROM_DEVICE
       - Reset cmd->execute_cmd() to sbc_execute_rw() for write instance
         user-data in compare_and_write_callback()
       - Drop SCF_BIDI command flag usage
       - Set TRANSPORT_PROCESSING + transport_state flags before write
         instance submission, and convert to __target_execute_cmd()
       - Prevent sbc_get_size() from being being called twice to
         generate incorrect size in sbc_parse_cdb()
       - Enforce se_device->caw_mutex synchronization between initial
         READ I/O submission, and final WRITE I/O completion.
      
      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: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      68ff9b9b
  8. 10 9月, 2013 8 次提交
    • N
      target: Add MAXIMUM COMPARE AND WRITE LENGTH in Block Limits VPD · 0123a9ec
      Nicholas Bellinger 提交于
      This patch adds the MAXIMUM COMPARE AND WRITE LENGTH bit, currently
      hardcoded to a single logical block (NoLB=1) within the Block Limits
      VPD in spc_emulate_evpd_b0().
      
      Also add emulate_caw 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: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      0123a9ec
    • N
      target: Make __target_execute_cmd() available as extern · 76dde50e
      Nicholas Bellinger 提交于
      Required by COMPARE_AND_WRITE for write instance user-data
      submission, in order to bypass target_execute_cmd() checks.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      76dde50e
    • N
      target: Add transport_reset_sgl_orig() for COMPARE_AND_WRITE · 47e459e6
      Nicholas Bellinger 提交于
      After COMPARE_AND_WRITE completes it's comparision, the WRITE
      payload SGLs head expect to be updated to point from the verify
      instance of user data, to the write instance of user data.
      
      So for this special case, add transport_reset_sgl_orig() usage
      within transport_free_pages() and add se_cmd->t_data_[sg,nents]_orig
      members to save the original assignments.
      
      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: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      47e459e6
    • N
      target: Allow sbc_ops->execute_rw() to accept SGLs + data_direction · a82a9538
      Nicholas Bellinger 提交于
      COMPARE_AND_WRITE expects to be able to send down a DMA_FROM_DEVICE
      to obtain the necessary READ payload for comparision against the
      first half of the WRITE payload containing the verify user data.
      
      Currently virtual backends expect to internally reference SGLs,
      SGL nents, and data_direction, so change IBLOCK, FILEIO and RD
      sbc_ops->execute_rw() to accept this values as function parameters.
      
      Also add default sbc_execute_rw() handler for the typical case for
      cmd->execute_rw() submission using cmd->t_data_sg, cmd->t_data_nents,
      and cmd->data_direction).
      
      v2 Changes:
        - Add SCF_COMPARE_AND_WRITE command flag
        - Use sbc_execute_rw() for normal cmd->execute_rw() submission
          with expected se_cmd members.
      
      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: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      a82a9538
    • N
      target: Add TCM_MISCOMPARE_VERIFY sense handling · 818b571c
      Nicholas Bellinger 提交于
      This patch adds TCM_MISCOMPARE_VERIFY (ASC=0x1d, ASCQ=0x00) sense
      handling to transport_send_check_condition_and_sense(), which is
      required for a COMPARE_AND_WRITE comparision failure.
      
      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: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      818b571c
    • N
      target: Add return for se_cmd->transport_complete_callback · a6b0133c
      Nicholas Bellinger 提交于
      This patch adds a sense_reason_t return to ->transport_complete_callback(),
      and updates target_complete_ok_work() to invoke the call if necessary to
      transport_send_check_condition_and_sense() during the failure case.
      
      Also update xdreadwrite_callback() to use this return value.
      
      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: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      a6b0133c
    • N
      iscsi/iser-target: Convert to command priv_size usage · d703ce2f
      Nicholas Bellinger 提交于
      This command converts iscsi/isert-target to use allocations based on
      iscsit_transport->priv_size within iscsit_allocate_cmd(), instead of
      using an embedded isert_cmd->iscsi_cmd.
      
      This includes removing iscsit_transport->alloc_cmd() usage, along
      with updating isert-target code to use iscsit_priv_cmd().
      
      Also, remove left-over iscsit_transport->release_cmd() usage for
      direct calls to iscsit_release_cmd(), and drop the now unused
      lio_cmd_cache and isert_cmd_cache.
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Kent Overstreet <kmo@daterainc.com>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      d703ce2f
    • N
      target: Add transport_init_session_tags using per-cpu ida · c0add7fd
      Nicholas Bellinger 提交于
      This patch adds lib/idr.c based transport_init_session_tags() logic
      that allows fabric drivers to setup a per-cpu se_sess->sess_tag_pool
      and associated se_sess->sess_cmd_map for basic tagged pre-allocation
      of fabric descriptor sized memory.
      
      v5 changes:
        - Convert to percpu_ida.h include
      
      v4 changes:
        - Add transport_alloc_session_tags() for fabrics that need early
          transport_init_session()
      
      v3 changes:
        - Update to percpu-ida usage
      
      Cc: Kent Overstreet <kmo@daterainc.com>
      Cc: Asias He <asias@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NAsias He <asias@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c0add7fd
  9. 08 7月, 2013 3 次提交
    • J
      target: make queue_tm_rsp() return void · b79fafac
      Joern Engel 提交于
      The return value wasn't checked by any of the callers.  Assuming this is
      correct behaviour, we can simplify some code by not bothering to
      generate it.
      
      nab: Add srpt_queue_data_in() + srpt_queue_tm_rsp() nops around
           srpt_queue_response() void return
      Signed-off-by: NJoern Engel <joern@logfs.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      b79fafac
    • J
      target: remove unused codes from enum tcm_tmrsp_table · 11fee8a7
      Joern Engel 提交于
      Three have been checked for but were never set.  Remove the dead code.
      Also renumbers the remaining ones to a) get rid of the holes after the
      removal and b) avoid a collision between TMR_FUNCTION_COMPLETE==0 and
      the uninitialized case.  If we failed to set a code, we should rather
      fall into the default case then return success.
      Signed-off-by: NJoern Engel <joern@logfs.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      11fee8a7
    • N
      iser-target: Fix session reset bug with RDMA_CM_EVENT_DISCONNECTED · b2cb9649
      Nicholas Bellinger 提交于
      This patch addresses a bug where RDMA_CM_EVENT_DISCONNECTED may occur
      before the connection shutdown has been completed by rx/tx threads,
      that causes isert_free_conn() to wait indefinately on ->conn_wait.
      
      This patch allows isert_disconnect_work code to invoke rdma_disconnect
      when isert_disconnect_work() process context is started by client
      session reset before isert_free_conn() code has been reached.
      
      It also adds isert_conn->conn_mutex protection for ->state within
      isert_disconnect_work(), isert_cq_comp_err() and isert_free_conn()
      code, along with isert_check_state() for wait_event usage.
      
      (v2: Add explicit iscsit_cause_connection_reinstatement call
           during isert_disconnect_work() to force conn reset)
      
      Cc: stable@vger.kernel.org  # 3.10+
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      b2cb9649
  10. 07 7月, 2013 2 次提交
    • N
      iscsi-target: Fix iscsit_sequence_cmd reject handling for iser · 561bf158
      Nicholas Bellinger 提交于
      This patch moves ISCSI_OP_REJECT failures into iscsit_sequence_cmd()
      in order to avoid external iscsit_reject_cmd() reject usage for all
      PDU types.
      
      It also updates PDU specific handlers for traditional iscsi-target
      code to not reset the session after posting a ISCSI_OP_REJECT during
      setup.
      
      (v2: Fix CMDSN_LOWER_THAN_EXP for ISCSI_OP_SCSI to call
           target_put_sess_cmd() after iscsit_sequence_cmd() failure)
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: stable@vger.kernel.org  # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      561bf158
    • N
      iscsi-target: Fix iscsit_add_reject* usage for iser · ba159914
      Nicholas Bellinger 提交于
      This patch changes iscsit_add_reject() + iscsit_add_reject_from_cmd()
      usage to not sleep on iscsi_cmd->reject_comp to address a free-after-use
      usage bug in v3.10 with iser-target code.
      
      It saves ->reject_reason for use within iscsit_build_reject() so the
      correct value for both transport cases.  It also drops the legacy
      fail_conn parameter usage throughput iscsi-target code and adds
      two iscsit_add_reject_cmd() and iscsit_reject_cmd helper functions,
      along with various small cleanups.
      
      (v2: Re-enable target_put_sess_cmd() to be called from
           iscsit_add_reject_from_cmd() for rejects invoked after
           target_get_sess_cmd() has been called)
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: stable@vger.kernel.org  # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ba159914
  11. 04 7月, 2013 1 次提交
  12. 26 6月, 2013 1 次提交
    • N
      iscsi-target: Refactor ISCSI_OP_TEXT_RSP TX handling · 889c8a68
      Nicholas Bellinger 提交于
      This patch refactoring existing iscsit_send_text_rsp() in order
      to handle iscsi_text_rsp payloads in a transport specific manner.
      
      This includes the addition of iscsit_build_text_rsp() to build
      the response payload and initialize ISCSI_OP_TEXT_RSP.
      
      v2: Make iscsit_build_text_rsp() determine extra padding bytes, and
          drop legacy padding calculation for traditional iSCSI text
          responses within iscsit_send_text_rsp()
      Reported-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      889c8a68
  13. 25 6月, 2013 2 次提交
    • N
      iscsi-target: Refactor ISCSI_OP_TEXT RX handling · 64534aa7
      Nicholas Bellinger 提交于
      This patch refactors ISCSI_OP_TEXT handling within iscsi-target in
      order to handle iscsi_text payloads in a transport specific manner.
      
      This includes splitting current iscsit_handle_text_cmd() into
      iscsit_setup_text_cmd() and iscsit_process_text_cmd() calls, and
      makes iscsit_handle_text_cmd be only used internally by traditional
      iscsi socket calls.
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      64534aa7
    • N
      iscsi/isert-target: Refactor ISCSI_OP_NOOP RX handling · 778de368
      Nicholas Bellinger 提交于
      This patch refactors ISCSI_OP_NOOP handling within iscsi-target in
      order to handle iscsi_nopout payloads in a transport specific manner.
      
      This includes splitting existing iscsit_handle_nop_out() into
      iscsit_setup_nop_out() and iscsit_process_nop_out() calls, and
      makes iscsit_handle_nop_out() be only used internally by traditional
      iscsi socket calls.
      
      Next update iser-target code to use new callers and add FIXME for
      the handling iscsi_nopout payloads.  Also fix reject response handling
      in iscsit_setup_nop_out() to use proper iscsit_add_reject_from_cmd().
      
      v2: Fix uninitialized iscsit_handle_nop_out() payload_length usage (Fengguang)
      v3: Remove left-over dead code in iscsit_setup_nop_out() (DanC)
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      778de368
  14. 21 6月, 2013 2 次提交
    • N
      target: Drop legacy se_cmd->check_release bit · ca24976a
      Nicholas Bellinger 提交于
      Now with iscsi-target using modern se_cmd->cmd_kref accounting in
      v3.10 code, it's safe to go ahead and drop the legacy release
      codepath + se_cmd->check_release bit in transport_release_cmd()
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Kent Overstreet <koverstreet@google.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Moussa Ba <moussaba@micron.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ca24976a
    • N
      target: Remove legacy t_fe_count + avoid t_state_lock access in transport_put_cmd · c1c35d52
      Nicholas Bellinger 提交于
      This patch removes legacy se_cmd->t_fe_count usage in order to avoid
      se_cmd->t_state_lock access within transport_put_cmd() during normal
      fast path se_cmd descriptor release.
      
      Also drop the left-over parameter usage within core_tmr_handle_tas_abort()
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Kent Overstreet <koverstreet@google.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Moussa Ba <moussaba@micron.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c1c35d52
  15. 14 6月, 2013 2 次提交
  16. 31 5月, 2013 1 次提交
  17. 30 5月, 2013 1 次提交
    • N
      target: Re-instate sess_wait_list for target_wait_for_sess_cmds · 9b31a328
      Nicholas Bellinger 提交于
      Switch back to pre commit 1c7b13fe list splicing logic for active I/O
      shutdown with tcm_qla2xxx + ib_srpt fabrics.
      
      The original commit was done under the incorrect assumption that it's safe to
      walk se_sess->sess_cmd_list unprotected in target_wait_for_sess_cmds() after
      sess->sess_tearing_down = 1 has been set by target_sess_cmd_list_set_waiting()
      during session shutdown.
      
      So instead of adding sess->sess_cmd_lock protection around sess->sess_cmd_list
      during target_wait_for_sess_cmds(), switch back to sess->sess_wait_list to
      allow wait_for_completion() + TFO->release_cmd() to occur without having to
      walk ->sess_cmd_list after the list_splice.
      
      Also add a check to exit if target_sess_cmd_list_set_waiting() has already
      been called, and add a WARN_ON to check for any fabric bug where new se_cmds
      are added to sess->sess_cmd_list after sess->sess_tearing_down = 1 has already
      been set.
      
      Cc: Joern Engel <joern@logfs.org>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9b31a328
  18. 21 5月, 2013 1 次提交
  19. 15 5月, 2013 1 次提交