1. 03 10月, 2012 9 次提交
    • N
      tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls · 8f9f44f8
      Nicholas Bellinger 提交于
      This patch converts tcm_loop to use target_submit_cmd_map_sgls() for
      I/O submission and mapping of pre-allocated SGL memory from incoming
      scsi_cmnd -> se_cmd descriptors.
      
      This includes removing the original open-coded fabric uses of target
      core callers to support transport_generic_map_mem_to_cmd() between
      target_setup_cmd_from_cdb() and transport_handle_cdb_direct() logic.
      
      (v2: Use renamed target_submit_cmd_map_sgls)
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      8f9f44f8
    • N
      target: Add target_submit_cmd_map_sgls for SGL fabric memory passthrough · a026757f
      Nicholas Bellinger 提交于
      This patch adds a new target_submit_cmd_map_sgls() to pass pre-allocated
      SGL memory using transport_generic_map_mem_to_cmd() logic into the generic
      target submit I/O codepath.
      
      It also adds a target_submit_cmd() wrapper around target_submit_cmd_map_sgls()
      for existing fabric code that already assumes internal target-core SGL memory
      allocation.
      
      (v2: Rename to target_submit_cmd_map_sgls + drop TARGET_SCF_MAP_MEM flag
           in favor of non zero sgl_count check)
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      a026757f
    • N
      iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode · 38b11bae
      Nicholas Bellinger 提交于
      We've had reports in the past about this specific case, so it's time to
      go ahead and explicitly set cache_dynamic_acls=1 for generate_node_acls=1
      (TPG demo-mode) operation.
      
      During normal generate_node_acls=0 operation with explicit NodeACLs ->
      se_node_acl memory is persistent to the configfs group located at
      /sys/kernel/config/target/$TARGETNAME/$TPGT/acls/$INITIATORNAME, so in
      the generate_node_acls=1 case we want the reservation logic to reference
      existing per initiator IQN se_node_acl memory (not to generate a new
      se_node_acl), so go ahead and always set cache_dynamic_acls=1 when
      TPG demo-mode is enabled.
      Reported-by: NRonnie Sahlberg <ronniesahlberg@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      38b11bae
    • N
      iscsi-target: Change iscsi_target_seq_pdu_list.c to honor MaxXmitDataSegmentLength · b094a4bd
      Nicholas Bellinger 提交于
      This patch converts iscsi_target_seq_pdu_list.c code for DataSequenceInOrder=No +
      DataPDUInOrder=No operation to honor the MaxXmitDataSegmentLength value
      for iscsi_cmd->se_cmd.data_direction == DMA_TO_DEVICE cases.
      
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      b094a4bd
    • N
      iscsi-target: Add MaxXmitDataSegmentLength connection recovery check · 1c417f39
      Nicholas Bellinger 提交于
      The iSCSI TMR TASK_REASSIGN completion logic in iscsi_tmr_task_reassign()
      does an explict check for MRDSL across task reassignment, so go ahead and
      add an explict MaxXmitDataSegmentLength check here as well to be safe.
      
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      1c417f39
    • N
      iscsi-target: Convert incoming PDU payload checks to MaxXmitDataSegmentLength · 21f5aa7e
      Nicholas Bellinger 提交于
      Now that iscsi-target supports a local configurable MaxXmitDataSegmentLength,
      go ahead and make ISCSI_OP_SCSI_CMD, ISCSI_OP_SCSI_DATA_OUT, ISCSI_OP_NOOP_OUT
      and ISCSI_OP_TEXT PDU payload checks honor conn_ops->MaxXmitDataSegmentLength.
      
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      21f5aa7e
    • N
      iscsi-target: Enable MaxXmitDataSegmentLength operation in login path · 9977bb18
      Nicholas Bellinger 提交于
      This patch activates MaxXmitDataSegmentLength usage that performs the
      following sequence of events:
      
      - Once the incoming initiator's MAXRECVDATASEGMENTLENGTH key is detected
        within iscsi_check_acceptor_state(), save the requested MRDSL into
        conn->conn_ops->MaxRecvDataSegmentLength
      
      - Next change the outgoing target's MaxRecvDataSegmenthLength key=value
        based upon the local TPG's MaxXmitDataSegmentLength attribute value.
      
      - Change iscsi_set_connection_parameters() to skip the assignment of
        conn->conn_ops->MaxRecvDataSegmentLength, now setup within
        iscsi_check_acceptor_state()
      
      Also update iscsi_decode_text_input() -> iscsi_check_acceptor_state()
      code-path to accept struct iscsi_conn *.
      
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9977bb18
    • N
      iscsi-target: Add base MaxXmitDataSegmentLength code · e004cb25
      Nicholas Bellinger 提交于
      This patch introduces a new per connection MaxXmitDataSegmentLength
      parameter value used to represent the outgoing MaxRecvDataSegmentLength
      that is actually sent over the wire during iSCSI login response back
      to the initiator side.
      
      It also adds a new MaxXmitDataSegmentLength configfs attribute to
      represent this value within the existing TPG parameter group under
      /sys/kernel/config/target/iscsi/$TARGETNAME/$TPGT/param/
      
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      e004cb25
    • N
      target/file: Re-enable optional fd_buffered_io=1 operation · b32f4c7e
      Nicholas Bellinger 提交于
      This patch re-adds the ability to optionally run in buffered FILEIO mode
      (eg: w/o O_DSYNC) for device backends in order to once again use the
      Linux buffered cache as a write-back storage mechanism.
      
      This logic was originally dropped with mainline v3.5-rc commit:
      
      commit a4dff304
      Author: Nicholas Bellinger <nab@linux-iscsi.org>
      Date:   Wed May 30 16:25:41 2012 -0700
      
          target/file: Use O_DSYNC by default for FILEIO backends
      
      This difference with this patch is that fd_create_virtdevice() now
      forces the explicit setting of emulate_write_cache=1 when buffered FILEIO
      operation has been enabled.
      
      (v2: Switch to FDBD_HAS_BUFFERED_IO_WCE + add more detailed
           comment as requested by hch)
      Reported-by: NFerry <iscsitmp@bananateam.nl>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      b32f4c7e
  2. 23 9月, 2012 3 次提交
  3. 18 9月, 2012 21 次提交
  4. 16 9月, 2012 3 次提交
  5. 15 9月, 2012 1 次提交
  6. 14 9月, 2012 3 次提交