aboutsummaryrefslogtreecommitdiffstats
path: root/include/target/target_core_configfs.h
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2011-03-14 07:06:11 -0400
committerJames Bottomley <James.Bottomley@suse.de>2011-03-23 12:36:50 -0400
commit12d233842987d9972957419e427987b94f7bd7b4 (patch)
treeb3d08872b37f08aac3a9ec66e3fef49fbedb0f19 /include/target/target_core_configfs.h
parent15fb48cc40be170423fe8ddd17666aa6175315e3 (diff)
[SCSI] target: add initial statistics
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: Nicholas A. Bellinger <nab@linux-iscsi.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/target/target_core_configfs.h')
-rw-r--r--include/target/target_core_configfs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/target/target_core_configfs.h b/include/target/target_core_configfs.h
index 40e6e740527c..612509592ffd 100644
--- a/include/target/target_core_configfs.h
+++ b/include/target/target_core_configfs.h
@@ -14,10 +14,12 @@ extern void target_fabric_configfs_deregister(struct target_fabric_configfs *);
14struct target_fabric_configfs_template { 14struct target_fabric_configfs_template {
15 struct config_item_type tfc_discovery_cit; 15 struct config_item_type tfc_discovery_cit;
16 struct config_item_type tfc_wwn_cit; 16 struct config_item_type tfc_wwn_cit;
17 struct config_item_type tfc_wwn_fabric_stats_cit;
17 struct config_item_type tfc_tpg_cit; 18 struct config_item_type tfc_tpg_cit;
18 struct config_item_type tfc_tpg_base_cit; 19 struct config_item_type tfc_tpg_base_cit;
19 struct config_item_type tfc_tpg_lun_cit; 20 struct config_item_type tfc_tpg_lun_cit;
20 struct config_item_type tfc_tpg_port_cit; 21 struct config_item_type tfc_tpg_port_cit;
22 struct config_item_type tfc_tpg_port_stat_cit;
21 struct config_item_type tfc_tpg_np_cit; 23 struct config_item_type tfc_tpg_np_cit;
22 struct config_item_type tfc_tpg_np_base_cit; 24 struct config_item_type tfc_tpg_np_base_cit;
23 struct config_item_type tfc_tpg_attrib_cit; 25 struct config_item_type tfc_tpg_attrib_cit;
@@ -27,7 +29,9 @@ struct target_fabric_configfs_template {
27 struct config_item_type tfc_tpg_nacl_attrib_cit; 29 struct config_item_type tfc_tpg_nacl_attrib_cit;
28 struct config_item_type tfc_tpg_nacl_auth_cit; 30 struct config_item_type tfc_tpg_nacl_auth_cit;
29 struct config_item_type tfc_tpg_nacl_param_cit; 31 struct config_item_type tfc_tpg_nacl_param_cit;
32 struct config_item_type tfc_tpg_nacl_stat_cit;
30 struct config_item_type tfc_tpg_mappedlun_cit; 33 struct config_item_type tfc_tpg_mappedlun_cit;
34 struct config_item_type tfc_tpg_mappedlun_stat_cit;
31}; 35};
32 36
33struct target_fabric_configfs { 37struct target_fabric_configfs {