1. 31 5月, 2015 1 次提交
  2. 15 4月, 2015 1 次提交
    • C
      target: simplify the target template registration API · 9ac8928e
      Christoph Hellwig 提交于
      Instead of calling target_fabric_configfs_init() +
      target_fabric_configfs_register() / target_fabric_configfs_deregister()
      target_fabric_configfs_free() from every target driver, rewrite the API
      so that we have simple register/unregister functions that operate on
      a const operations vector.
      
      This patch also fixes a memory leak in several target drivers. Several
      target drivers namely called target_fabric_configfs_deregister()
      without calling target_fabric_configfs_free().
      
      A large part of this patch is based on earlier changes from
      Bart Van Assche <bart.vanassche@sandisk.com>.
      
      (v2: Add a new TF_CIT_SETUP_DRV macro so that the core configfs code
      can declare attributes as either core only or for drivers)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9ac8928e
  3. 17 10月, 2013 1 次提交
  4. 04 7月, 2013 1 次提交
  5. 24 3月, 2011 1 次提交
    • N
      [SCSI] target: add initial statistics · 12d23384
      Nicholas Bellinger 提交于
      This patch adds a target_core_mib.c statistics conversion for
      backend context struct se_subsystem_dev + struct se_device config_group
      based statistics in target_core_device.c using CONFIGFS_EATTR()
      based struct config_item_types from target_core_stat.c code.
      
      The conversion from backend /proc/scsi_target/mib/ context output to configfs
      default groups+attributes include scsi_dev, scsi_lu, and scsi_tgt_dev output
      from within individual:
      
      	/sys/kernel/config/target/core/$HBA/DEV/
      
      The legacy procfs output now appear as individual configfs attributes under:
      
      *) $HBA/$DEV/statistics/scsi_dev:
      
      |-- indx
      |-- inst
      |-- ports
      `-- role
      
      *) $HBA/$DEV/statistics/scsi_lu:
      
      |-- creation_time
      |-- dev
      |-- dev_type
      |-- full_stat
      |-- hs_num_cmds
      |-- indx
      |-- inst
      |-- lu_name
      |-- lun
      |-- num_cmds
      |-- prod
      |-- read_mbytes
      |-- resets
      |-- rev
      |-- state_bit
      |-- status
      |-- vend
      `-- write_mbytes
      
      *) $HBA/$DEV/statistics/scsi_tgt_dev:
      
      |-- indx
      |-- inst
      |-- non_access_lus
      |-- num_lus
      |-- resets
      `-- status
      
      The conversion from backend /proc/scsi_target/mib/ context output to configfs
      default groups+attributes include scsi_port, scsi_tgt_port and scsi_transport
      output from within individual:
      
      	/sys/kernel/config/target/fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/
      
      The legacy procfs output now appear as individual configfs attributes under:
      
      *) fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/scsi_port
      
      |-- busy_count
      |-- dev
      |-- indx
      |-- inst
      `-- role
      
      *) fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/scsi_tgt_port
      
      |-- dev
      |-- hs_in_cmds
      |-- in_cmds
      |-- indx
      |-- inst
      |-- name
      |-- port_index
      |-- read_mbytes
      `-- write_mbytes
      
      *) fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/scsi_transport
      
      |-- dev_name
      |-- device
      |-- indx
      `-- inst
      
      The conversion from backend /proc/scsi_target/mib/ context output to configfs
      default groups+attributes include scsi_att_intr_port and scsi_auth_intr output
      from within individual:
      
      	/sys/kernel/config/target/fabric/$WWN/tpgt_$TPGT/acls/$INITIATOR_WWN/lun_$LUN_ID/statistics/
      
      The legacy procfs output now appear as individual configfs attributes under:
      
      *) acls/$INITIATOR_WWN/lun_$LUN_ID/statistics/scsi_att_intr_port
      
      |-- dev
      |-- indx
      |-- inst
      |-- port
      |-- port_auth_indx
      `-- port_ident
      
      *) acls/$INITIATOR_WWN/lun_$LUN_ID/statistics/scsi_auth_intr
      
      |-- att_count
      |-- creation_time
      |-- dev
      |-- dev_or_port
      |-- hs_num_cmds
      |-- indx
      |-- inst
      |-- intr_name
      |-- map_indx
      |-- num_cmds
      |-- port
      |-- read_mbytes
      |-- row_status
      `-- write_mbytes
      
      Also, this includes adding struct target_fabric_configfs_template->
      tfc_wwn_fabric_stats_cit and ->tfc_tpg_nacl_stat_cit respectively for
      use during target_core_fabric_configfs.c:target_fabric_setup_cits()
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      12d23384
  6. 15 1月, 2011 1 次提交
    • N
      [SCSI] target: Add LIO target core v4.0.0-rc6 · c66ac9db
      Nicholas Bellinger 提交于
      LIO target is a full featured in-kernel target framework with the
      following feature set:
      
      High-performance, non-blocking, multithreaded architecture with SIMD
      support.
      
      Advanced SCSI feature set:
      
          * Persistent Reservations (PRs)
          * Asymmetric Logical Unit Assignment (ALUA)
          * Protocol and intra-nexus multiplexing, load-balancing and failover (MC/S)
          * Full Error Recovery (ERL=0,1,2)
          * Active/active task migration and session continuation (ERL=2)
          * Thin LUN provisioning (UNMAP and WRITE_SAMExx)
      
      Multiprotocol target plugins
      
      Storage media independence:
      
          * Virtualization of all storage media; transparent mapping of IO to LUNs
          * No hard limits on number of LUNs per Target; maximum LUN size ~750 TB
          * Backstores: SATA, SAS, SCSI, BluRay, DVD, FLASH, USB, ramdisk, etc.
      
      Standards compliance:
      
          * Full compliance with IETF (RFC 3720)
          * Full implementation of SPC-4 PRs and ALUA
      
      Significant code cleanups done by Christoph Hellwig.
      
      [jejb: fix up for new block bdev exclusive interface. Minor fixes from
       Randy Dunlap and Dan Carpenter.]
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      c66ac9db