Lines Matching full:uuid
32 kfree(nspm->uuid); in namespace_pmem_release()
46 uuid2 = nspm->uuid; in is_uuid_busy()
50 uuid2 = nd_btt->uuid; in is_uuid_busy()
54 uuid2 = nd_pfn->uuid; in is_uuid_busy()
71 * nd_is_uuid_unique - verify that no other namespace has @uuid
73 * @uuid: uuid to check
75 * Returns: %true if the uuid is unique, %false if not
77 bool nd_is_uuid_unique(struct device *dev, uuid_t *uuid) in nd_is_uuid_unique() argument
84 if (device_for_each_child(&nvdimm_bus->dev, uuid, in nd_is_uuid_unique()
179 return nspm->uuid; in nd_dev_to_uuid()
251 if (size == 0 && nspm->uuid) in nd_namespace_label_update()
253 else if (!nspm->uuid) in nd_namespace_label_update()
702 if (size && !nspm->uuid) { in nd_namespace_pmem_set_resource()
707 if (size && nspm->uuid) { in nd_namespace_pmem_set_resource()
718 nd_label_gen_id(&label_id, nspm->uuid, 0); in nd_namespace_pmem_set_resource()
737 static bool uuid_not_set(const uuid_t *uuid, struct device *dev, in uuid_not_set() argument
740 if (!uuid) { in uuid_not_set()
741 dev_dbg(dev, "%s: uuid not set\n", where); in uuid_not_set()
757 uuid_t *uuid = NULL; in __size_store() local
765 uuid = nspm->uuid; in __size_store()
770 * We need a uuid for the allocation-label and dimm(s) on which in __size_store()
773 if (uuid_not_set(uuid, dev, __func__)) in __size_store()
787 nd_label_gen_id(&label_id, uuid, flags); in __size_store()
861 kfree(nspm->uuid); in size_store()
862 nspm->uuid = NULL; in size_store()
927 return nspm->uuid; in namespace_to_uuid()
935 uuid_t *uuid = namespace_to_uuid(dev); in uuid_show() local
937 if (IS_ERR(uuid)) in uuid_show()
938 return PTR_ERR(uuid); in uuid_show()
939 if (uuid) in uuid_show()
940 return sprintf(buf, "%pUb\n", uuid); in uuid_show()
945 * namespace_update_uuid - check for a unique uuid and whether we're "renaming"
948 * @new_uuid: incoming uuid
949 * @old_uuid: reference to the uuid storage location in the namespace object
968 * If we've already written a label with this uuid, then it's in namespace_update_uuid()
969 * too late to rename because we can't reliably update the uuid in namespace_update_uuid()
971 * namespace to abandon the old uuid. in namespace_update_uuid()
978 * would be NULL above if this uuid did not exist in the in namespace_update_uuid()
981 * FIXME: can we delete uuid with zero dpa allocated? in namespace_update_uuid()
1004 uuid_t uuid; in namespace_update_uuid() local
1008 nsl_get_uuid(ndd, nd_label, &uuid); in namespace_update_uuid()
1009 nd_label_gen_id(&label_id, &uuid, in namespace_update_uuid()
1026 uuid_t *uuid = NULL; in uuid_store() local
1033 ns_uuid = &nspm->uuid; in uuid_store()
1043 rc = nd_uuid_store(dev, &uuid, buf, len); in uuid_store()
1045 rc = namespace_update_uuid(nd_region, dev, uuid, ns_uuid); in uuid_store()
1049 kfree(uuid); in uuid_store()
1055 static DEVICE_ATTR_RW(uuid);
1142 uuid_t *uuid = NULL; in dpa_extents_show() local
1150 uuid = nspm->uuid; in dpa_extents_show()
1154 if (!uuid) in dpa_extents_show()
1157 nd_label_gen_id(&label_id, uuid, flags); in dpa_extents_show()
1506 if (uuid_not_set(nspm->uuid, &ndns->dev, __func__)) in nvdimm_namespace_common_probe()
1556 static bool has_uuid_at_pos(struct nd_region *nd_region, const uuid_t *uuid, in has_uuid_at_pos() argument
1580 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in has_uuid_at_pos()
1588 dev_dbg(ndd->dev, "duplicate entry for uuid\n"); in has_uuid_at_pos()
1677 uuid_t uuid; in create_namespace_pmem() local
1709 nsl_get_uuid(ndd, nd_label, &uuid); in create_namespace_pmem()
1710 if (has_uuid_at_pos(nd_region, &uuid, cookie, i)) in create_namespace_pmem()
1712 if (has_uuid_at_pos(nd_region, &uuid, altcookie, i)) in create_namespace_pmem()
1721 * Give up if we don't find an instance of a uuid at each in create_namespace_pmem()
1723 * find a dimm with two instances of the same uuid. in create_namespace_pmem()
1736 nsl_get_uuid(ndd, nd_label, &uuid); in create_namespace_pmem()
1737 rc = select_pmem_id(nd_region, &uuid); in create_namespace_pmem()
1760 WARN_ON(nspm->alt_name || nspm->uuid); in create_namespace_pmem()
1763 nsl_get_uuid(ndd, label0, &uuid); in create_namespace_pmem()
1764 nspm->uuid = kmemdup(&uuid, sizeof(uuid_t), GFP_KERNEL); in create_namespace_pmem()
1770 if (!nspm->alt_name || !nspm->uuid) { in create_namespace_pmem()
1892 uuid_t *uuid = namespace_to_uuid(devs[i]); in add_namespace_resource() local
1894 if (IS_ERR(uuid)) { in add_namespace_resource()
1899 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in add_namespace_resource()
1902 "error: conflicting extents for uuid: %pUb\n", uuid); in add_namespace_resource()