Lines Matching refs:uuid
33 kfree(nspm->uuid); in namespace_pmem_release()
45 kfree(nsblk->uuid); in namespace_blk_release()
87 uuid2 = nspm->uuid; in is_uuid_busy()
91 uuid2 = nsblk->uuid; in is_uuid_busy()
95 uuid2 = nd_btt->uuid; in is_uuid_busy()
99 uuid2 = nd_pfn->uuid; in is_uuid_busy()
120 bool nd_is_uuid_unique(struct device *dev, u8 *uuid) in nd_is_uuid_unique() argument
127 if (device_for_each_child(&nvdimm_bus->dev, uuid, in nd_is_uuid_unique()
199 return nspm->uuid; in nd_dev_to_uuid()
203 return nsblk->uuid; in nd_dev_to_uuid()
273 if (!nsblk->uuid) in nd_namespace_blk_size()
275 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL); in nd_namespace_blk_size()
291 if (!nsblk->uuid || !nsblk->lbasize || !ndd) in __nd_namespace_blk_validate()
295 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL); in __nd_namespace_blk_validate()
357 if (size == 0 && nspm->uuid) in nd_namespace_label_update()
359 else if (!nspm->uuid) in nd_namespace_label_update()
367 if (size == 0 && nsblk->uuid) in nd_namespace_label_update()
369 else if (!nsblk->uuid || !nsblk->lbasize) in nd_namespace_label_update()
855 u8 *uuid = NULL; in __size_store() local
864 uuid = nspm->uuid; in __size_store()
868 uuid = nsblk->uuid; in __size_store()
876 if (!uuid || nd_region->ndr_mappings == 0) in __size_store()
886 nd_label_gen_id(&label_id, uuid, flags); in __size_store()
946 u8 **uuid = NULL; in size_store() local
963 uuid = &nspm->uuid; in size_store()
967 uuid = &nsblk->uuid; in size_store()
970 if (rc == 0 && val == 0 && uuid) { in size_store()
972 kfree(*uuid); in size_store()
973 *uuid = NULL; in size_store()
1027 u8 *uuid; in uuid_show() local
1032 uuid = nspm->uuid; in uuid_show()
1036 uuid = nsblk->uuid; in uuid_show()
1040 if (uuid) in uuid_show()
1041 return sprintf(buf, "%pUb\n", uuid); in uuid_show()
1108 u8 *uuid = NULL; in uuid_store() local
1115 ns_uuid = &nspm->uuid; in uuid_store()
1119 ns_uuid = &nsblk->uuid; in uuid_store()
1129 rc = nd_uuid_store(dev, &uuid, buf, len); in uuid_store()
1131 rc = namespace_update_uuid(nd_region, dev, uuid, ns_uuid); in uuid_store()
1135 kfree(uuid); in uuid_store()
1143 static DEVICE_ATTR_RW(uuid);
1217 u8 *uuid = NULL; in dpa_extents_show() local
1224 uuid = nspm->uuid; in dpa_extents_show()
1229 uuid = nsblk->uuid; in dpa_extents_show()
1233 if (!uuid) in dpa_extents_show()
1236 nd_label_gen_id(&label_id, uuid, flags); in dpa_extents_show()
1399 if (!nspm->uuid) { in nvdimm_namespace_common_probe()
1444 static bool has_uuid_at_pos(struct nd_region *nd_region, u8 *uuid, in has_uuid_at_pos() argument
1464 if (memcmp(nd_label->uuid, uuid, NSLABEL_UUID_LEN) != 0) in has_uuid_at_pos()
1502 if (memcmp(nd_label->uuid, pmem_id, NSLABEL_UUID_LEN) == 0) in select_pmem_id()
1559 if (!has_uuid_at_pos(nd_region, nd_label->uuid, in find_pmem_label_set()
1579 memcpy(select_id, nd_label->uuid, NSLABEL_UUID_LEN); in find_pmem_label_set()
1603 WARN_ON(nspm->alt_name || nspm->uuid); 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()
1689 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL); in nsblk_add_resource()
1783 if (memcmp(nsblk->uuid, nd_label->uuid, in create_namespace_blk()
1813 nsblk->uuid = kmemdup(nd_label->uuid, NSLABEL_UUID_LEN, in create_namespace_blk()
1815 if (!nsblk->uuid) in create_namespace_blk()