1. 02 12月, 2014 1 次提交
  2. 03 11月, 2014 1 次提交
  3. 04 10月, 2014 2 次提交
    • N
      target: Add force_pr_aptpl device attribute · 92404e60
      Nicholas Bellinger 提交于
      This patch adds a force_pr_aptpl device attribute used to force SPC-3 PR
      Activate Persistence across Target Power Loss (APTPL) operation.  This
      makes PR metadata write-out occur during state change regardless if new
      PERSISTENT_RESERVE_OUT CDBs have their APTPL feature bit set.
      
      This is useful during H/A failover in active/passive setups where all PR
      state is being re-created on a different node, driven by configfs backend
      device + export layout and pre-loaded $DEV/pr/res_aptpl_metadata.
      
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      92404e60
    • N
      target: Fix APTPL metadata handling for dynamic MappedLUNs · e2480563
      Nicholas Bellinger 提交于
      This patch fixes a bug in handling of SPC-3 PR Activate Persistence
      across Target Power Loss (APTPL) logic where re-creation of state for
      MappedLUNs from dynamically generated NodeACLs did not occur during
      I_T Nexus establishment.
      
      It adds the missing core_scsi3_check_aptpl_registration() call during
      core_tpg_check_initiator_node_acl() -> core_tpg_add_node_to_devs() in
      order to replay any pre-loaded APTPL metadata state associated with
      the newly connected SCSI Initiator Port.
      
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      e2480563
  4. 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
  5. 18 9月, 2014 1 次提交
  6. 18 4月, 2014 1 次提交
  7. 13 2月, 2014 1 次提交
  8. 21 11月, 2013 1 次提交
  9. 11 9月, 2013 2 次提交
  10. 04 7月, 2013 1 次提交
    • N
      target: Make core_scsi3_update_and_write_aptpl return sense_reason_t · 8a391857
      Nicholas Bellinger 提交于
      Fix up sense_reason_t breakage in core_scsi3_update_and_write_aptpl()
      from recent conversion to use local scope memory allocation.
      
      Reported as sparse warnings: (new ones prefixed by >>) by Fengguang:
      
      >> drivers/target/target_core_pr.c:2069:57: sparse: incorrect type in
      >> return expression (different base types)
         drivers/target/target_core_pr.c:2069:57:    expected restricted sense_reason_t
         drivers/target/target_core_pr.c:2069:57:    got int
      >> drivers/target/target_core_pr.c:2179:21: sparse: incorrect type in
      >> assignment (different base types)
         drivers/target/target_core_pr.c:2179:21:    expected restricted sense_reason_t [assigned] [usertype] ret
         drivers/target/target_core_pr.c:2179:21:    got int
      >> drivers/target/target_core_pr.c:2197:13: sparse: incorrect type in
      >> assignment (different base types)
         drivers/target/target_core_pr.c:2197:13:    expected restricted sense_reason_t [assigned] [usertype] ret
         drivers/target/target_core_pr.c:2197:13:    got int
         drivers/target/target_core_pr.c:1245:28: sparse: context imbalance in '__core_scsi3_free_registration' - unexpected unlock
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      8a391857
  11. 14 6月, 2013 11 次提交
  12. 26 2月, 2013 1 次提交
  13. 11 1月, 2013 1 次提交
  14. 28 11月, 2012 1 次提交
  15. 08 11月, 2012 1 次提交
  16. 07 11月, 2012 3 次提交
    • C
      target: pass sense_reason as a return value · de103c93
      Christoph Hellwig 提交于
      Pass the sense reason as an explicit return value from the I/O submission
      path instead of storing it in struct se_cmd and using negative return
      values.  This cleans up a lot of the code pathes, and with the sparse
      annotations for the new sense_reason_t type allows for much better
      error checking.
      
      (nab: Convert spc_emulate_modesense + spc_emulate_modeselect to use
            sense_reason_t with Roland's MODE SELECT changes)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      de103c93
    • C
      target: simplify reservations code · d977f437
      Christoph Hellwig 提交于
      We do not support host-level reservations for the pscsi backend, and all
      virtual backends are newere than SCSI-2, so just make the combined
      SPC-3 + SCSI-2 support the only supported variant and kill the switches
      for the different implementations, given that this code handles the no-op
      version just fine.
      
      (hch: Update DRF_SPC2_RESERVATIONS lock usage)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      d977f437
    • C
      target: kill struct se_subsystem_dev · 0fd97ccf
      Christoph Hellwig 提交于
      Simplify the code a lot by killing the superflous struct se_subsystem_dev.
      Instead se_device is allocated early on by the backend driver, which allocates
      it as part of its own per-device structure, borrowing the scheme that is for
      example used for inode allocation.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      0fd97ccf
  17. 18 9月, 2012 2 次提交
  18. 08 9月, 2012 1 次提交
  19. 17 7月, 2012 2 次提交
  20. 15 5月, 2012 1 次提交
    • B
      target: Fix SPC-2 RELEASE bug for multi-session iSCSI client setups · edc318d9
      Bernhard Kohl 提交于
      This patch addresses a bug in a special case for target core SPC-2 RELEASE
      logic where the same physical client (eg: iSCSI InitiatorName) with
      differing iSCSI session identifiers (ISID) is allowed to incorrectly release
      the same client's SPC-2 reservation from the non reservation holding path.
      
      Note this bug is specific to iscsi-target w/ SPC-2 reservations, and
      with the default enforce_pr_isids=1 device attr setting in target-core
      controls if a InitiatorName + different ISID reservations are handled
      the same as a single iSCSI client entity.
      Signed-off-by: NBernhard Kohl <bernhard.kohl@gmx.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      edc318d9
  21. 07 5月, 2012 1 次提交
  22. 15 4月, 2012 1 次提交
  23. 16 3月, 2012 2 次提交