Lines Matching refs:subsys
314 struct nvmet_subsys *subsys = ns->subsys; in nvmet_ns_device_path_store() local
318 mutex_lock(&subsys->lock); in nvmet_ns_device_path_store()
334 mutex_unlock(&subsys->lock); in nvmet_ns_device_path_store()
338 mutex_unlock(&subsys->lock); in nvmet_ns_device_path_store()
361 mutex_lock(&ns->subsys->lock); in nvmet_ns_p2pmem_store()
378 mutex_unlock(&ns->subsys->lock); in nvmet_ns_p2pmem_store()
395 struct nvmet_subsys *subsys = ns->subsys; in nvmet_ns_device_uuid_store() local
399 mutex_lock(&subsys->lock); in nvmet_ns_device_uuid_store()
410 mutex_unlock(&subsys->lock); in nvmet_ns_device_uuid_store()
425 struct nvmet_subsys *subsys = ns->subsys; in nvmet_ns_device_nguid_store() local
431 mutex_lock(&subsys->lock); in nvmet_ns_device_nguid_store()
456 mutex_unlock(&subsys->lock); in nvmet_ns_device_nguid_store()
489 nvmet_send_ana_event(ns->subsys, NULL); in nvmet_ns_ana_grpid_store()
534 mutex_lock(&ns->subsys->lock); in nvmet_ns_buffered_io_store()
537 mutex_unlock(&ns->subsys->lock); in nvmet_ns_buffered_io_store()
542 mutex_unlock(&ns->subsys->lock); in nvmet_ns_buffered_io_store()
581 struct nvmet_subsys *subsys = namespaces_to_subsys(&group->cg_item); in nvmet_ns_make() local
597 ns = nvmet_ns_alloc(subsys, nsid); in nvmet_ns_make()
602 pr_info("adding nsid %d to subsystem %s\n", nsid, subsys->subsysnqn); in nvmet_ns_make()
622 struct nvmet_subsys *subsys; in nvmet_port_subsys_allow_link() local
630 subsys = to_subsys(target); in nvmet_port_subsys_allow_link()
634 link->subsys = subsys; in nvmet_port_subsys_allow_link()
639 if (p->subsys == subsys) in nvmet_port_subsys_allow_link()
650 nvmet_port_disc_changed(port, subsys); in nvmet_port_subsys_allow_link()
665 struct nvmet_subsys *subsys = to_subsys(target); in nvmet_port_subsys_drop_link() local
670 if (p->subsys == subsys) in nvmet_port_subsys_drop_link()
678 nvmet_port_del_ctrls(port, subsys); in nvmet_port_subsys_drop_link()
679 nvmet_port_disc_changed(port, subsys); in nvmet_port_subsys_drop_link()
700 struct nvmet_subsys *subsys = to_subsys(parent->ci_parent); in nvmet_allowed_hosts_allow_link() local
718 if (subsys->allow_any_host) { in nvmet_allowed_hosts_allow_link()
724 list_for_each_entry(p, &subsys->hosts, entry) { in nvmet_allowed_hosts_allow_link()
728 list_add_tail(&link->entry, &subsys->hosts); in nvmet_allowed_hosts_allow_link()
729 nvmet_subsys_disc_changed(subsys, host); in nvmet_allowed_hosts_allow_link()
742 struct nvmet_subsys *subsys = to_subsys(parent->ci_parent); in nvmet_allowed_hosts_drop_link() local
747 list_for_each_entry(p, &subsys->hosts, entry) { in nvmet_allowed_hosts_drop_link()
756 nvmet_subsys_disc_changed(subsys, host); in nvmet_allowed_hosts_drop_link()
782 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_allow_any_host_store() local
790 if (allow_any_host && !list_empty(&subsys->hosts)) { in nvmet_subsys_attr_allow_any_host_store()
796 if (subsys->allow_any_host != allow_any_host) { in nvmet_subsys_attr_allow_any_host_store()
797 subsys->allow_any_host = allow_any_host; in nvmet_subsys_attr_allow_any_host_store()
798 nvmet_subsys_disc_changed(subsys, NULL); in nvmet_subsys_attr_allow_any_host_store()
811 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_version_show() local
813 if (NVME_TERTIARY(subsys->ver)) in nvmet_subsys_attr_version_show()
815 (int)NVME_MAJOR(subsys->ver), in nvmet_subsys_attr_version_show()
816 (int)NVME_MINOR(subsys->ver), in nvmet_subsys_attr_version_show()
817 (int)NVME_TERTIARY(subsys->ver)); in nvmet_subsys_attr_version_show()
820 (int)NVME_MAJOR(subsys->ver), in nvmet_subsys_attr_version_show()
821 (int)NVME_MINOR(subsys->ver)); in nvmet_subsys_attr_version_show()
827 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_version_store() local
837 subsys->ver = NVME_VS(major, minor, tertiary); in nvmet_subsys_attr_version_store()
847 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_serial_show() local
849 return snprintf(page, PAGE_SIZE, "%llx\n", subsys->serial); in nvmet_subsys_attr_serial_show()
855 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_serial_store() local
858 sscanf(page, "%llx\n", &subsys->serial); in nvmet_subsys_attr_serial_store()
877 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_release() local
879 nvmet_subsys_del_ctrls(subsys); in nvmet_subsys_release()
880 nvmet_subsys_put(subsys); in nvmet_subsys_release()
896 struct nvmet_subsys *subsys; in nvmet_subsys_make() local
903 subsys = nvmet_subsys_alloc(name, NVME_NQN_NVME); in nvmet_subsys_make()
904 if (IS_ERR(subsys)) in nvmet_subsys_make()
905 return ERR_CAST(subsys); in nvmet_subsys_make()
907 config_group_init_type_name(&subsys->group, name, &nvmet_subsys_type); in nvmet_subsys_make()
909 config_group_init_type_name(&subsys->namespaces_group, in nvmet_subsys_make()
911 configfs_add_default_group(&subsys->namespaces_group, &subsys->group); in nvmet_subsys_make()
913 config_group_init_type_name(&subsys->allowed_hosts_group, in nvmet_subsys_make()
915 configfs_add_default_group(&subsys->allowed_hosts_group, in nvmet_subsys_make()
916 &subsys->group); in nvmet_subsys_make()
918 return &subsys->group; in nvmet_subsys_make()