Lines Matching refs:item

84 item_to_hba(struct config_item *item)  in item_to_hba()  argument
86 return container_of(to_config_group(item), struct se_hba, hba_group); in item_to_hba()
92 static ssize_t target_core_item_version_show(struct config_item *item, in target_core_item_version_show() argument
215 struct config_item *item) in target_core_deregister_fabric() argument
218 to_config_group(item), struct target_fabric_configfs, tf_group); in target_core_deregister_fabric()
224 " tf list\n", config_item_name(item)); in target_core_deregister_fabric()
231 " %s\n", config_item_name(item)); in target_core_deregister_fabric()
239 config_item_put(item); in target_core_deregister_fabric()
273 int target_depend_item(struct config_item *item) in target_depend_item() argument
275 return configfs_depend_item(&target_core_fabrics, item); in target_depend_item()
279 void target_undepend_item(struct config_item *item) in target_undepend_item() argument
281 return configfs_undepend_item(&target_core_fabrics, item); in target_undepend_item()
461 static inline struct se_dev_attrib *to_attrib(struct config_item *item) in to_attrib() argument
463 return container_of(to_config_group(item), struct se_dev_attrib, in to_attrib()
469 static ssize_t _name##_show(struct config_item *item, char *page) \
471 return snprintf(page, PAGE_SIZE, "%u\n", to_attrib(item)->_name); \
505 static ssize_t _name##_store(struct config_item *item, const char *page,\
508 struct se_dev_attrib *da = to_attrib(item); \
526 static ssize_t _name##_store(struct config_item *item, const char *page, \
529 struct se_dev_attrib *da = to_attrib(item); \
547 static ssize_t _name##_store(struct config_item *item, const char *page,\
571 static ssize_t emulate_model_alias_store(struct config_item *item, in emulate_model_alias_store() argument
574 struct se_dev_attrib *da = to_attrib(item); in emulate_model_alias_store()
600 static ssize_t emulate_write_cache_store(struct config_item *item, in emulate_write_cache_store() argument
603 struct se_dev_attrib *da = to_attrib(item); in emulate_write_cache_store()
622 static ssize_t emulate_ua_intlck_ctrl_store(struct config_item *item, in emulate_ua_intlck_ctrl_store() argument
625 struct se_dev_attrib *da = to_attrib(item); in emulate_ua_intlck_ctrl_store()
650 static ssize_t emulate_tas_store(struct config_item *item, in emulate_tas_store() argument
653 struct se_dev_attrib *da = to_attrib(item); in emulate_tas_store()
674 static ssize_t emulate_tpu_store(struct config_item *item, in emulate_tpu_store() argument
677 struct se_dev_attrib *da = to_attrib(item); in emulate_tpu_store()
700 static ssize_t emulate_tpws_store(struct config_item *item, in emulate_tpws_store() argument
703 struct se_dev_attrib *da = to_attrib(item); in emulate_tpws_store()
726 static ssize_t pi_prot_type_store(struct config_item *item, in pi_prot_type_store() argument
729 struct se_dev_attrib *da = to_attrib(item); in pi_prot_type_store()
787 static ssize_t pi_prot_format_store(struct config_item *item, in pi_prot_format_store() argument
790 struct se_dev_attrib *da = to_attrib(item); in pi_prot_format_store()
825 static ssize_t force_pr_aptpl_store(struct config_item *item, in force_pr_aptpl_store() argument
828 struct se_dev_attrib *da = to_attrib(item); in force_pr_aptpl_store()
847 static ssize_t emulate_rest_reord_store(struct config_item *item, in emulate_rest_reord_store() argument
850 struct se_dev_attrib *da = to_attrib(item); in emulate_rest_reord_store()
872 static ssize_t queue_depth_store(struct config_item *item, in queue_depth_store() argument
875 struct se_dev_attrib *da = to_attrib(item); in queue_depth_store()
909 static ssize_t optimal_sectors_store(struct config_item *item, in optimal_sectors_store() argument
912 struct se_dev_attrib *da = to_attrib(item); in optimal_sectors_store()
939 static ssize_t block_size_store(struct config_item *item, in block_size_store() argument
942 struct se_dev_attrib *da = to_attrib(item); in block_size_store()
1062 static struct t10_wwn *to_t10_wwn(struct config_item *item) in to_t10_wwn() argument
1064 return container_of(to_config_group(item), struct t10_wwn, t10_wwn_group); in to_t10_wwn()
1070 static ssize_t target_wwn_vpd_unit_serial_show(struct config_item *item, in target_wwn_vpd_unit_serial_show() argument
1074 &to_t10_wwn(item)->unit_serial[0]); in target_wwn_vpd_unit_serial_show()
1077 static ssize_t target_wwn_vpd_unit_serial_store(struct config_item *item, in target_wwn_vpd_unit_serial_store() argument
1080 struct t10_wwn *t10_wwn = to_t10_wwn(item); in target_wwn_vpd_unit_serial_store()
1139 static ssize_t target_wwn_vpd_protocol_identifier_show(struct config_item *item, in target_wwn_vpd_protocol_identifier_show() argument
1142 struct t10_wwn *t10_wwn = to_t10_wwn(item); in target_wwn_vpd_protocol_identifier_show()
1170 static ssize_t target_wwn_##_name##_show(struct config_item *item, \
1173 struct t10_wwn *t10_wwn = to_t10_wwn(item); \
1234 static struct se_device *pr_to_dev(struct config_item *item) in pr_to_dev() argument
1236 return container_of(to_config_group(item), struct se_device, in pr_to_dev()
1279 static ssize_t target_pr_res_holder_show(struct config_item *item, char *page) in target_pr_res_holder_show() argument
1281 struct se_device *dev = pr_to_dev(item); in target_pr_res_holder_show()
1296 static ssize_t target_pr_res_pr_all_tgt_pts_show(struct config_item *item, in target_pr_res_pr_all_tgt_pts_show() argument
1299 struct se_device *dev = pr_to_dev(item); in target_pr_res_pr_all_tgt_pts_show()
1317 static ssize_t target_pr_res_pr_generation_show(struct config_item *item, in target_pr_res_pr_generation_show() argument
1320 return sprintf(page, "0x%08x\n", pr_to_dev(item)->t10_pr.pr_generation); in target_pr_res_pr_generation_show()
1324 static ssize_t target_pr_res_pr_holder_tg_port_show(struct config_item *item, in target_pr_res_pr_holder_tg_port_show() argument
1327 struct se_device *dev = pr_to_dev(item); in target_pr_res_pr_holder_tg_port_show()
1360 static ssize_t target_pr_res_pr_registered_i_pts_show(struct config_item *item, in target_pr_res_pr_registered_i_pts_show() argument
1363 struct se_device *dev = pr_to_dev(item); in target_pr_res_pr_registered_i_pts_show()
1401 static ssize_t target_pr_res_pr_type_show(struct config_item *item, char *page) in target_pr_res_pr_type_show() argument
1403 struct se_device *dev = pr_to_dev(item); in target_pr_res_pr_type_show()
1420 static ssize_t target_pr_res_type_show(struct config_item *item, char *page) in target_pr_res_type_show() argument
1422 struct se_device *dev = pr_to_dev(item); in target_pr_res_type_show()
1432 static ssize_t target_pr_res_aptpl_active_show(struct config_item *item, in target_pr_res_aptpl_active_show() argument
1435 struct se_device *dev = pr_to_dev(item); in target_pr_res_aptpl_active_show()
1444 static ssize_t target_pr_res_aptpl_metadata_show(struct config_item *item, in target_pr_res_aptpl_metadata_show() argument
1447 struct se_device *dev = pr_to_dev(item); in target_pr_res_aptpl_metadata_show()
1480 static ssize_t target_pr_res_aptpl_metadata_store(struct config_item *item, in target_pr_res_aptpl_metadata_store() argument
1483 struct se_device *dev = pr_to_dev(item); in target_pr_res_aptpl_metadata_store()
1694 static inline struct se_device *to_device(struct config_item *item) in to_device() argument
1696 return container_of(to_config_group(item), struct se_device, dev_group); in to_device()
1699 static ssize_t target_dev_info_show(struct config_item *item, char *page) in target_dev_info_show() argument
1701 struct se_device *dev = to_device(item); in target_dev_info_show()
1712 static ssize_t target_dev_control_store(struct config_item *item, in target_dev_control_store() argument
1715 struct se_device *dev = to_device(item); in target_dev_control_store()
1720 static ssize_t target_dev_alias_show(struct config_item *item, char *page) in target_dev_alias_show() argument
1722 struct se_device *dev = to_device(item); in target_dev_alias_show()
1730 static ssize_t target_dev_alias_store(struct config_item *item, in target_dev_alias_store() argument
1733 struct se_device *dev = to_device(item); in target_dev_alias_store()
1760 static ssize_t target_dev_udev_path_show(struct config_item *item, char *page) in target_dev_udev_path_show() argument
1762 struct se_device *dev = to_device(item); in target_dev_udev_path_show()
1770 static ssize_t target_dev_udev_path_store(struct config_item *item, in target_dev_udev_path_store() argument
1773 struct se_device *dev = to_device(item); in target_dev_udev_path_store()
1801 static ssize_t target_dev_enable_show(struct config_item *item, char *page) in target_dev_enable_show() argument
1803 struct se_device *dev = to_device(item); in target_dev_enable_show()
1808 static ssize_t target_dev_enable_store(struct config_item *item, in target_dev_enable_store() argument
1811 struct se_device *dev = to_device(item); in target_dev_enable_store()
1828 static ssize_t target_dev_alua_lu_gp_show(struct config_item *item, char *page) in target_dev_alua_lu_gp_show() argument
1830 struct se_device *dev = to_device(item); in target_dev_alua_lu_gp_show()
1852 static ssize_t target_dev_alua_lu_gp_store(struct config_item *item, in target_dev_alua_lu_gp_store() argument
1855 struct se_device *dev = to_device(item); in target_dev_alua_lu_gp_store()
1932 static ssize_t target_dev_lba_map_show(struct config_item *item, char *page) in target_dev_lba_map_show() argument
1934 struct se_device *dev = to_device(item); in target_dev_lba_map_show()
1977 static ssize_t target_dev_lba_map_store(struct config_item *item, in target_dev_lba_map_store() argument
1980 struct se_device *dev = to_device(item); in target_dev_lba_map_store()
2111 static void target_core_dev_release(struct config_item *item) in target_core_dev_release() argument
2113 struct config_group *dev_cg = to_config_group(item); in target_core_dev_release()
2131 static inline struct t10_alua_lu_gp *to_lu_gp(struct config_item *item) in to_lu_gp() argument
2133 return container_of(to_config_group(item), struct t10_alua_lu_gp, in to_lu_gp()
2137 static ssize_t target_lu_gp_lu_gp_id_show(struct config_item *item, char *page) in target_lu_gp_lu_gp_id_show() argument
2139 struct t10_alua_lu_gp *lu_gp = to_lu_gp(item); in target_lu_gp_lu_gp_id_show()
2146 static ssize_t target_lu_gp_lu_gp_id_store(struct config_item *item, in target_lu_gp_lu_gp_id_store() argument
2149 struct t10_alua_lu_gp *lu_gp = to_lu_gp(item); in target_lu_gp_lu_gp_id_store()
2178 static ssize_t target_lu_gp_members_show(struct config_item *item, char *page) in target_lu_gp_members_show() argument
2180 struct t10_alua_lu_gp *lu_gp = to_lu_gp(item); in target_lu_gp_members_show()
2221 static void target_core_alua_lu_gp_release(struct config_item *item) in target_core_alua_lu_gp_release() argument
2223 struct t10_alua_lu_gp *lu_gp = container_of(to_config_group(item), in target_core_alua_lu_gp_release()
2271 struct config_item *item) in target_core_alua_drop_lu_gp() argument
2273 struct t10_alua_lu_gp *lu_gp = container_of(to_config_group(item), in target_core_alua_drop_lu_gp()
2278 config_item_name(item), lu_gp->lu_gp_id); in target_core_alua_drop_lu_gp()
2283 config_item_put(item); in target_core_alua_drop_lu_gp()
2301 static inline struct t10_alua_tg_pt_gp *to_tg_pt_gp(struct config_item *item) in to_tg_pt_gp() argument
2303 return container_of(to_config_group(item), struct t10_alua_tg_pt_gp, in to_tg_pt_gp()
2307 static ssize_t target_tg_pt_gp_alua_access_state_show(struct config_item *item, in target_tg_pt_gp_alua_access_state_show() argument
2311 atomic_read(&to_tg_pt_gp(item)->tg_pt_gp_alua_access_state)); in target_tg_pt_gp_alua_access_state_show()
2314 static ssize_t target_tg_pt_gp_alua_access_state_store(struct config_item *item, in target_tg_pt_gp_alua_access_state_store() argument
2317 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); in target_tg_pt_gp_alua_access_state_store()
2359 static ssize_t target_tg_pt_gp_alua_access_status_show(struct config_item *item, in target_tg_pt_gp_alua_access_status_show() argument
2362 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); in target_tg_pt_gp_alua_access_status_show()
2368 struct config_item *item, const char *page, size_t count) in target_tg_pt_gp_alua_access_status_store() argument
2370 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); in target_tg_pt_gp_alua_access_status_store()
2401 static ssize_t target_tg_pt_gp_alua_access_type_show(struct config_item *item, in target_tg_pt_gp_alua_access_type_show() argument
2404 return core_alua_show_access_type(to_tg_pt_gp(item), page); in target_tg_pt_gp_alua_access_type_show()
2407 static ssize_t target_tg_pt_gp_alua_access_type_store(struct config_item *item, in target_tg_pt_gp_alua_access_type_store() argument
2410 return core_alua_store_access_type(to_tg_pt_gp(item), page, count); in target_tg_pt_gp_alua_access_type_store()
2415 struct config_item *item, char *p) \
2417 struct t10_alua_tg_pt_gp *t = to_tg_pt_gp(item); \
2423 struct config_item *item, const char *p, size_t c) \
2425 struct t10_alua_tg_pt_gp *t = to_tg_pt_gp(item); \
2462 struct config_item *item, char *page) in target_tg_pt_gp_alua_write_metadata_show() argument
2465 to_tg_pt_gp(item)->tg_pt_gp_write_metadata); in target_tg_pt_gp_alua_write_metadata_show()
2469 struct config_item *item, const char *page, size_t count) in target_tg_pt_gp_alua_write_metadata_store() argument
2471 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); in target_tg_pt_gp_alua_write_metadata_store()
2491 static ssize_t target_tg_pt_gp_nonop_delay_msecs_show(struct config_item *item, in target_tg_pt_gp_nonop_delay_msecs_show() argument
2494 return core_alua_show_nonop_delay_msecs(to_tg_pt_gp(item), page); in target_tg_pt_gp_nonop_delay_msecs_show()
2497 static ssize_t target_tg_pt_gp_nonop_delay_msecs_store(struct config_item *item, in target_tg_pt_gp_nonop_delay_msecs_store() argument
2500 return core_alua_store_nonop_delay_msecs(to_tg_pt_gp(item), page, in target_tg_pt_gp_nonop_delay_msecs_store()
2504 static ssize_t target_tg_pt_gp_trans_delay_msecs_show(struct config_item *item, in target_tg_pt_gp_trans_delay_msecs_show() argument
2507 return core_alua_show_trans_delay_msecs(to_tg_pt_gp(item), page); in target_tg_pt_gp_trans_delay_msecs_show()
2510 static ssize_t target_tg_pt_gp_trans_delay_msecs_store(struct config_item *item, in target_tg_pt_gp_trans_delay_msecs_store() argument
2513 return core_alua_store_trans_delay_msecs(to_tg_pt_gp(item), page, in target_tg_pt_gp_trans_delay_msecs_store()
2518 struct config_item *item, char *page) in target_tg_pt_gp_implicit_trans_secs_show() argument
2520 return core_alua_show_implicit_trans_secs(to_tg_pt_gp(item), page); in target_tg_pt_gp_implicit_trans_secs_show()
2524 struct config_item *item, const char *page, size_t count) in target_tg_pt_gp_implicit_trans_secs_store() argument
2526 return core_alua_store_implicit_trans_secs(to_tg_pt_gp(item), page, in target_tg_pt_gp_implicit_trans_secs_store()
2530 static ssize_t target_tg_pt_gp_preferred_show(struct config_item *item, in target_tg_pt_gp_preferred_show() argument
2533 return core_alua_show_preferred_bit(to_tg_pt_gp(item), page); in target_tg_pt_gp_preferred_show()
2536 static ssize_t target_tg_pt_gp_preferred_store(struct config_item *item, in target_tg_pt_gp_preferred_store() argument
2539 return core_alua_store_preferred_bit(to_tg_pt_gp(item), page, count); in target_tg_pt_gp_preferred_store()
2542 static ssize_t target_tg_pt_gp_tg_pt_gp_id_show(struct config_item *item, in target_tg_pt_gp_tg_pt_gp_id_show() argument
2545 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); in target_tg_pt_gp_tg_pt_gp_id_show()
2552 static ssize_t target_tg_pt_gp_tg_pt_gp_id_store(struct config_item *item, in target_tg_pt_gp_tg_pt_gp_id_store() argument
2555 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); in target_tg_pt_gp_tg_pt_gp_id_store()
2584 static ssize_t target_tg_pt_gp_members_show(struct config_item *item, in target_tg_pt_gp_members_show() argument
2587 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); in target_tg_pt_gp_members_show()
2658 static void target_core_alua_tg_pt_gp_release(struct config_item *item) in target_core_alua_tg_pt_gp_release() argument
2660 struct t10_alua_tg_pt_gp *tg_pt_gp = container_of(to_config_group(item), in target_core_alua_tg_pt_gp_release()
2709 struct config_item *item) in target_core_alua_drop_tg_pt_gp() argument
2711 struct t10_alua_tg_pt_gp *tg_pt_gp = container_of(to_config_group(item), in target_core_alua_drop_tg_pt_gp()
2716 config_item_name(item), tg_pt_gp->tg_pt_gp_id); in target_core_alua_drop_tg_pt_gp()
2721 config_item_put(item); in target_core_alua_drop_tg_pt_gp()
2760 struct config_item *item) in target_core_stat_rmdir() argument
2873 struct config_item *item) in target_core_drop_subdev() argument
2875 struct config_group *dev_cg = to_config_group(item); in target_core_drop_subdev()
2916 config_item_put(item); in target_core_drop_subdev()
2926 static inline struct se_hba *to_hba(struct config_item *item) in to_hba() argument
2928 return container_of(to_config_group(item), struct se_hba, hba_group); in to_hba()
2931 static ssize_t target_hba_info_show(struct config_item *item, char *page) in target_hba_info_show() argument
2933 struct se_hba *hba = to_hba(item); in target_hba_info_show()
2940 static ssize_t target_hba_mode_show(struct config_item *item, char *page) in target_hba_mode_show() argument
2942 struct se_hba *hba = to_hba(item); in target_hba_mode_show()
2951 static ssize_t target_hba_mode_store(struct config_item *item, in target_hba_mode_store() argument
2954 struct se_hba *hba = to_hba(item); in target_hba_mode_store()
2986 static void target_core_hba_release(struct config_item *item) in target_core_hba_release() argument
2988 struct se_hba *hba = container_of(to_config_group(item), in target_core_hba_release()
3072 struct config_item *item) in target_core_call_delhbafromtarget() argument
3078 config_item_put(item); in target_core_call_delhbafromtarget()
3247 struct config_item *item; in target_core_exit_configfs() local
3252 item = &lu_gp_cg->default_groups[i]->cg_item; in target_core_exit_configfs()
3254 config_item_put(item); in target_core_exit_configfs()
3261 item = &alua_cg->default_groups[i]->cg_item; in target_core_exit_configfs()
3263 config_item_put(item); in target_core_exit_configfs()
3270 item = &hba_cg->default_groups[i]->cg_item; in target_core_exit_configfs()
3272 config_item_put(item); in target_core_exit_configfs()