1. 18 1月, 2014 1 次提交
    • N
      target/iblock: Add blk_integrity + BIP passthrough support · ecebbf6c
      Nicholas Bellinger 提交于
      This patch adds blk_integrity passthrough support for block_device
      backends using IBLOCK.
      
      This includes iblock_alloc_bip() + setup of bio_integrity_payload
      information that attaches to the leading struct bio once bio_list
      is populated during fast-path iblock_execute_rw() I/O dispatch.
      
      It also updates setup in iblock_configure_device() to detect modes
      of protection + se dev->dev_attrib.pi_prot_type accordingly, along
      with creating required bio_set integrity mempools.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ecebbf6c
  2. 10 1月, 2014 1 次提交
  3. 13 11月, 2013 1 次提交
  4. 11 9月, 2013 1 次提交
  5. 10 9月, 2013 1 次提交
    • N
      target: Allow sbc_ops->execute_rw() to accept SGLs + data_direction · a82a9538
      Nicholas Bellinger 提交于
      COMPARE_AND_WRITE expects to be able to send down a DMA_FROM_DEVICE
      to obtain the necessary READ payload for comparision against the
      first half of the WRITE payload containing the verify user data.
      
      Currently virtual backends expect to internally reference SGLs,
      SGL nents, and data_direction, so change IBLOCK, FILEIO and RD
      sbc_ops->execute_rw() to accept this values as function parameters.
      
      Also add default sbc_execute_rw() handler for the typical case for
      cmd->execute_rw() submission using cmd->t_data_sg, cmd->t_data_nents,
      and cmd->data_direction).
      
      v2 Changes:
        - Add SCF_COMPARE_AND_WRITE command flag
        - Use sbc_execute_rw() for normal cmd->execute_rw() submission
          with expected se_cmd members.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Cc: Chris Mason <chris.mason@fusionio.com>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      a82a9538
  6. 13 8月, 2013 1 次提交
  7. 15 5月, 2013 1 次提交
  8. 25 4月, 2013 2 次提交
  9. 28 2月, 2013 1 次提交
  10. 24 2月, 2013 1 次提交
  11. 14 2月, 2013 2 次提交
    • R
      target: Fix error checking for UNMAP commands · bb992e72
      Roland Dreier 提交于
      SBC-3 (revision 35) says:
      
          The PARAMETER LIST LENGTH field specifies the length in bytes of the
          UNMAP parameter list that is available to be transferred from the
          Data-Out Buffer. If the parameter list length is greater than zero
          and less than 0008h (i.e., eight), then the device server shall
          terminate the command with CHECK CONDITION status with the sense key
          set to ILLEGAL REQUEST and the additional sense code set to
          PARAMETER LIST LENGTH ERROR. A PARAMETER LIST LENGTH set to zero
          specifies that no data shall be sent.
      
      so our sense code for too-short descriptors was wrong, and we were
      incorrectly failing commands that didn't transfer any descriptors.
      
      While we're at it, also handle the UNMAP check:
      
          If the ANCHOR bit is set to one, and the ANC_SUP bit in the Logical
          Block Provisioning VPD page (see 6.6.4) is set to zero, then the
          device server shall terminate the command with CHECK CONDITION
          status with the sense key set to ILLEGAL REQUEST and the additional
          sense code set to INVALID FIELD IN CDB.
      
      (chris boot: Fix wrong cut+paste comment in transport_send_check_condition_and_sense)
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bb992e72
    • N
      target/iblock: Use backend REQ_FLUSH hint for WriteCacheEnabled status · d0c8b259
      Nicholas Bellinger 提交于
      This patch allows IBLOCK to check block hints in request_queue->flush_flags
      when reporting current backend device WriteCacheEnabled status to a remote
      SCSI initiator port.
      
      This is done via a se_subsystem_api->get_write_cache() call instead of a
      backend se_device creation time flag, as we expect REQ_FLUSH bits to possibly
      change from an underlying blk_queue_flush() by the SCSI disk driver, or
      internal raw struct block_device driver usage.
      
      Also go ahead and update iblock_execute_rw() bio I/O path code to use
      REQ_FLUSH + REQ_FUA hints when determining WRITE_FUA usage, and make SPC
      emulation code use a spc_check_dev_wce() helper to handle both types of
      cases for virtual backend subsystem drivers.
      
      (asias: Drop unnecessary comparsion operators)
      Reported-by: Nmajianpeng <majianpeng@gmail.com>
      Cc: majianpeng <majianpeng@gmail.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d0c8b259
  12. 28 11月, 2012 3 次提交
  13. 16 11月, 2012 1 次提交
    • N
      target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support · f6970ad3
      Nicholas Bellinger 提交于
      This patch adds support for emulation of WRITE_SAME w/ UNMAP=0 within
      iblock_execute_write_same() backend code.
      
      The emulation uses a bio_add_page() call for each sector, and by default
      enforces a limit of max_write_same_len=0xFFFF (65536) sectors following
      what scsi_debug reports per default for MAXIMUM WRITE SAME LENGTH.
      
      It also sets max_write_same_len to the operational default at setup ->
      iblock_configure_device() time.
      
      (hch: Move unmap logic into iblock_execute_write_same_unmap + add
            check for single sector SGLs in iblock_execute_write_same)
      (mkp: Update comment for 0xFFFF magic constant)
      (nab: drop left-over max_write_same_len check in iblock_execute_write_same)
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f6970ad3
  14. 07 11月, 2012 5 次提交
  15. 18 9月, 2012 3 次提交
  16. 09 9月, 2012 1 次提交
  17. 08 9月, 2012 1 次提交
  18. 17 7月, 2012 10 次提交
  19. 07 5月, 2012 3 次提交