1. 30 1月, 2013 1 次提交
    • N
      target: Fix zero-length READ_CAPACITY_16 regression · 8b4b0dcb
      Nicholas Bellinger 提交于
      This patch fixes a regression introduced in v3.8-rc1 code where a
      zero-length READ_CAPACITY_16 was no longer returning GOOD status, but
      instead returning TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE to generate
      a CHECK_CONDITION status.
      
      This regression was introduced with the following commit:
      
        commit de103c93
        Author: Christoph Hellwig <hch@lst.de>
        Date:   Tue Nov 6 12:24:09 2012 -0800
      
            target: pass sense_reason as a return value
      
      and this patch has been tested with the following zero-length CDB:
      
        sg_raw /dev/sdd 9e 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        SCSI Status: Good
      
        Sense Information:
        sense buffer empty
      
      Also, convert sbc_emulate_readcapacity() to follow the same method
      of handling transport_kmap_data_sg() return values, but we never
      expect a zero-length request here.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      8b4b0dcb
  2. 28 11月, 2012 3 次提交
  3. 16 11月, 2012 2 次提交
    • N
      target: Add/check max_write_same_len device attribute + update block limits VPD · 773cbaf7
      Nicholas Bellinger 提交于
      This patch adds a new max_write_same_len device attribute for use with
      WRITE_SAME w/ UNMAP=0 backend emulation.  This can be useful for
      lowering the default backend value (IBLOCK uses 0xFFFF).
      
      Also, update block limits VPD emulation code in spc_emulate_evpd_b0() to
      report MAXIMUM WRITE SAME LENGTH, and enforce max_write_same_len during
      sbc_parse() -> sbc_setup_write_same() CDB sanity checking for all emulated
      WRITE_SAME w/ UNMAP=0 cases.
      
      (Robert: Move max_write_same_len check in sbc_setup_write_same() to
               check both WRITE_SAME w/ UNMAP=1 and w/ UNMAP=0 cases)
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Robert Elliott <Elliott@hp.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      773cbaf7
    • N
      target/sbc: Seperate WRITE_SAME based on UNMAP flag in sbc_ops · cd063bef
      Nicholas Bellinger 提交于
      This patch adds a new sbc_ops->execute_write_same_unmap() caller for use
      with WRITE_SAME w/ UNMAP=1, and performs the ->execute_cmd() setup based
      this bit within sbc_setup_write_same() code.
      
      Also, makes the changes in sbc_parse_cdb() to handle a sense_reason_t
      return from sbc_setup_write_same() on error.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      cd063bef
  4. 08 11月, 2012 1 次提交
  5. 07 11月, 2012 5 次提交
  6. 27 10月, 2012 1 次提交
    • B
      target: reintroduce some obsolete SCSI-2 commands · 1a1ff38c
      Bernhard Kohl 提交于
      With kernel 3.6 some obsolete SCSI-2 commands including SEEK_10 have
      have been removed by commit 1fd032ee
      "target: move code for CDB emulation".
      
      There are still clients out there which use these old SCSI-2 commands.
      This mainly happens when running VMs with legacy guest systems,
      connected via SCSI command pass-through to iSCSI targets. Make them
      happy and return status GOOD.
      
      Many real SCSI disks or external iSCSI storage devices still support
      these old commands. So let's make LIO backward compatible as well.
      
      This patch adds support for the previously removed SEEK_10 and
      additionally the SEEK_6 and REZERO_UNIT commands.
      Signed-off-by: NBernhard Kohl <bernhard.kohl@nsn.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      1a1ff38c
  7. 18 9月, 2012 1 次提交
  8. 17 7月, 2012 6 次提交