1. 08 4月, 2015 1 次提交
    • N
      loopback: Add fabric_prot_type attribute support · 436f4a0a
      Nicholas Bellinger 提交于
      This patch updates loopback to add a new fabric_prot_type TPG attribute,
      used for controlling LLD level protection into LIO when the backend
      device does not support T10-PI.
      
      Also, go ahead and set DIN_PASS + DOUT_PASS so target-core knows that
      it will be doing any WRITE_STRIP and READ_INSERT operations.
      
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      436f4a0a
  2. 27 3月, 2015 1 次提交
  3. 04 12月, 2014 2 次提交
  4. 02 12月, 2014 1 次提交
  5. 24 11月, 2014 2 次提交
  6. 12 11月, 2014 4 次提交
  7. 04 10月, 2014 1 次提交
  8. 02 10月, 2014 1 次提交
    • J
      target: encapsulate smp_mb__after_atomic() · 33940d09
      Joern Engel 提交于
      The target code has a rather generous helping of smp_mb__after_atomic()
      throughout the code base.  Most atomic operations were followed by one
      and none were preceded by smp_mb__before_atomic(), nor accompanied by a
      comment explaining the need for a barrier.
      
      Instead of trying to prove for every case whether or not it is needed,
      this patch introduces atomic_inc_mb() and atomic_dec_mb(), which
      explicitly include the memory barriers before and after the atomic
      operation.  For now they are defined in a target header, although they
      could be of general use.
      
      Most of the existing atomic/mb combinations were replaced by the new
      helpers.  In a few cases the atomic was sandwiched in
      spin_lock/spin_unlock and I simply removed the barrier.
      
      I suspect that in most cases the correct conversion would have been to
      drop the barrier.  I also suspect that a few cases exist where a) the
      barrier was necessary and b) a second barrier before the atomic would
      have been necessary and got added by this patch.
      Signed-off-by: NJoern Engel <joern@logfs.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      33940d09
  9. 18 7月, 2014 1 次提交
  10. 27 6月, 2014 1 次提交
  11. 12 6月, 2014 1 次提交
  12. 18 4月, 2014 1 次提交
  13. 07 4月, 2014 3 次提交
    • N
      target: Pass in transport supported PI at session initialization · e70beee7
      Nicholas Bellinger 提交于
      In order to support local WRITE_INSERT + READ_STRIP operations for
      non PI enabled fabrics, the fabric driver needs to be able signal
      what protection offload operations are supported.
      
      This is done at session initialization time so the modes can be
      signaled by individual se_wwn + se_portal_group endpoints, as well
      as optionally across different transports on the same endpoint.
      
      For iser-target, set TARGET_PROT_ALL if the underlying ib_device
      has already signaled PI offload support, and allow this to be
      exposed via a new iscsit_transport->iscsit_get_sup_prot_ops()
      callback.
      
      For loopback, set TARGET_PROT_ALL to signal SCSI initiator mode
      operation.
      
      For all other drivers, set TARGET_PROT_NORMAL to disable fabric
      level PI.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      e70beee7
    • N
      target: Add TFO->abort_task for aborted task resources release · 131e6abc
      Nicholas Bellinger 提交于
      Now that TASK_ABORTED status is not generated for all cases by
      TMR ABORT_TASK + LUN_RESET, a new TFO->abort_task() caller is
      necessary in order to give fabric drivers a chance to unmap
      hardware / software resources before the se_cmd descriptor is
      released via the normal TFO->release_cmd() codepath.
      
      This patch adds TFO->aborted_task() in core_tmr_abort_task()
      in place of the original transport_send_task_abort(), and
      also updates all fabric drivers to implement this caller.
      
      The fabric drivers that include changes to perform cleanup
      via ->aborted_task() are:
      
        - iscsi-target
        - iser-target
        - srpt
        - tcm_qla2xxx
      
      The fabric drivers that currently set ->aborted_task() to
      NOPs are:
      
        - loopback
        - tcm_fc
        - usb-gadget
        - sbp-target
        - vhost-scsi
      
      For the latter five, there appears to be no additional cleanup
      required before invoking TFO->release_cmd() to release the
      se_cmd descriptor.
      
      v2 changes:
        - Move ->aborted_task() call into transport_cmd_finish_abort (Alex)
      
      Cc: Alex Leung <amleung21@yahoo.com>
      Cc: Mark Rustad <mark.d.rustad@intel.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Vu Pham <vu@mellanox.com>
      Cc: Chris Boot <bootc@bootc.net>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      131e6abc
    • S
      Target/dif: Introduce protection-passthough-only mode · b5b8e298
      Sagi Grimberg 提交于
      Some transports (iSCSI/iSER/SRP/FC) support hardware INSERT/STRIP
      capabilities while other transports like loopback/vhost-scsi need
      perform this is software.
      
      This patch allows fabrics using SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC
      to signal the early LUN scan handling case where PROTECT CDB bits
      are set, but no fabric buffer has been provided.
      
      For transports which use generic new command these buffers have yet
      to be allocated.
      
      Also this way, target may support protection information
      against legacy initiators (writes are inserted and reads
      are stripped).
      
      (Only set prot_pto for loopback during early special case - nab)
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      b5b8e298
  14. 19 1月, 2014 1 次提交
  15. 18 1月, 2014 1 次提交
    • N
      target: Add protection SGLs to target_submit_cmd_map_sgls · def2b339
      Nicholas Bellinger 提交于
      This patch adds support to target_submit_cmd_map_sgls() for
      accepting 'sgl_prot' + 'sgl_prot_count' parameters for
      DIF protection information.
      
      Note the passed parameters are stored at se_cmd->t_prot_sg
      and se_cmd->t_prot_nents respectively.
      
      Also, update tcm_loop and vhost-scsi fabrics usage of
      target_submit_cmd_map_sgls() to take into account the
      new parameters.
      
      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>
      def2b339
  16. 10 1月, 2014 1 次提交
    • R
      drivers: target: Mark functions as static in tcm_loop.c · f0a6c693
      Rashika Kheria 提交于
      Mark functions tcm_loop_make_naa_tpg(), tcm_loop_drop_naa_tpg(),
      tcm_loop_make_scsi_hba() and tcm_loop_drop_scsi_hba() as static in
      loopback/tcm_loop.c because they are not used outside this file.
      
      This eliminates the following warning in loopback/tcm_loop.c:
      drivers/target/loopback/tcm_loop.c:1231:25: warning: no previous prototype for ‘tcm_loop_make_naa_tpg’ [-Wmissing-prototypes]
      drivers/target/loopback/tcm_loop.c:1276:6: warning: no previous prototype for ‘tcm_loop_drop_naa_tpg’ [-Wmissing-prototypes]
      drivers/target/loopback/tcm_loop.c:1308:16: warning: no previous prototype for ‘tcm_loop_make_scsi_hba’ [-Wmissing-prototypes]
      drivers/target/loopback/tcm_loop.c:1378:6: warning: no previous prototype for ‘tcm_loop_drop_scsi_hba’ [-Wmissing-prototypes]
      Signed-off-by: NRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f0a6c693
  17. 17 10月, 2013 6 次提交
  18. 11 9月, 2013 1 次提交
  19. 08 7月, 2013 1 次提交
  20. 10 4月, 2013 1 次提交
  21. 03 10月, 2012 1 次提交
  22. 18 9月, 2012 2 次提交
  23. 17 7月, 2012 2 次提交
  24. 15 4月, 2012 1 次提交
  25. 18 3月, 2012 1 次提交
    • N
      loopback: Fix transport_generic_allocate_tasks error handling · ee9b866a
      Nicholas Bellinger 提交于
      This patch addresses a tcm_loop bug with transport_generic_allocate_tasks()
      return checking in tcm_loop_submission_work() where other non zero return
      codes (including -EBUSY for reservation conflicts) are incorrectly falling
      through to transport_generic_map_mem_to_cmd() -> transport_handle_cdb_direct().
      
      This bug was introduced into target-pending/for-next-merge with the following
      for-3.4 commit:
      
      commit 16786454
      Author: Christoph Hellwig <hch@infradead.org>
      Date:   Thu Feb 2 17:04:42 2012 -0500
      
          tcm_loop: switch to using transport_handle_cdb_direct
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ee9b866a
  26. 16 3月, 2012 1 次提交