target_core_configfs.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #define TARGET_CORE_CONFIGFS_VERSION TARGET_CORE_MOD_VERSION
  2. #define TARGET_CORE_CONFIG_ROOT "/sys/kernel/config"
  3. #define TARGET_CORE_NAME_MAX_LEN 64
  4. #define TARGET_FABRIC_NAME_SIZE 32
  5. extern struct target_fabric_configfs *target_fabric_configfs_init(
  6. struct module *, const char *);
  7. extern void target_fabric_configfs_free(struct target_fabric_configfs *);
  8. extern int target_fabric_configfs_register(struct target_fabric_configfs *);
  9. extern void target_fabric_configfs_deregister(struct target_fabric_configfs *);
  10. struct target_fabric_configfs_template {
  11. struct config_item_type tfc_discovery_cit;
  12. struct config_item_type tfc_wwn_cit;
  13. struct config_item_type tfc_tpg_cit;
  14. struct config_item_type tfc_tpg_base_cit;
  15. struct config_item_type tfc_tpg_lun_cit;
  16. struct config_item_type tfc_tpg_port_cit;
  17. struct config_item_type tfc_tpg_np_cit;
  18. struct config_item_type tfc_tpg_np_base_cit;
  19. struct config_item_type tfc_tpg_attrib_cit;
  20. struct config_item_type tfc_tpg_param_cit;
  21. struct config_item_type tfc_tpg_nacl_cit;
  22. struct config_item_type tfc_tpg_nacl_base_cit;
  23. struct config_item_type tfc_tpg_nacl_attrib_cit;
  24. struct config_item_type tfc_tpg_nacl_auth_cit;
  25. struct config_item_type tfc_tpg_nacl_param_cit;
  26. struct config_item_type tfc_tpg_mappedlun_cit;
  27. };
  28. struct target_fabric_configfs {
  29. char tf_name[TARGET_FABRIC_NAME_SIZE];
  30. atomic_t tf_access_cnt;
  31. struct list_head tf_list;
  32. struct config_group tf_group;
  33. struct config_group tf_disc_group;
  34. struct config_group *tf_default_groups[2];
  35. /* Pointer to fabric's config_item */
  36. struct config_item *tf_fabric;
  37. /* Passed from fabric modules */
  38. struct config_item_type *tf_fabric_cit;
  39. /* Pointer to target core subsystem */
  40. struct configfs_subsystem *tf_subsys;
  41. /* Pointer to fabric's struct module */
  42. struct module *tf_module;
  43. struct target_core_fabric_ops tf_ops;
  44. struct target_fabric_configfs_template tf_cit_tmpl;
  45. };
  46. #define TF_CIT_TMPL(tf) (&(tf)->tf_cit_tmpl)