aboutsummaryrefslogtreecommitdiffstats
path: root/include/target/target_core_configfs.h
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2010-12-17 14:11:26 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-01-14 11:12:29 -0500
commitc66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5 (patch)
tree71c6344688bf56ea6aaf18c586ab69ff4f077ade /include/target/target_core_configfs.h
parentf4013c3879d1bbd9f3ab8351185decd049502368 (diff)
[SCSI] target: Add LIO target core v4.0.0-rc6
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: 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.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/include/target/target_core_configfs.h b/include/target/target_core_configfs.h
new file mode 100644
index 000000000000..40e6e740527c
--- /dev/null
+++ b/include/target/target_core_configfs.h
@@ -0,0 +1,52 @@
1#define TARGET_CORE_CONFIGFS_VERSION TARGET_CORE_MOD_VERSION
2
3#define TARGET_CORE_CONFIG_ROOT "/sys/kernel/config"
4
5#define TARGET_CORE_NAME_MAX_LEN 64
6#define TARGET_FABRIC_NAME_SIZE 32
7
8extern struct target_fabric_configfs *target_fabric_configfs_init(
9 struct module *, const char *);
10extern void target_fabric_configfs_free(struct target_fabric_configfs *);
11extern int target_fabric_configfs_register(struct target_fabric_configfs *);
12extern void target_fabric_configfs_deregister(struct target_fabric_configfs *);
13
14struct target_fabric_configfs_template {
15 struct config_item_type tfc_discovery_cit;
16 struct config_item_type tfc_wwn_cit;
17 struct config_item_type tfc_tpg_cit;
18 struct config_item_type tfc_tpg_base_cit;
19 struct config_item_type tfc_tpg_lun_cit;
20 struct config_item_type tfc_tpg_port_cit;
21 struct config_item_type tfc_tpg_np_cit;
22 struct config_item_type tfc_tpg_np_base_cit;
23 struct config_item_type tfc_tpg_attrib_cit;
24 struct config_item_type tfc_tpg_param_cit;
25 struct config_item_type tfc_tpg_nacl_cit;
26 struct config_item_type tfc_tpg_nacl_base_cit;
27 struct config_item_type tfc_tpg_nacl_attrib_cit;
28 struct config_item_type tfc_tpg_nacl_auth_cit;
29 struct config_item_type tfc_tpg_nacl_param_cit;
30 struct config_item_type tfc_tpg_mappedlun_cit;
31};
32
33struct target_fabric_configfs {
34 char tf_name[TARGET_FABRIC_NAME_SIZE];
35 atomic_t tf_access_cnt;
36 struct list_head tf_list;
37 struct config_group tf_group;
38 struct config_group tf_disc_group;
39 struct config_group *tf_default_groups[2];
40 /* Pointer to fabric's config_item */
41 struct config_item *tf_fabric;
42 /* Passed from fabric modules */
43 struct config_item_type *tf_fabric_cit;
44 /* Pointer to target core subsystem */
45 struct configfs_subsystem *tf_subsys;
46 /* Pointer to fabric's struct module */
47 struct module *tf_module;
48 struct target_core_fabric_ops tf_ops;
49 struct target_fabric_configfs_template tf_cit_tmpl;
50};
51
52#define TF_CIT_TMPL(tf) (&(tf)->tf_cit_tmpl)