diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-16 12:07:00 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-16 12:07:00 -0500 |
| commit | a2640111d5edb3f4e6dd6089c0dbddc7590110b4 (patch) | |
| tree | 2c7ddab035a844b77e03567035f25d8cfaadad6a /include | |
| parent | 0d6e82e7e0b6a192ec9c875d9ed08ad9e43c7c2f (diff) | |
| parent | 1621dbbdb90f42b7bd14aea1c44ee49b558d1b1a (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] qla2xxx: Return DID_NO_CONNECT when FC device is lost.
[SCSI] mptfusion: Bump version 03.04.18
[SCSI] mptfusion: Fix Incorrect return value in mptscsih_dev_reset
[SCSI] mptfusion: mptctl_release is required in mptctl.c
[SCSI] target: fix use after free detected by SLUB poison
[SCSI] target: Remove procfs based target_core_mib.c code
[SCSI] target: Fix SCF_SCSI_CONTROL_SG_IO_CDB breakage
[SCSI] target: Fix top-level configfs_subsystem default_group shutdown breakage
[SCSI] target: fixed missing lock drop in error path
[SCSI] target: Fix demo-mode MappedLUN shutdown UA/PR breakage
[SCSI] target/iblock: Fix failed bd claim NULL pointer dereference
[SCSI] target: iblock/pscsi claim checking for NULL instead of IS_ERR
[SCSI] scsi_debug: Fix 32-bit overflow in do_device_access causing memory corruption
[SCSI] qla2xxx: Change from irq to irqsave with host_lock
[SCSI] qla2xxx: Fix race that could hang kthread_stop()
Diffstat (limited to 'include')
| -rw-r--r-- | include/target/target_core_base.h | 28 | ||||
| -rw-r--r-- | include/target/target_core_transport.h | 2 |
2 files changed, 24 insertions, 6 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 07fdfb6b9a9a..0828b6c8610a 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | #include <scsi/scsi_cmnd.h> | 8 | #include <scsi/scsi_cmnd.h> |
| 9 | #include <net/sock.h> | 9 | #include <net/sock.h> |
| 10 | #include <net/tcp.h> | 10 | #include <net/tcp.h> |
| 11 | #include "target_core_mib.h" | ||
| 12 | 11 | ||
| 13 | #define TARGET_CORE_MOD_VERSION "v4.0.0-rc6" | 12 | #define TARGET_CORE_MOD_VERSION "v4.0.0-rc6" |
| 14 | #define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT)) | 13 | #define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT)) |
| @@ -195,6 +194,21 @@ typedef enum { | |||
| 195 | SAM_TASK_ATTR_EMULATED | 194 | SAM_TASK_ATTR_EMULATED |
| 196 | } t10_task_attr_index_t; | 195 | } t10_task_attr_index_t; |
| 197 | 196 | ||
| 197 | /* | ||
| 198 | * Used for target SCSI statistics | ||
| 199 | */ | ||
| 200 | typedef enum { | ||
| 201 | SCSI_INST_INDEX, | ||
| 202 | SCSI_DEVICE_INDEX, | ||
| 203 | SCSI_AUTH_INTR_INDEX, | ||
| 204 | SCSI_INDEX_TYPE_MAX | ||
| 205 | } scsi_index_t; | ||
| 206 | |||
| 207 | struct scsi_index_table { | ||
| 208 | spinlock_t lock; | ||
| 209 | u32 scsi_mib_index[SCSI_INDEX_TYPE_MAX]; | ||
| 210 | } ____cacheline_aligned; | ||
| 211 | |||
| 198 | struct se_cmd; | 212 | struct se_cmd; |
| 199 | 213 | ||
| 200 | struct t10_alua { | 214 | struct t10_alua { |
| @@ -578,8 +592,6 @@ struct se_node_acl { | |||
| 578 | spinlock_t stats_lock; | 592 | spinlock_t stats_lock; |
| 579 | /* Used for PR SPEC_I_PT=1 and REGISTER_AND_MOVE */ | 593 | /* Used for PR SPEC_I_PT=1 and REGISTER_AND_MOVE */ |
| 580 | atomic_t acl_pr_ref_count; | 594 | atomic_t acl_pr_ref_count; |
| 581 | /* Used for MIB access */ | ||
| 582 | atomic_t mib_ref_count; | ||
| 583 | struct se_dev_entry *device_list; | 595 | struct se_dev_entry *device_list; |
| 584 | struct se_session *nacl_sess; | 596 | struct se_session *nacl_sess; |
| 585 | struct se_portal_group *se_tpg; | 597 | struct se_portal_group *se_tpg; |
| @@ -595,8 +607,6 @@ struct se_node_acl { | |||
| 595 | } ____cacheline_aligned; | 607 | } ____cacheline_aligned; |
| 596 | 608 | ||
| 597 | struct se_session { | 609 | struct se_session { |
| 598 | /* Used for MIB access */ | ||
| 599 | atomic_t mib_ref_count; | ||
| 600 | u64 sess_bin_isid; | 610 | u64 sess_bin_isid; |
| 601 | struct se_node_acl *se_node_acl; | 611 | struct se_node_acl *se_node_acl; |
| 602 | struct se_portal_group *se_tpg; | 612 | struct se_portal_group *se_tpg; |
| @@ -806,7 +816,6 @@ struct se_hba { | |||
| 806 | /* Virtual iSCSI devices attached. */ | 816 | /* Virtual iSCSI devices attached. */ |
| 807 | u32 dev_count; | 817 | u32 dev_count; |
| 808 | u32 hba_index; | 818 | u32 hba_index; |
| 809 | atomic_t dev_mib_access_count; | ||
| 810 | atomic_t load_balance_queue; | 819 | atomic_t load_balance_queue; |
| 811 | atomic_t left_queue_depth; | 820 | atomic_t left_queue_depth; |
| 812 | /* Maximum queue depth the HBA can handle. */ | 821 | /* Maximum queue depth the HBA can handle. */ |
| @@ -845,6 +854,12 @@ struct se_lun { | |||
| 845 | 854 | ||
| 846 | #define SE_LUN(c) ((struct se_lun *)(c)->se_lun) | 855 | #define SE_LUN(c) ((struct se_lun *)(c)->se_lun) |
| 847 | 856 | ||
| 857 | struct scsi_port_stats { | ||
| 858 | u64 cmd_pdus; | ||
| 859 | u64 tx_data_octets; | ||
| 860 | u64 rx_data_octets; | ||
| 861 | } ____cacheline_aligned; | ||
| 862 | |||
| 848 | struct se_port { | 863 | struct se_port { |
| 849 | /* RELATIVE TARGET PORT IDENTIFER */ | 864 | /* RELATIVE TARGET PORT IDENTIFER */ |
| 850 | u16 sep_rtpi; | 865 | u16 sep_rtpi; |
| @@ -867,6 +882,7 @@ struct se_port { | |||
| 867 | } ____cacheline_aligned; | 882 | } ____cacheline_aligned; |
| 868 | 883 | ||
| 869 | struct se_tpg_np { | 884 | struct se_tpg_np { |
| 885 | struct se_portal_group *tpg_np_parent; | ||
| 870 | struct config_group tpg_np_group; | 886 | struct config_group tpg_np_group; |
| 871 | } ____cacheline_aligned; | 887 | } ____cacheline_aligned; |
| 872 | 888 | ||
diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 66f44e56eb80..246940511579 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h | |||
| @@ -111,6 +111,8 @@ struct se_subsystem_api; | |||
| 111 | 111 | ||
| 112 | extern int init_se_global(void); | 112 | extern int init_se_global(void); |
| 113 | extern void release_se_global(void); | 113 | extern void release_se_global(void); |
| 114 | extern void init_scsi_index_table(void); | ||
| 115 | extern u32 scsi_get_new_index(scsi_index_t); | ||
| 114 | extern void transport_init_queue_obj(struct se_queue_obj *); | 116 | extern void transport_init_queue_obj(struct se_queue_obj *); |
| 115 | extern int transport_subsystem_check_init(void); | 117 | extern int transport_subsystem_check_init(void); |
| 116 | extern int transport_subsystem_register(struct se_subsystem_api *); | 118 | extern int transport_subsystem_register(struct se_subsystem_api *); |
