1. 02 Oct, 2012 11 commits
    • Nicholas Bellinger's avatar
      tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls · 9f0abc15
      Nicholas Bellinger authored
      
      
      This patch converts tcm_vhost to use target_submit_cmd_map_sgls() for
      I/O submission and mapping of pre-allocated SGL memory from incoming
      virtio-scsi SGL memory -> 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.
      
      It also includes adding a handful of new tcm_vhost_cmnd member +
      assignments in vhost_scsi_allocate_cmd() used from cmwq process
      context I/O submission within tcm_vhost_submission_work()
      
      (v2: Use renamed target_submit_cmd_map_sgls)
      
      Reported-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Stefan Hajnoczi <stefanha@gmail.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      9f0abc15
    • Nicholas Bellinger's avatar
      target: Add control CDB READ payload zero work-around · 944981c7
      Nicholas Bellinger authored
      
      
      This patch carries forward a work-around from tcm_loop to target
      core code to explicitly clear control CDB READ paylods in order to
      avoid bugs in scsi-generic user-space code for INQUIRY that do not
      explicitly zero CDB payload memory.
      
      (v2: Drop TARGET_SCF_MAP_CLEAR_MEM, and perform the explicit zero
           of READ memory for all target_submit_cmd_map_sgls users)
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      944981c7
    • Nicholas Bellinger's avatar
      tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls · 8f9f44f8
      Nicholas Bellinger authored
      
      
      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: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      8f9f44f8
    • Nicholas Bellinger's avatar
      target: Add target_submit_cmd_map_sgls for SGL fabric memory passthrough · a026757f
      Nicholas Bellinger authored
      
      
      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: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      a026757f
    • Nicholas Bellinger's avatar
      iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode · 38b11bae
      Nicholas Bellinger authored
      
      
      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: default avatarRonnie Sahlberg <ronniesahlberg@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      38b11bae
    • Nicholas Bellinger's avatar
      iscsi-target: Change iscsi_target_seq_pdu_list.c to honor MaxXmitDataSegmentLength · b094a4bd
      Nicholas Bellinger authored
      
      
      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: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      b094a4bd
    • Nicholas Bellinger's avatar
      iscsi-target: Add MaxXmitDataSegmentLength connection recovery check · 1c417f39
      Nicholas Bellinger authored
      
      
      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: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      1c417f39
    • Nicholas Bellinger's avatar
      iscsi-target: Convert incoming PDU payload checks to MaxXmitDataSegmentLength · 21f5aa7e
      Nicholas Bellinger authored
      
      
      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: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      21f5aa7e
    • Nicholas Bellinger's avatar
      iscsi-target: Enable MaxXmitDataSegmentLength operation in login path · 9977bb18
      Nicholas Bellinger authored
      
      
      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: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      9977bb18
    • Nicholas Bellinger's avatar
      iscsi-target: Add base MaxXmitDataSegmentLength code · e004cb25
      Nicholas Bellinger authored
      
      
      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: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      e004cb25
    • Nicholas Bellinger's avatar
      target/file: Re-enable optional fd_buffered_io=1 operation · b32f4c7e
      Nicholas Bellinger authored
      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: default avatarFerry <iscsitmp@bananateam.nl>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      b32f4c7e
  2. 23 Sep, 2012 1 commit
  3. 22 Sep, 2012 2 commits
  4. 18 Sep, 2012 17 commits
  5. 17 Sep, 2012 4 commits
  6. 16 Sep, 2012 5 commits
    • Linus Torvalds's avatar
      Linux 3.6-rc6 · 5698bd75
      Linus Torvalds authored
      5698bd75
    • Linus Torvalds's avatar
      Merge tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 · 73f8be29
      Linus Torvalds authored
      Pull mfd fixes from Samuel Ortiz:
       "This is the remaining MFD fixes for 3.6, with 5 pending fixes:
      
         - A tps65217 build error fix.
         - A lcp_ich regression fix caused by the MFD driver failing to
           initialize the watchdog sub device due to ACPI conflicts.
         - 2 MAX77693 interrupt handling bug fixes.
         - An MFD core fix, adding an IRQ domain argument to the MFD device
           addition API in order to prevent silent and potentially harmful
           remapping behaviour changes for drivers supporting non-DT
           platforms."
      
      * tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
        mfd: MAX77693: Fix NULL pointer error when initializing irqs
        mfd: MAX77693: Fix interrupt handling bug
        mfd: core: Push irqdomain mapping out into devices
        mfd: lpc_ich: Fix a 3.5 kernel regression for iTCO_wdt driver
        mfd: Move tps65217 regulator plat data handling to regulator
      73f8be29
    • Linus Torvalds's avatar
      Merge tag 'for-3.6-rc6' of git://gitorious.org/linux-pwm/linux-pwm · c500ce38
      Linus Torvalds authored
      Pull pwm fixes from Thierry Reding:
       "While this comes a bit later than I had wished, both patches are
        rather minor and touch only new drivers so I think these are still
        safe for merging."
      
      * tag 'for-3.6-rc6' of git://gitorious.org/linux-pwm/linux-pwm:
        pwm: pwm-tiehrpwm: Fix conflicting channel period setting
        pwm: pwm-tiecap: Disable APWM mode after configure
      c500ce38
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 76e77daf
      Linus Torvalds authored
      Pull scsi target fixes from Nicholas Bellinger:
       "Here is the current set of target-pending fixes headed for v3.6-final
      
        The main parts of this series include bug-fixes from Paolo Bonzini to
        address an use-after-free bug in pSCSI sense exception handling, along
        with addressing some long-standing bugs wrt the handling of zero-
        length SCSI CDB payloads also specific to pSCSI pass-through device
        backends."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        target: go through normal processing for zero-length REQUEST_SENSE
        target: support zero allocation length in REQUEST SENSE
        target: support zero-size allocation lengths in transport_kmap_data_sg
        target: fail REPORT LUNS with less than 16 bytes of payload
        target: report too-small parameter lists everywhere
        target: go through normal processing for zero-length PSCSI commands
        target: fix use-after-free with PSCSI sense data
        target: simplify code around transport_get_sense_data
        target: move transport_get_sense_data
        target: Check idr_get_new return value in iscsi_login_zero_tsih_s1
        target: Fix ->data_length re-assignment bug with SCSI overflow
      76e77daf
    • Linus Torvalds's avatar
      Merge tag 'pm-for-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 9bc67590
      Linus Torvalds authored
      Pull power management fixes from Rafael J. Wysocki:
       "Three ACPI device power management fixes related to checking and
        setting device power states."
      
      * tag 'pm-for-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / PM: Use KERN_DEBUG when no power resources are found
        ACPI / PM: Fix resource_lock dead lock in acpi_power_on_device
        ACPI / PM: Infer parent power state from child if unknown, v2
      9bc67590