1. 04 5月, 2013 1 次提交
  2. 25 4月, 2013 3 次提交
    • N
      iscsi-target: Add iscsit_transport API template · 3f993063
      Nicholas Bellinger 提交于
      Add basic struct iscsit_transport API template to allow iscsi-target for
      running with external transport modules using existing iscsi_target_core.h
      code.
      
      For all external modules, this calls try_module_get() and module_put()
      to obtain + release an external iscsit_transport module reference count.
      
      Also include the iscsi-target symbols necessary in iscsi_transport.h to
      allow external transport modules to function.
      
      v3 changes:
      - Add iscsit_build_reject export for ISTATE_SEND_REJECT usage
      
      v2 changes:
      
      - Drop unnecessary export of iscsit_get_transport + iscsit_put_transport (roland)
      - Add ->iscsit_queue_data_in() to remove extra context switch on RDMA_WRITE
      - Add ->iscsit_queue_status() to remove extra context switch on IB_SEND status
      - Add ->iscsit_get_dataout() to remove extra context switch on RDMA_READ
      - Drop ->iscsit_free_cmd()
      - Drop ->iscsit_unmap_cmd()
      - Rename iscsit_create_transport() -> iscsit_register_transport() (andy)
      - Rename iscsit_destroy_transport() -> iscsit_unregister_transport() (andy)
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3f993063
    • N
      target: Add export of target_get_sess_cmd symbol · 20361e69
      Nicholas Bellinger 提交于
      Export target_get_sess_cmd() symbol so that it can be used by
      iscsi-target.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      20361e69
    • A
      target: Add sbc_execute_unmap() helper · 86d71829
      Asias He 提交于
      iblock_execute_unmap() and fd_execute_unmap share a lot of code.
      Add sbc_execute_unmap() helper to remove duplicated code for
      iblock_execute_unmap() and fd_execute_unmap().
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NAsias He <asias@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      86d71829
  3. 24 2月, 2013 1 次提交
  4. 14 2月, 2013 6 次提交
  5. 11 1月, 2013 1 次提交
  6. 14 12月, 2012 1 次提交
    • A
      target/iscsi_target: Add NodeACL tags for initiator group support · 79e62fc3
      Andy Grover 提交于
      Thanks for reviews, looking a lot better.
      
      ---- 8< ----
      
      Initiator access config could be easier. The way other storage vendors
      have addressed this is to support initiator groups: the admin adds
      initiator WWNs to the group, and then LUN permissions can be granted for
      the entire group at once.
      
      Instead of changing ktarget's configfs interface, this patch keeps
      the configfs interface per-initiator-wwn and just adds a 'tag' field
      for each. This should be enough for user tools like targetcli to group
      initiator ACLs and sync their configurations.
      
      acl_tag is not used internally, but needs to be kept in configfs so that
      all user tools can avoid dependencies on each other.
      
      Code tested to work, although userspace pieces still to be implemented.
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      79e62fc3
  7. 05 12月, 2012 1 次提交
  8. 28 11月, 2012 1 次提交
    • N
      target: Make spc_get_write_same_sectors return sector_t · ffe00675
      Nicholas Bellinger 提交于
      We already expect TFO->get_blocks() to return sector_t for zero value case
      when doing WRITE_SAME to the end of the backend device, so go ahead and return
      sector_t from spc_get_write_same_sectors() to handle this case properly.
      
      Also, update the single iblock_execute_write_same() caller of this code.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ffe00675
  9. 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
  10. 07 11月, 2012 9 次提交
  11. 03 10月, 2012 1 次提交
  12. 18 9月, 2012 3 次提交
  13. 08 9月, 2012 1 次提交
    • P
      target: support zero allocation length in REQUEST SENSE · 32a8811f
      Paolo Bonzini 提交于
      Similar to INQUIRY and MODE SENSE, construct the sense data in a
      buffer and later copy it to the scatterlist.  Do not do anything,
      but still clear a pending unit attention condition, if the allocation
      length is zero.
      
      However, SPC tells us that "If a REQUEST SENSE command is terminated with
      CHECK CONDITION status [and] the REQUEST SENSE command was received on
      an I_T nexus with a pending unit attention condition (i.e., before the
      device server reports CHECK CONDITION status), then the device server
      shall not clear the pending unit attention condition."  Do the
      transport_kmap_data_sg early to detect this case.
      
      It also tells us "Device servers shall not adjust the additional sense
      length to reflect truncation if the allocation length is less than the
      sense data available", so do not do that!  Note that the err variable
      is write-only.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      32a8811f
  14. 06 9月, 2012 1 次提交
  15. 22 8月, 2012 1 次提交
  16. 18 7月, 2012 1 次提交
    • R
      target: Allow for target_submit_cmd() returning errors · d6dfc868
      Roland Dreier 提交于
      We want it to be possible for target_submit_cmd() to return errors up
      to its fabric module callers.  For now just update the prototype to
      return an int, and update all callers to handle non-zero return values
      as an error.
      
      This is immediately useful for tcm_qla2xxx to fix a long-standing active
      I/O session shutdown race, but tcm_fc, usb-gadget, and sbp-target the
      fabric maintainers need to check + ACK that handling a target_submit_cmd()
      failure due to session shutdown does not introduce regressions
      
      (nab: Respin against for-next after initial NACK + update docbook comment +
            fix double se_cmd init in exception path for usb-gadget)
      
      Cc: Chad Dupuis <chad.dupuis@qlogic.com>
      Cc: Arun Easi <arun.easi@qlogic.com>
      Cc: Chris Boot <bootc@bootc.net>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Mark Rustad <mark.d.rustad@intel.com>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d6dfc868
  17. 17 7月, 2012 6 次提交