1. 11 1月, 2013 1 次提交
  2. 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
  3. 05 12月, 2012 1 次提交
  4. 16 11月, 2012 1 次提交
    • 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
  5. 07 11月, 2012 5 次提交
  6. 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
  7. 22 8月, 2012 1 次提交
  8. 17 7月, 2012 9 次提交
  9. 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
  10. 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
  11. 07 5月, 2012 10 次提交
  12. 15 4月, 2012 3 次提交
  13. 16 3月, 2012 2 次提交
  14. 11 3月, 2012 3 次提交
    • 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: 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