1. 31 5月, 2013 1 次提交
  2. 21 5月, 2013 1 次提交
  3. 25 4月, 2013 1 次提交
  4. 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
  5. 07 11月, 2012 1 次提交
    • 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
  6. 03 10月, 2012 1 次提交
  7. 18 9月, 2012 2 次提交
  8. 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
  9. 17 7月, 2012 5 次提交
  10. 13 6月, 2012 1 次提交
  11. 12 5月, 2012 1 次提交
  12. 15 4月, 2012 2 次提交
  13. 11 3月, 2012 3 次提交
    • N
      target: Drop unused legacy target_core_fabric_ops API callers · c7ec05c8
      Nicholas Bellinger 提交于
      This patch drops the following unused legacy API callers from target_core_fabric.h:
      
      *) TFO->fall_back_to_erl0()
      *) TFO->stop_session()
      *) TFO->sess_logged_in()
      *) TFO->is_state_remove()
      
      This patch also removes the stub usage in loopback, tcm_fc, iscsi_target,
      and ib_srpt fabric modules.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c7ec05c8
    • N
      target: Add se_node_acl->acl_kref for ->acl_free_comp usage · afb999ff
      Nicholas Bellinger 提交于
      This patch adds se_node_acl->acl_kref for use with ->acl_free_comp
      during explict se_node_acl release.  It adds kref_init() during
      se_node_acl setup, kref_get() during __transport_register_session()
      -> target_put_nacl() with existing transport_deregister_session()
      fabric callback usage.
      
      It also moves transport_free_session() to release *se_sess memory
      after target_put_nacl() execution in transport_deregister_session()
      
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Joern Engel <joern@logfs.org>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      afb999ff
    • N
      target: Add se_sess->sess_kref + get/put helpers · 41ac82b6
      Nicholas Bellinger 提交于
      This patch adds basic se_session->sess_kref and get/put helpers for fabric
      session reference counting.  It sets the initial kref in transport_init_session()
      and adds a target_release_session() callback to invoke TFO->close_session()
      for final session shutdown.
      
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Joern Engel <joern@logfs.org>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      41ac82b6
  14. 26 2月, 2012 5 次提交
  15. 07 2月, 2012 1 次提交
    • A
      target: Change target_submit_cmd() to return void · 1edcdb49
      Andy Grover 提交于
      Retval not very useful, and may even be harmful. Once submitted, fabrics
      should expect a sense error if anything goes wrong. All fabrics checking
      of this retval are useless or broken:
      
      fc checks it just to emit more debug output.
      ib_srpt trickles retval up, then it is ignored.
      qla2xxx trickles it up, which then causes a bug because the abort goto
      in qla_target.c thinks cmd hasn't been sent to target.
      
      Just returning nothing is best.
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      1edcdb49
  16. 14 12月, 2011 3 次提交
    • N
      target: Remove TFO->check_release_cmd() fabric API caller · ec54cc08
      Nicholas Bellinger 提交于
      Remove the now unused target_core_fabric_ops->check_release_cmd() as
      target_core handles this directly for se_cmd->cmd_kref objects now.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ec54cc08
    • N
      target: Add target_submit_cmd() for process context fabric submission · a6360785
      Nicholas Bellinger 提交于
      This patch adds a target_submit_cmd() caller that can be used by fabrics
      to submit an uninitialized se_cmd descriptor to an struct se_session +
      unpacked_lun from workqueue process context.  This call will invoke the
      following steps:
      
      - transport_init_se_cmd() to setup se_cmd specific pointers
      - Obtain se_cmd->cmd_kref references with target_get_sess_cmd()
      - set se_cmd->t_tasks_bidi
      - transport_lookup_cmd_lun() to setup struct se_cmd->se_lun from
        the passed unpacked_lun
      - transport_generic_allocate_tasks() to setup the passed *cdb, and
      - transport_handle_cdb_direct() handle READ dispatch or WRITE
        ready-to-transfer callback to fabric
      
      v2 changes from hch feedback:
      
      *) Add target_sc_flags_table for target_submit_cmd flags
      *) Rename bidi parameter to flags, add TARGET_SCF_BIDI_OP
      *) Convert checks to BUG_ON
      *) Add out_check_cond for transport_send_check_condition_and_sense
         usage
      
      v3 changes:
      
      *) Add TARGET_SCF_ACK_KREF for target_submit_cmd into
         target_get_sess_cmd to determine when the fabric caller is expecting
         a second kref_put() from fabric packet acknowledgement.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      a6360785
    • C
      target: header reshuffle, part2 · c4795fb2
      Christoph Hellwig 提交于
      This reorganized the headers under include/target into:
      
       - target_core_base.h stays as is with all target-wide data stuctures and defines
       - target_core_backend.h contains the whole interface to I/O backends
       - target_core_fabric.h contains the whole interface to fabric modules
      
      Except for those only the various configfs macro headers stay around.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c4795fb2
  17. 04 11月, 2011 1 次提交
    • N
      target: Add generic active I/O shutdown logic · a17f091d
      Nicholas Bellinger 提交于
      This patch adds the initial pieces of generic active I/O shutdown logic.
      This is intended to be a 'opt-in' feature for fabric modules that
      includes the following functions to provide a mechinism for fabric
      modules to track se_cmd via se_session->sess_cmd_list:
      
      *) target_get_sess_cmd() - Add se_cmd to sess->sess_cmd_list, called
         from fabric module incoming I/O path.
      *) target_put_sess_cmd() - Check for completion or drop se_cmd from
         ->sess_cmd_list
      *) target_splice_sess_cmd_list() - Splice active I/O list from
         ->sess_cmd_list to ->sess_wait_list, can called with HW fabric
         lock held.
      *) target_wait_for_sess_cmds() - Walk ->sess_wait_list waiting on
         individual ->cmd_wait_comp.  Optional transport_wait_for_tasks()
         call.
      
      target_splice_sess_cmd_list() is allowed to be called under HW fabric
      lock, and performs the splice into se_sess->sess_wait_list and set
      se_cmd->cmd_wait_set.  Then target_wait_for_sess_cmds() walks the list
      waiting for individual target_put_sess_cmd() fabric callbacks to
      complete.
      
      It also adds TFO->check_release_cmd() to split the completion and memory
      release calls, where a fabric module uses target_put_sess_cmd() to check
      for I/O completion during session shutdown.  This is currently pushed out
      into fabric modules as current fabric code may sleep here waiting for
      TFO->check_stop_free() to complete in main response path, and because
      target_wait_for_sess_cmds() calling TFO->release_cmd() to free fabric
      descriptor memory directly.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      a17f091d
  18. 02 11月, 2011 1 次提交
    • N
      target: Make TFO->check_stop_free return free status · 88dd9e26
      Nicholas Bellinger 提交于
      This patch converts target_core_fabric_ops->check_stop_free() usage in
      transport_cmd_check_stop() and associated fabric module usage to
      return '1' when the passed se_cmd has been released directly within
      ->check_stop_free(), or return '0' when the passed se_cmd has not
      been released.
      
      This addresses an issue where transport_cmd_finish_abort() ->
      transport_cmd_check_stop_to_fabric() was leaking descriptors during
      LUN_RESET for modules using ->check_stop_free(), but not directly
      releasing se_cmd in all cases.
      
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@risingtidesystems.com>
      88dd9e26
  19. 23 8月, 2011 1 次提交
    • N
      target: Make standard INQUIRY return 'not connected' for tpg_virt_lun0 · 052605c6
      Nicholas Bellinger 提交于
      This patch changes target_emulate_inquiry_std() to set the 'not connected'
      (0x35) bit in standard INQUIRY response data when we are processing a
      request to a virtual LUN=0 mapping from struct se_device *g_lun0_dev that
      have been setup for us in transport_lookup_cmd_lun().
      
      This addresses an issue where qla2xxx FC clients need to be able
      to create demo-mode I_T FC Nexuses by default, but should not be
      exposing the default set of TPG LUNs to all FC clients.  This includes
      adding an new optional target_core_fabric_ops->tpg_check_demo_mode_login_only()
      caller to allow demo_mode nexuses to skip the old default of bulding
      a demo-mode MappedLUNs list via core_tpg_add_node_to_devs().
      
      (roland: Add missing tpg_check_demo_mode_login_only check in core_dev_add_lun)
      Reported-by: NRoland Dreier <roland@purestorage.com>
      Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@risingtidesystems.com>
      052605c6
  20. 22 7月, 2011 3 次提交
    • C
      target: merge release_cmd methods · 35462975
      Christoph Hellwig 提交于
      The release_cmd_to_pool and release_cmd_direct methods are always the same.
      Merge them into a single release_cmd method, and clean up the fallout.
      
      (nab: fix breakage in transport_generic_free_cmd() parameter build breakage
       in drivers/target/tcm_fc/tfc_cmd.c)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      35462975
    • C
    • A
      target: Updates from AGrover and HCH (round 3) · a1d8b49a
      Andy Grover 提交于
      This patch contains a squashed version of third round series cleanups,
      improvements ,and simplfications from Andy and Christoph ahead of the
      heavy lifting between round 3 -> 4 for the target core SGL conversion.
      
      This include cleanups to the main target I/O path and other miscellaneous
      updates.
      
      target: Replace custom sg<->buf functions with lib funcs
      target: Simplify sector limiting code
      target: get_cdb should never return NULL
      target: Simplify transport_memcpy_se_mem_read_contig
      target: Use assignment rather than increment for t_task_cdbs
      target: Don't pass dma_size to generic_get_mem
      target: Pass sg with type scatterlist in transport_map_sg_to_mem
      target: Move task_sg_num next to task_sg in struct se_task
      target: inline struct se_transport_task into struct se_cmd
      target: Change name & semantics of transport_get_sectors()
      target: Remove unused members of se_cmd
      target: Rename se_cmd.t_task_cdbs to t_task_list_num
      target: Fix some spelling
      target: Remove unused var from transport_generic_do_tmr
      target: map_sg_to_mem: return sg_count in return value
      target/pscsi: Use min_t for sector limits
      target/pscsi: Unused param for pscsi_get_bio()
      target: Rename get_cdb_count to allocate_tasks
      target: Make transport_generic_new_cmd() available for iscsi-target
      target: Remove fabric callback to allocate iovecs
      target: Fix transport_generic_new_cmd WRITE comment
      
      (hch: Use __GFP_ZERO usage for alloc_pages() usage)
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      a1d8b49a
  21. 27 5月, 2011 1 次提交
  22. 25 5月, 2011 1 次提交
  23. 31 3月, 2011 1 次提交
  24. 24 3月, 2011 1 次提交