Lines Matching refs:uuid
32 kfree(nspm->uuid);
46 uuid2 = nspm->uuid;
50 uuid2 = nd_btt->uuid;
54 uuid2 = nd_pfn->uuid;
71 * nd_is_uuid_unique - verify that no other namespace has @uuid
73 * @uuid: uuid to check
75 bool nd_is_uuid_unique(struct device *dev, uuid_t *uuid)
82 if (device_for_each_child(&nvdimm_bus->dev, uuid,
177 return nspm->uuid;
249 if (size == 0 && nspm->uuid)
251 else if (!nspm->uuid)
698 if (size && !nspm->uuid) {
703 if (size && nspm->uuid) {
714 nd_label_gen_id(&label_id, nspm->uuid, 0);
733 static bool uuid_not_set(const uuid_t *uuid, struct device *dev,
736 if (!uuid) {
737 dev_dbg(dev, "%s: uuid not set\n", where);
753 uuid_t *uuid = NULL;
761 uuid = nspm->uuid;
766 * We need a uuid for the allocation-label and dimm(s) on which
769 if (uuid_not_set(uuid, dev, __func__))
783 nd_label_gen_id(&label_id, uuid, flags);
857 kfree(nspm->uuid);
858 nspm->uuid = NULL;
931 return nspm->uuid;
939 uuid_t *uuid = namespace_to_uuid(dev);
941 if (IS_ERR(uuid))
942 return PTR_ERR(uuid);
943 if (uuid)
944 return sprintf(buf, "%pUb\n", uuid);
949 * namespace_update_uuid - check for a unique uuid and whether we're "renaming"
952 * @new_uuid: incoming uuid
953 * @old_uuid: reference to the uuid storage location in the namespace object
970 * If we've already written a label with this uuid, then it's
971 * too late to rename because we can't reliably update the uuid
973 * namespace to abandon the old uuid.
980 * would be NULL above if this uuid did not exist in the
983 * FIXME: can we delete uuid with zero dpa allocated?
1006 uuid_t uuid;
1010 nsl_get_uuid(ndd, nd_label, &uuid);
1011 nd_label_gen_id(&label_id, &uuid,
1028 uuid_t *uuid = NULL;
1035 ns_uuid = &nspm->uuid;
1045 rc = nd_uuid_store(dev, &uuid, buf, len);
1047 rc = namespace_update_uuid(nd_region, dev, uuid, ns_uuid);
1051 kfree(uuid);
1059 static DEVICE_ATTR_RW(uuid);
1136 uuid_t *uuid = NULL;
1144 uuid = nspm->uuid;
1148 if (!uuid)
1151 nd_label_gen_id(&label_id, uuid, flags);
1504 if (uuid_not_set(nspm->uuid, &ndns->dev, __func__))
1554 static bool has_uuid_at_pos(struct nd_region *nd_region, const uuid_t *uuid,
1578 if (!nsl_uuid_equal(ndd, nd_label, uuid))
1586 dev_dbg(ndd->dev, "duplicate entry for uuid\n");
1676 uuid_t uuid;
1708 nsl_get_uuid(ndd, nd_label, &uuid);
1709 if (has_uuid_at_pos(nd_region, &uuid, cookie, i))
1711 if (has_uuid_at_pos(nd_region, &uuid, altcookie, i))
1720 * Give up if we don't find an instance of a uuid at each
1722 * find a dimm with two instances of the same uuid.
1735 nsl_get_uuid(ndd, nd_label, &uuid);
1736 rc = select_pmem_id(nd_region, &uuid);
1759 WARN_ON(nspm->alt_name || nspm->uuid);
1762 nsl_get_uuid(ndd, label0, &uuid);
1763 nspm->uuid = kmemdup(&uuid, sizeof(uuid_t), GFP_KERNEL);
1769 if (!nspm->alt_name || !nspm->uuid) {
1894 uuid_t *uuid = namespace_to_uuid(devs[i]);
1896 if (IS_ERR(uuid)) {
1901 if (!nsl_uuid_equal(ndd, nd_label, uuid))
1904 "error: conflicting extents for uuid: %pUb\n", uuid);