1. 17 7月, 2012 4 次提交
  2. 15 7月, 2012 1 次提交
    • M
      tcm_fc: Fix crash seen with aborts and large reads · 3cc5d2a6
      Mark Rustad 提交于
      This patch fixes a crash seen when large reads have their exchange
      aborted by either timing out or being reset. Because the exchange
      abort results in the seq pointer being set to NULL, because the
      sequence is no longer valid, it must not be dereferenced. This
      patch changes the function ft_get_task_tag to return ~0 if it is
      unable to get the tag for this reason. Because the get_task_tag
      interface provides no means of returning an error, this seems
      like the best way to fix this issue at the moment.
      Signed-off-by: NMark Rustad <mark.d.rustad@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3cc5d2a6
  3. 07 7月, 2012 1 次提交
  4. 13 6月, 2012 2 次提交
  5. 03 6月, 2012 1 次提交
    • N
      target/file: Use O_DSYNC by default for FILEIO backends · a4dff304
      Nicholas Bellinger 提交于
      Convert to use O_DSYNC for all cases at FILEIO backend creation time to
      avoid the extra syncing of pure timestamp updates with legacy O_SYNC during
      default operation as recommended by hch.  Continue to do this independently of
      Write Cache Enable (WCE) bit, as WCE=0 is currently the default for all backend
      devices and enabled by user on per device basis via attrib/emulate_write_cache.
      
      This patch drops the now unnecessary fd_buffered_io= token usage that was
      originally signalling when to explictly disable O_SYNC at backend creation
      time for buffered I/O operation.  This can end up being dangerous for a number
      of reasons during physical node failure, so go ahead and drop this option
      for now when O_DSYNC is used as the default.
      
      Also allow explict FUA WRITEs -> vfs_fsync_range() call to function in
      fd_execute_cmd() independently of WCE bit setting.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      a4dff304
  6. 31 5月, 2012 1 次提交
  7. 21 5月, 2012 1 次提交
    • N
      iscsi-target: Fix iov_count calculation bug in iscsit_allocate_iovecs · f80e8ed3
      Nicholas Bellinger 提交于
      This patch fixes a bug in iscsit_allocate_iovecs() where iov_count was
      incorrectly calculated using min(1UL, data_length / PAGE_SIZE) instead of
      max(1UL, data_length / PAGE_SIZE), that ends up triggering an OOPs for
      large block I/O when the SGL <-> iovec mapping exceeds the bogus iov_count
      allocation size.
      
      This is a regression introduced during the iscsi-target conversion back
      to using core memory allocation here:
      
      commit bfb79eac
      Author: Andy Grover <agrover@redhat.com>
      Date:   Tue Apr 3 15:51:29 2012 -0700
      
          target/iscsi: Go back to core allocating data buffer for cmd
      
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f80e8ed3
  8. 18 5月, 2012 2 次提交
  9. 17 5月, 2012 3 次提交
    • M
      target: Handle ATA_16 passthrough for pSCSI backend devices · 8da10935
      mengcong 提交于
      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: NCong Meng <mc@linux.vnet.ibm.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      8da10935
    • N
      target: Add MI_REPORT_TARGET_PGS ext. header + implict_trans_secs attribute · 5b9a4d72
      Nicholas Bellinger 提交于
      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: NNicholas Bellinger <nab@linux-iscsi.org>
      5b9a4d72
    • N
      target: Fix MAINTENANCE_IN service action CDB checks to use lower 5 bits · ba539743
      Nicholas Bellinger 提交于
      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: NNicholas Bellinger <nab@linux-iscsi.org>
      ba539743
  10. 16 5月, 2012 1 次提交
  11. 15 5月, 2012 1 次提交
    • B
      target: Fix SPC-2 RELEASE bug for multi-session iSCSI client setups · edc318d9
      Bernhard Kohl 提交于
      This patch addresses a bug in a special case for target core SPC-2 RELEASE
      logic where the same physical client (eg: iSCSI InitiatorName) with
      differing iSCSI session identifiers (ISID) is allowed to incorrectly release
      the same client's SPC-2 reservation from the non reservation holding path.
      
      Note this bug is specific to iscsi-target w/ SPC-2 reservations, and
      with the default enforce_pr_isids=1 device attr setting in target-core
      controls if a InitiatorName + different ISID reservations are handled
      the same as a single iSCSI client entity.
      Signed-off-by: NBernhard Kohl <bernhard.kohl@gmx.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      edc318d9
  12. 12 5月, 2012 3 次提交
  13. 10 5月, 2012 4 次提交
    • C
      sbp-target: Initial merge of firewire/ieee-1394 target mode support · a511ce33
      Chris Boot 提交于
      The FireWire SBP-2 Target is a driver for using an IEEE-1394 connection
      as a SCSI transport. This module uses the SCSI Target framework to
      expose LUNs to other machines attached to a FireWire bus, in effect
      acting as a FireWire hard disk similar to FireWire Target Disk mode
      on many Apple computers.
      
      This commit contains the squashed pull from Chris Boot's SBP-2-Target:
      
            https://github.com/bootc/Linux-SBP-2-Target.git patch-v3
      
      firewire-sbp-target: Add sbp_base.h header
      firewire-sbp-target: Add sbp_configfs.c
      firewire-sbp-target: Add sbp_fabric.{c,h}
      firewire-sbp-target: Add sbp_management_agent.{c,h}
      firewire-sbp-target: Add sbp_login.{c,h}
      firewire-sbp-target: Add sbp_target_agent.{c,h}
      firewire-sbp-target: Add sbp_scsi_cmnd.{c,h}
      firewire-sbp-target: Add to target Kconfig and Makefile
      
      Also add bootc's entry to the MAINTAINERS file.  Great work Chris !!
      Signed-off-by: NChris Boot <bootc@bootc.net>
      Acked-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Clemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      a511ce33
    • N
      target: Remove max_sectors device attribute for modern se_task less code · 11e764bd
      Nicholas Bellinger 提交于
      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: NAndy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      11e764bd
    • D
      target: lock => unlock typo in transport_lun_wait_for_tasks · 23019170
      Dan Carpenter 提交于
      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: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      23019170
    • N
      target: Enforce hw_max_sectors for SCF_SCSI_DATA_SG_IO_CDB · 7b4deef5
      Nicholas Bellinger 提交于
      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: NChristoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      7b4deef5
  14. 07 5月, 2012 15 次提交