• Home
  • Raw
  • Download

Lines Matching refs:subsys

341 	struct nvmet_subsys *subsys = ns->subsys;  in nvmet_ns_device_path_store()  local
345 mutex_lock(&subsys->lock); in nvmet_ns_device_path_store()
361 mutex_unlock(&subsys->lock); in nvmet_ns_device_path_store()
365 mutex_unlock(&subsys->lock); in nvmet_ns_device_path_store()
388 mutex_lock(&ns->subsys->lock); in nvmet_ns_p2pmem_store()
405 mutex_unlock(&ns->subsys->lock); in nvmet_ns_p2pmem_store()
422 struct nvmet_subsys *subsys = ns->subsys; in nvmet_ns_device_uuid_store() local
425 mutex_lock(&subsys->lock); in nvmet_ns_device_uuid_store()
435 mutex_unlock(&subsys->lock); in nvmet_ns_device_uuid_store()
450 struct nvmet_subsys *subsys = ns->subsys; in nvmet_ns_device_nguid_store() local
456 mutex_lock(&subsys->lock); in nvmet_ns_device_nguid_store()
481 mutex_unlock(&subsys->lock); in nvmet_ns_device_nguid_store()
514 nvmet_send_ana_event(ns->subsys, NULL); in nvmet_ns_ana_grpid_store()
559 mutex_lock(&ns->subsys->lock); in nvmet_ns_buffered_io_store()
562 mutex_unlock(&ns->subsys->lock); in nvmet_ns_buffered_io_store()
567 mutex_unlock(&ns->subsys->lock); in nvmet_ns_buffered_io_store()
585 mutex_lock(&ns->subsys->lock); in nvmet_ns_revalidate_size_store()
588 mutex_unlock(&ns->subsys->lock); in nvmet_ns_revalidate_size_store()
592 mutex_unlock(&ns->subsys->lock); in nvmet_ns_revalidate_size_store()
632 struct nvmet_subsys *subsys = namespaces_to_subsys(&group->cg_item); in nvmet_ns_make() local
648 ns = nvmet_ns_alloc(subsys, nsid); in nvmet_ns_make()
653 pr_info("adding nsid %d to subsystem %s\n", nsid, subsys->subsysnqn); in nvmet_ns_make()
674 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_device_path_show() local
676 return snprintf(page, PAGE_SIZE, "%s\n", subsys->passthru_ctrl_path); in nvmet_passthru_device_path_show()
682 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_device_path_store() local
686 mutex_lock(&subsys->lock); in nvmet_passthru_device_path_store()
689 if (subsys->passthru_ctrl) in nvmet_passthru_device_path_store()
697 kfree(subsys->passthru_ctrl_path); in nvmet_passthru_device_path_store()
699 subsys->passthru_ctrl_path = kstrndup(page, len, GFP_KERNEL); in nvmet_passthru_device_path_store()
700 if (!subsys->passthru_ctrl_path) in nvmet_passthru_device_path_store()
703 mutex_unlock(&subsys->lock); in nvmet_passthru_device_path_store()
707 mutex_unlock(&subsys->lock); in nvmet_passthru_device_path_store()
715 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_enable_show() local
717 return sprintf(page, "%d\n", subsys->passthru_ctrl ? 1 : 0); in nvmet_passthru_enable_show()
723 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_enable_store() local
731 ret = nvmet_passthru_ctrl_enable(subsys); in nvmet_passthru_enable_store()
733 nvmet_passthru_ctrl_disable(subsys); in nvmet_passthru_enable_store()
750 static void nvmet_add_passthru_group(struct nvmet_subsys *subsys) in nvmet_add_passthru_group() argument
752 config_group_init_type_name(&subsys->passthru_group, in nvmet_add_passthru_group()
754 configfs_add_default_group(&subsys->passthru_group, in nvmet_add_passthru_group()
755 &subsys->group); in nvmet_add_passthru_group()
760 static void nvmet_add_passthru_group(struct nvmet_subsys *subsys) in nvmet_add_passthru_group() argument
770 struct nvmet_subsys *subsys; in nvmet_port_subsys_allow_link() local
778 subsys = to_subsys(target); in nvmet_port_subsys_allow_link()
782 link->subsys = subsys; in nvmet_port_subsys_allow_link()
787 if (p->subsys == subsys) in nvmet_port_subsys_allow_link()
798 nvmet_port_disc_changed(port, subsys); in nvmet_port_subsys_allow_link()
813 struct nvmet_subsys *subsys = to_subsys(target); in nvmet_port_subsys_drop_link() local
818 if (p->subsys == subsys) in nvmet_port_subsys_drop_link()
826 nvmet_port_del_ctrls(port, subsys); in nvmet_port_subsys_drop_link()
827 nvmet_port_disc_changed(port, subsys); in nvmet_port_subsys_drop_link()
848 struct nvmet_subsys *subsys = to_subsys(parent->ci_parent); in nvmet_allowed_hosts_allow_link() local
866 if (subsys->allow_any_host) { in nvmet_allowed_hosts_allow_link()
872 list_for_each_entry(p, &subsys->hosts, entry) { in nvmet_allowed_hosts_allow_link()
876 list_add_tail(&link->entry, &subsys->hosts); in nvmet_allowed_hosts_allow_link()
877 nvmet_subsys_disc_changed(subsys, host); in nvmet_allowed_hosts_allow_link()
890 struct nvmet_subsys *subsys = to_subsys(parent->ci_parent); in nvmet_allowed_hosts_drop_link() local
895 list_for_each_entry(p, &subsys->hosts, entry) { in nvmet_allowed_hosts_drop_link()
904 nvmet_subsys_disc_changed(subsys, host); in nvmet_allowed_hosts_drop_link()
930 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_allow_any_host_store() local
938 if (allow_any_host && !list_empty(&subsys->hosts)) { in nvmet_subsys_attr_allow_any_host_store()
944 if (subsys->allow_any_host != allow_any_host) { in nvmet_subsys_attr_allow_any_host_store()
945 subsys->allow_any_host = allow_any_host; in nvmet_subsys_attr_allow_any_host_store()
946 nvmet_subsys_disc_changed(subsys, NULL); in nvmet_subsys_attr_allow_any_host_store()
959 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_version_show() local
961 if (NVME_TERTIARY(subsys->ver)) in nvmet_subsys_attr_version_show()
963 NVME_MAJOR(subsys->ver), in nvmet_subsys_attr_version_show()
964 NVME_MINOR(subsys->ver), in nvmet_subsys_attr_version_show()
965 NVME_TERTIARY(subsys->ver)); in nvmet_subsys_attr_version_show()
968 NVME_MAJOR(subsys->ver), in nvmet_subsys_attr_version_show()
969 NVME_MINOR(subsys->ver)); in nvmet_subsys_attr_version_show()
975 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_version_store() local
980 if (nvmet_passthru_ctrl(subsys)) in nvmet_subsys_attr_version_store()
988 subsys->ver = NVME_VS(major, minor, tertiary); in nvmet_subsys_attr_version_store()
998 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_serial_show() local
1000 return snprintf(page, PAGE_SIZE, "%llx\n", subsys->serial); in nvmet_subsys_attr_serial_show()
1082 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_model_show() local
1088 subsys_model = rcu_dereference(subsys->model); in nvmet_subsys_attr_model_show()
1106 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_model_store() local
1132 mutex_lock(&subsys->lock); in nvmet_subsys_attr_model_store()
1133 new_model = rcu_replace_pointer(subsys->model, new_model, in nvmet_subsys_attr_model_store()
1134 mutex_is_locked(&subsys->lock)); in nvmet_subsys_attr_model_store()
1135 mutex_unlock(&subsys->lock); in nvmet_subsys_attr_model_store()
1155 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_pi_enable_store() local
1161 subsys->pi_support = pi_enable; in nvmet_subsys_attr_pi_enable_store()
1185 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_release() local
1187 nvmet_subsys_del_ctrls(subsys); in nvmet_subsys_release()
1188 nvmet_subsys_put(subsys); in nvmet_subsys_release()
1204 struct nvmet_subsys *subsys; in nvmet_subsys_make() local
1211 subsys = nvmet_subsys_alloc(name, NVME_NQN_NVME); in nvmet_subsys_make()
1212 if (IS_ERR(subsys)) in nvmet_subsys_make()
1213 return ERR_CAST(subsys); in nvmet_subsys_make()
1215 config_group_init_type_name(&subsys->group, name, &nvmet_subsys_type); in nvmet_subsys_make()
1217 config_group_init_type_name(&subsys->namespaces_group, in nvmet_subsys_make()
1219 configfs_add_default_group(&subsys->namespaces_group, &subsys->group); in nvmet_subsys_make()
1221 config_group_init_type_name(&subsys->allowed_hosts_group, in nvmet_subsys_make()
1223 configfs_add_default_group(&subsys->allowed_hosts_group, in nvmet_subsys_make()
1224 &subsys->group); in nvmet_subsys_make()
1226 nvmet_add_passthru_group(subsys); in nvmet_subsys_make()
1228 return &subsys->group; in nvmet_subsys_make()