1. 17 May, 2012 3 commits
    • mengcong's avatar
      target: Handle ATA_16 passthrough for pSCSI backend devices · 8da10935
      mengcong authored
      The cdrecord uses ATA_PASS_THROUGH_16 command while burning CDs
      with a SATA CD-ROM. This patch adds support to it so that PSCSI
      CD-ROM passthrough works with the cdrecord.
      
      (nab: Add !passthrough check to prevent non pSCSI backends from ATA_16)
      Signed-off-by: default avatarCong Meng <mc@linux.vnet.ibm.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      8da10935
    • Nicholas Bellinger's avatar
      target: Add MI_REPORT_TARGET_PGS ext. header + implict_trans_secs attribute · 5b9a4d72
      Nicholas Bellinger authored
      This patch adds support for ALUA MI_REPORT_TARGET_PGS extended header
      format defined within SPC-4.  It changes target core ALUA emulation logic
      within target_emulate_report_target_port_groups() to support both the
      extended and original length only header formats.
      
      It includes adding a new 'implict_trans_secs' attribute for each ALUA
      target port group to control the value returned to the application client
      for an recommended implict translation timeout in seconds.  By default
      this value is currently set to zero, and limited up to 255 by virtue of
      using a single byte in the extended header format.
      
      This value is used by target_emulate_report_target_port_groups() within
      the extended header logic to set IMPLICIT TRANSITION TIME as defined by
      spc4r30.
      
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Rob Evers <revers@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      5b9a4d72
    • Nicholas Bellinger's avatar
      target: Fix MAINTENANCE_IN service action CDB checks to use lower 5 bits · ba539743
      Nicholas Bellinger authored
      This patch fixes the MAINTENANCE_IN service action type checks to only
      look at the proper lower 5 bits of cdb byte 1.  This addresses the case
      where MI_REPORT_TARGET_PGS w/ extended header using the upper three bits of
      cdb byte 1 was not processed correctly in transport_generic_cmd_sequencer,
      as well as the three cases for standby, unavailable, and transition ALUA
      primary access state checks.
      
      Also add MAINTENANCE_IN to the excluded list in transport_generic_prepare_cdb()
      to prevent the PARAMETER DATA FORMAT bits from being cleared.
      
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Rob Evers <revers@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      ba539743
  2. 15 May, 2012 1 commit
  3. 11 May, 2012 2 commits
  4. 09 May, 2012 3 commits
    • Nicholas Bellinger's avatar
      target: Remove max_sectors device attribute for modern se_task less code · 11e764bd
      Nicholas Bellinger authored
      This patch removes the original usage of dev_attr->max_sectors in favor of
      dev_attr->hw_max_sectors that is now being enforced by target core from
      within transport_generic_cmd_sequencer() for SCF_SCSI_DATA_SG_IO_CDB ops.
      
      After the recent se_task removal patches from hch, this value for IBLOCK
      backends being set via configfs by userspace from an saved max_sectors
      value that is turning out to be problematic, so it makes sense to go ahead
      and remove this now legacy attribute all-together.
      
      This patch also continues to make se_dev_set_default_attribs() do
      (sectors / block_size) alignment for what actually get used by
      target_core_mod to be safe here, following the same alignment currently
      used by fabric_max_sectors.
      Reported-by: default avatarAndy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      11e764bd
    • Dan Carpenter's avatar
      target: lock => unlock typo in transport_lun_wait_for_tasks · 23019170
      Dan Carpenter authored
      target_stop_cmd() returns with the lock held and IRQs disabled.  The
      intent was to unlock here.  This bug was originally added with:
      
      commit cf572a96
      Author: Christoph Hellwig <hch@infradead.org>
      Date:   Tue Apr 24 00:25:05 2012 -0400
      
          target: move the state and execute lists to the command
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      23019170
    • Nicholas Bellinger's avatar
      target: Enforce hw_max_sectors for SCF_SCSI_DATA_SG_IO_CDB · 7b4deef5
      Nicholas Bellinger authored
      Instead of depending upon a max_sectors value that may be set via
      configfs based upon original HW queue limitations, go ahead and convert to using
      the hw_max_sectors reported by the backend device in order to determine when
      to reject an I/O's who's sector count exceeds what is supported by the backend
      with a single se_cmd descriptor.
      
      It addresses a potential case where se_dev_attrib.max_sectors for IBLOCK
      backends has already been set via queue_max_sectors() to something small
      like max_sectors=32 (LVM, DRBD may do this), resulting typically sized
      SCF_SCSI_DATA_SG_IO_CDB to be incorrectly rejected with invalid_cdb_field
      in transport_generic_cmd_sequencer().
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      7b4deef5
  5. 06 May, 2012 15 commits
  6. 15 Apr, 2012 16 commits