Lines Matching refs:uuid

41  * name or uuid.
51 char *uuid;
75 * Protects use of mdptr to obtain hash cell name and uuid from mapped device.
116 c = strcmp(hc->uuid, str);
183 c = strcmp(hc->uuid, new_hc->uuid);
216 static struct hash_cell *alloc_cell(const char *name, const char *uuid,
231 if (!uuid)
232 hc->uuid = NULL;
235 hc->uuid = kstrdup(uuid, GFP_KERNEL);
236 if (!hc->uuid) {
253 kfree(hc->uuid);
259 * The kdev_t and uuid of a device can never change once it is
262 static int dm_hash_insert(const char *name, const char *uuid, struct mapped_device *md)
269 cell = alloc_cell(name, uuid, md);
285 if (uuid) {
286 hc = __get_uuid_cell(uuid);
392 * Set the uuid of a hash_cell that isn't already set.
397 hc->uuid = new_uuid;
455 change_uuid ? "uuid" : "name",
469 param->name, change_uuid ? "uuid " : "", new);
476 * Does this device already have a uuid?
478 if (change_uuid && hc->uuid) {
479 DMERR("Unable to change uuid of mapped device %s to %s "
480 "because uuid is already set to %s",
481 param->name, new, hc->uuid);
580 val = hc->uuid ? hc->uuid : "";
608 if (!filter_device(hc, param->name, param->uuid))
612 if (param->flags & DM_UUID_FLAG && hc->uuid)
613 needed += align_val(strlen(hc->uuid) + 1);
635 if (!filter_device(hc, param->name, param->uuid))
651 if (hc->uuid) {
653 strcpy(uuid_ptr, hc->uuid);
654 uuid_ptr = align_ptr(uuid_ptr + strlen(hc->uuid) + 1);
895 r = dm_hash_insert(param->name, *param->uuid ? param->uuid : NULL, md);
918 if (*param->uuid) {
920 DMERR("Invalid ioctl structure: uuid %s, name %s, dev %llx",
921 param->uuid, param->name, (unsigned long long)param->dev);
925 hc = __get_uuid_cell(param->uuid);
946 * Sneakily write in both the name and the uuid
950 if (hc->uuid)
951 strscpy(param->uuid, hc->uuid, sizeof(param->uuid));
953 param->uuid[0] = '\0';
1054 DMERR("Invalid new mapped device name or uuid string supplied.");
2035 } else if (*param->uuid && *param->name) {
2036 DMERR("only supply one of name or uuid, cmd(%u)", cmd);
2042 param->uuid[DM_UUID_LEN - 1] = '\0';
2218 * dm_copy_name_and_uuid - Copy mapped device name & uuid into supplied buffers
2221 * @uuid: Buffer (size DM_UUID_LEN) for uuid or empty string if uuid not defined
2223 int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid)
2240 if (uuid)
2241 strcpy(uuid, hc->uuid ? : "");
2292 r = dm_hash_insert(dmi->name, *dmi->uuid ? dmi->uuid : NULL, md);