1. 17 7月, 2012 8 次提交
  2. 13 6月, 2012 1 次提交
  3. 17 5月, 2012 1 次提交
    • N
      target: Add MI_REPORT_TARGET_PGS ext. header + implict_trans_secs attribute · 5b9a4d72
      Nicholas Bellinger 提交于
      This patch adds support for ALUA MI_REPORT_TARGET_PGS extended header
      format defined within SPC-4.  It changes target core ALUA emulation logic
      within target_emulate_report_target_port_groups() to support both the
      extended and original length only header formats.
      
      It includes adding a new 'implict_trans_secs' attribute for each ALUA
      target port group to control the value returned to the application client
      for an recommended implict translation timeout in seconds.  By default
      this value is currently set to zero, and limited up to 255 by virtue of
      using a single byte in the extended header format.
      
      This value is used by target_emulate_report_target_port_groups() within
      the extended header logic to set IMPLICIT TRANSITION TIME as defined by
      spc4r30.
      
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Rob Evers <revers@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5b9a4d72
  4. 12 5月, 2012 1 次提交
  5. 10 5月, 2012 1 次提交
    • N
      target: Remove max_sectors device attribute for modern se_task less code · 11e764bd
      Nicholas Bellinger 提交于
      This patch removes the original usage of dev_attr->max_sectors in favor of
      dev_attr->hw_max_sectors that is now being enforced by target core from
      within transport_generic_cmd_sequencer() for SCF_SCSI_DATA_SG_IO_CDB ops.
      
      After the recent se_task removal patches from hch, this value for IBLOCK
      backends being set via configfs by userspace from an saved max_sectors
      value that is turning out to be problematic, so it makes sense to go ahead
      and remove this now legacy attribute all-together.
      
      This patch also continues to make se_dev_set_default_attribs() do
      (sectors / block_size) alignment for what actually get used by
      target_core_mod to be safe here, following the same alignment currently
      used by fabric_max_sectors.
      Reported-by: NAndy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      11e764bd
  6. 07 5月, 2012 11 次提交
  7. 15 4月, 2012 4 次提交
  8. 16 3月, 2012 2 次提交
  9. 11 3月, 2012 6 次提交
    • N
      target: Bump core version to v4.1.0-rc2-ml + fabric versions · 9765b1f3
      Nicholas Bellinger 提交于
      Bump core version to v4.1.0-rc2-ml, and for versions from the
      following mainline fabric modules:
      
      loopback: v2.1-rc2
      tcm_fc: v0.4
      iscsi-target: v4.1.0-rc2
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9765b1f3
    • 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: Convert se_node_acl->acl_group removal to use ->acl_kref · 337c0607
      Nicholas Bellinger 提交于
      This patch converts core_tpg_del_initiator_node_acl() shutdown from configfs
      context to use se_node_acl->acl_kref and ->acl_free_comp in order to wait for
      outstanding fabric callbacks to complete via transport_deregister_session()
      callbacks before waking ->acl_free_comp from the last ->acl_kref put.
      
      It also changes core_tpg_del_initiator_node_acl() to setup a local sess_list
      with target_get_session() + acl->acl_stop = 1 for active sessions that will
      be shutdown, and changes transport_deregister_session_configfs() to check
      for ->acl_stop usage.
      
      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>
      337c0607
    • 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_node_acl->acl_free_comp for NodeACL release path · 01468346
      Nicholas Bellinger 提交于
      Add se_node_acl->acl_free_comp for NodeACL release path to wait for outstanding
      fabric session shutdown to complete in transport_deregister_session() before
      finishing NodeACL release from configfs process context.
      
      Also make transport_deregister_session() clear the comp_nacl bit
      to skip se_node_acl->acl_free_comp completion for dynamically generated
      NodeACL during fabric 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>
      01468346
    • 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
  10. 26 2月, 2012 5 次提交
    • N
      target: Allow target_submit_tmr interrupt context + pass ABORT_TASK tag · c0974f89
      Nicholas Bellinger 提交于
      This patch allows target_submit_tmr() to pass gfp_t for se_cmd->se_tmr_req
      allocation, and also set up se_cmd->se_tmr_req->ref_task_tag for passed
      tag with TMR_ABORT_TASK.
      
      Also update tcm_fc(fcoe) parameter usgae and add ref_task_tag FIXME
      for TMR_ABORT_TASK usage,
      
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Kiran Patil <kiran.patil@intel.com>
      Cc: Arun Easi <arun.easi@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c0974f89
    • N
      target: Fix target_submit_tmr se_tmr_req allocation failures · c7042cae
      Nicholas Bellinger 提交于
      This patch makes target_submit_tmr() se_tmr_req allocation occur before
      target_get_sess_cmd(), and changes target_submit_tmr() to return a failure
      w/ non zero status to the fabric caller upon core_tmr_alloc_req() failure.
      
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Kiran Patil <kiran.patil@intel.com>
      Cc: Arun Easi <arun.easi@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c7042cae
    • R
      target: Untangle front-end and back-end meanings of max_sectors attribute · 015487b8
      Roland Dreier 提交于
      se_dev_attrib.max_sectors currently has two independent meanings:
      
       - It is reported in the block limits VPD page as the maximum transfer
         length, ie the largest IO that the front-end (fabric) can handle.
         Also the target core doesn't enforce this maximum transfer length.
      
       - It is used to hold the size of the largest IO that the back-end can
         handle, so we know when to split SCSI commands into multiple tasks.
      
      Fix this by adding a new se_dev_attrib.fabric_max_sectors to hold the
      maximum transfer length, and checking incoming IOs against that limit.
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      015487b8
    • R
      target: Fix up handling of short INQUIRY buffers · d95b8246
      Roland Dreier 提交于
      If the initiator sends us an INQUIRY command with an allocation length
      that's shorter than what we want to return, we're simply supposed to
      truncate our response and return what the initiator gave us space for,
      without signaling any error.  Current target code has various tests that
      don't fill out the full response if the buffer is too short and
      sometimes return errors incorrectly.
      
      Fix this up by allocating a bounce buffer for INQUIRY responses if we
      need to, ie if we have cmd->data_length too small as well as
      SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC set in cmd->se_cmd_flags -- for most
      fabrics, we always allocate at least a full page, but for tcm_loop we
      may have a small buffer coming directly from the SCSI stack.
      
      This lets us delete a lot of cmd->data_length checking, and also makes
      our INQUIRY handling correct per SPC in a lot more cases.
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d95b8246
    • N
      target: Add SCF_ACK_KREF flag for acknowledgement kref · 86715569
      Nicholas Bellinger 提交于
      When TARGET_SCF_ACK_KREF is in use with target_submit_cmd() for
      setting the extra acknowledgement reference to se_cmd->cmd_kref,
      go ahead and set SCF_ACK_KREF in order to be used later by
      abort task.
      Reported-by: NRoland Dreier <roland@purestorage.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      86715569