1. 08 Dec, 2012 1 commit
  2. 05 Dec, 2012 3 commits
  3. 28 Nov, 2012 14 commits
  4. 15 Nov, 2012 3 commits
    • Nicholas Bellinger's avatar
      target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support · f6970ad3
      Nicholas Bellinger authored
      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: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      f6970ad3
    • Nicholas Bellinger's avatar
      target: Add/check max_write_same_len device attribute + update block limits VPD · 773cbaf7
      Nicholas Bellinger authored
      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: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      773cbaf7
    • Nicholas Bellinger's avatar
      target/sbc: Seperate WRITE_SAME based on UNMAP flag in sbc_ops · cd063bef
      Nicholas Bellinger authored
      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: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      cd063bef
  5. 08 Nov, 2012 7 commits
  6. 07 Nov, 2012 12 commits