Lines Matching refs:uuid
31 kfree(nspm->uuid);
43 kfree(nsblk->uuid);
59 uuid2 = nspm->uuid;
63 uuid2 = nsblk->uuid;
67 uuid2 = nd_btt->uuid;
71 uuid2 = nd_pfn->uuid;
88 * nd_is_uuid_unique - verify that no other namespace has @uuid
90 * @uuid: uuid to check
92 bool nd_is_uuid_unique(struct device *dev, u8 *uuid)
99 if (device_for_each_child(&nvdimm_bus->dev, uuid,
205 return nspm->uuid;
209 return nsblk->uuid;
278 if (!nsblk->uuid)
280 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL);
296 if (!nsblk->uuid || !nsblk->lbasize || !ndd)
300 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL);
362 if (size == 0 && nspm->uuid)
364 else if (!nspm->uuid)
372 if (size == 0 && nsblk->uuid)
374 else if (!nsblk->uuid || !nsblk->lbasize)
906 if (size && !nspm->uuid) {
911 if (size && nspm->uuid) {
922 nd_label_gen_id(&label_id, nspm->uuid, 0);
941 static bool uuid_not_set(const u8 *uuid, struct device *dev, const char *where)
943 if (!uuid) {
944 dev_dbg(dev, "%s: uuid not set\n", where);
960 u8 *uuid = NULL;
968 uuid = nspm->uuid;
973 uuid = nsblk->uuid;
979 * We need a uuid for the allocation-label and dimm(s) on which
982 if (uuid_not_set(uuid, dev, __func__))
996 nd_label_gen_id(&label_id, uuid, flags);
1053 u8 **uuid = NULL;
1070 uuid = &nspm->uuid;
1074 uuid = &nsblk->uuid;
1077 if (rc == 0 && val == 0 && uuid) {
1079 kfree(*uuid);
1080 *uuid = NULL;
1155 return nspm->uuid;
1159 return nsblk->uuid;
1167 u8 *uuid = namespace_to_uuid(dev);
1169 if (IS_ERR(uuid))
1170 return PTR_ERR(uuid);
1171 if (uuid)
1172 return sprintf(buf, "%pUb\n", uuid);
1177 * namespace_update_uuid - check for a unique uuid and whether we're "renaming"
1180 * @new_uuid: incoming uuid
1181 * @old_uuid: reference to the uuid storage location in the namespace object
1198 * If we've already written a label with this uuid, then it's
1199 * too late to rename because we can't reliably update the uuid
1201 * namespace to abandon the old uuid.
1208 * would be NULL above if this uuid did not exist in the
1211 * FIXME: can we delete uuid with zero dpa allocated?
1237 nd_label_gen_id(&label_id, nd_label->uuid,
1254 u8 *uuid = NULL;
1261 ns_uuid = &nspm->uuid;
1265 ns_uuid = &nsblk->uuid;
1275 rc = nd_uuid_store(dev, &uuid, buf, len);
1277 rc = namespace_update_uuid(nd_region, dev, uuid, ns_uuid);
1281 kfree(uuid);
1289 static DEVICE_ATTR_RW(uuid);
1382 u8 *uuid = NULL;
1389 uuid = nspm->uuid;
1394 uuid = nsblk->uuid;
1398 if (!uuid)
1401 nd_label_gen_id(&label_id, uuid, flags);
1768 if (uuid_not_set(nspm->uuid, &ndns->dev, __func__))
1774 if (uuid_not_set(nsblk->uuid, &ndns->dev, __func__))
1834 static bool has_uuid_at_pos(struct nd_region *nd_region, u8 *uuid,
1861 if (memcmp(nd_label->uuid, uuid, NSLABEL_UUID_LEN) != 0)
1874 dev_dbg(ndd->dev, "duplicate entry for uuid\n");
1910 if (memcmp(nd_label->uuid, pmem_id, NSLABEL_UUID_LEN) == 0)
1933 dev_name(ndd->dev), nd_label->uuid);
1971 nd_label->uuid);
1976 nd_label->uuid);
1992 if (has_uuid_at_pos(nd_region, nd_label->uuid, cookie, i))
1994 if (has_uuid_at_pos(nd_region, nd_label->uuid, altcookie, i))
2003 * Give up if we don't find an instance of a uuid at each
2005 * find a dimm with two instances of the same uuid.
2008 nvdimm_name(nvdimm), nd_label->uuid);
2021 rc = select_pmem_id(nd_region, nd_label->uuid);
2043 WARN_ON(nspm->alt_name || nspm->uuid);
2046 nspm->uuid = kmemdup((void __force *) label0->uuid,
2056 if (!nspm->alt_name || !nspm->uuid) {
2087 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL);
2227 u8 *uuid = namespace_to_uuid(devs[i]);
2230 if (IS_ERR_OR_NULL(uuid)) {
2235 if (memcmp(uuid, nd_label->uuid, NSLABEL_UUID_LEN) != 0)
2246 "error: conflicting extents for uuid: %pUb\n",
2247 nd_label->uuid);
2292 nsblk->uuid = kmemdup(nd_label->uuid, NSLABEL_UUID_LEN,
2297 if (!nsblk->uuid)