Lines Matching refs:nspm

30 	struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev);  in namespace_pmem_release()  local
32 kfree(nspm->alt_name); in namespace_pmem_release()
33 kfree(nspm->uuid); in namespace_pmem_release()
34 kfree(nspm); in namespace_pmem_release()
85 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in is_uuid_busy() local
87 uuid2 = nspm->uuid; in is_uuid_busy()
197 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in nd_dev_to_uuid() local
199 return nspm->uuid; in nd_dev_to_uuid()
225 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in __alt_name_store() local
227 ns_altname = &nspm->alt_name; in __alt_name_store()
354 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in nd_namespace_label_update() local
355 resource_size_t size = resource_size(&nspm->nsio.res); in nd_namespace_label_update()
357 if (size == 0 && nspm->uuid) in nd_namespace_label_update()
359 else if (!nspm->uuid) in nd_namespace_label_update()
362 return nd_pmem_namespace_label_update(nd_region, nspm, size); in nd_namespace_label_update()
402 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in alt_name_show() local
404 ns_altname = nspm->alt_name; in alt_name_show()
839 struct nd_namespace_pmem *nspm, resource_size_t size) in nd_namespace_pmem_set_size() argument
841 struct resource *res = &nspm->nsio.res; in nd_namespace_pmem_set_size()
862 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in __size_store() local
864 uuid = nspm->uuid; in __size_store()
920 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in __size_store() local
922 nd_namespace_pmem_set_size(nd_region, nspm, in __size_store()
961 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in size_store() local
963 uuid = &nspm->uuid; in size_store()
990 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in __nvdimm_namespace_capacity() local
992 return resource_size(&nspm->nsio.res); in __nvdimm_namespace_capacity()
1030 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in uuid_show() local
1032 uuid = nspm->uuid; in uuid_show()
1113 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in uuid_store() local
1115 ns_uuid = &nspm->uuid; in uuid_store()
1151 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in resource_show() local
1153 res = &nspm->nsio.res; in resource_show()
1222 struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); in dpa_extents_show() local
1224 uuid = nspm->uuid; in dpa_extents_show()
1396 struct nd_namespace_pmem *nspm; in nvdimm_namespace_common_probe() local
1398 nspm = to_nd_namespace_pmem(&ndns->dev); in nvdimm_namespace_common_probe()
1399 if (!nspm->uuid) { in nvdimm_namespace_common_probe()
1535 struct nd_namespace_pmem *nspm) in find_pmem_label_set() argument
1603 WARN_ON(nspm->alt_name || nspm->uuid); in find_pmem_label_set()
1604 nspm->alt_name = kmemdup((void __force *) label0->name, in find_pmem_label_set()
1606 nspm->uuid = kmemdup((void __force *) label0->uuid, in find_pmem_label_set()
1610 if (!nspm->alt_name || !nspm->uuid) { in find_pmem_label_set()
1615 nd_namespace_pmem_set_size(nd_region, nspm, size); in find_pmem_label_set()
1636 struct nd_namespace_pmem *nspm; in create_namespace_pmem() local
1641 nspm = kzalloc(sizeof(*nspm), GFP_KERNEL); in create_namespace_pmem()
1642 if (!nspm) in create_namespace_pmem()
1645 dev = &nspm->nsio.common.dev; in create_namespace_pmem()
1648 res = &nspm->nsio.res; in create_namespace_pmem()
1651 rc = find_pmem_label_set(nd_region, nspm); in create_namespace_pmem()
1664 nd_namespace_pmem_set_size(nd_region, nspm, 0); in create_namespace_pmem()
1678 namespace_pmem_release(&nspm->nsio.common.dev); in create_namespace_pmem()