Lines Matching defs:nd_label

274 		struct nd_namespace_label *nd_label)
278 label = (unsigned long) nd_label;
350 struct nd_namespace_label *nd_label, u32 slot)
353 if (slot != __le32_to_cpu(nd_label->slot))
360 sum_save = __le64_to_cpu(nd_label->checksum);
361 nd_label->checksum = __cpu_to_le64(0);
362 sum = nd_fletcher64(nd_label, sizeof_namespace_label(ndd), 1);
363 nd_label->checksum = __cpu_to_le64(sum_save);
385 struct nd_namespace_label *nd_label;
392 nd_label = to_label(ndd, slot);
394 if (!slot_valid(ndd, nd_label, slot))
397 memcpy(label_uuid, nd_label->uuid, NSLABEL_UUID_LEN);
398 flags = __le32_to_cpu(nd_label->flags);
403 __le64_to_cpu(nd_label->dpa),
404 __le64_to_cpu(nd_label->rawsize));
546 struct nd_namespace_label *nd_label;
548 nd_label = to_label(ndd, slot);
550 if (!slot_valid(ndd, nd_label, slot)) {
551 u32 label_slot = __le32_to_cpu(nd_label->slot);
552 u64 size = __le64_to_cpu(nd_label->rawsize);
553 u64 dpa = __le64_to_cpu(nd_label->dpa);
575 struct nd_namespace_label *nd_label;
577 nd_label = to_label(ndd, slot);
578 if (!slot_valid(ndd, nd_label, slot))
705 struct nd_namespace_label *nd_label)
707 return (unsigned long) nd_label
766 struct nd_namespace_label *nd_label;
797 nd_label = to_label(ndd, slot);
798 memset(nd_label, 0, sizeof_namespace_label(ndd));
799 memcpy(nd_label->uuid, nspm->uuid, NSLABEL_UUID_LEN);
801 memcpy(nd_label->name, nspm->alt_name, NSLABEL_NAME_LEN);
802 nd_label->flags = __cpu_to_le32(flags);
803 nd_label->nlabel = __cpu_to_le16(nd_region->ndr_mappings);
804 nd_label->position = __cpu_to_le16(pos);
805 nd_label->isetcookie = __cpu_to_le64(cookie);
806 nd_label->rawsize = __cpu_to_le64(resource_size(res));
807 nd_label->lbasize = __cpu_to_le64(nspm->lbasize);
808 nd_label->dpa = __cpu_to_le64(res->start);
809 nd_label->slot = __cpu_to_le32(slot);
811 guid_copy(&nd_label->type_guid, &nd_set->type_guid);
813 guid_copy(&nd_label->abstraction_guid,
815 &nd_label->abstraction_guid));
819 nd_label->checksum = __cpu_to_le64(0);
820 sum = nd_fletcher64(nd_label, sizeof_namespace_label(ndd), 1);
821 nd_label->checksum = __cpu_to_le64(sum);
826 offset = nd_label_offset(ndd, nd_label);
827 rc = nvdimm_set_config_data(ndd, offset, nd_label,
849 label_ent->label = nd_label;
850 nd_label = NULL;
853 dev_WARN_ONCE(&nspm->nsio.common.dev, nd_label,
855 to_slot(ndd, nd_label));
856 if (nd_label)
877 struct nd_namespace_label *nd_label)
882 if (res->start != __le64_to_cpu(nd_label->dpa))
884 if (resource_size(res) != __le64_to_cpu(nd_label->rawsize))
905 struct nd_namespace_label *nd_label;
948 nd_label = to_label(ndd, slot);
949 memcpy(uuid, nd_label->uuid, NSLABEL_UUID_LEN);
952 res = to_resource(ndd, nd_label);
956 slot = to_slot(ndd, nd_label);
1017 nd_label = to_label(ndd, slot);
1018 memset(nd_label, 0, sizeof_namespace_label(ndd));
1019 memcpy(nd_label->uuid, nsblk->uuid, NSLABEL_UUID_LEN);
1021 memcpy(nd_label->name, nsblk->alt_name,
1023 nd_label->flags = __cpu_to_le32(NSLABEL_FLAG_LOCAL);
1032 nd_label->nlabel = __cpu_to_le16(nsblk->num_resources);
1033 nd_label->position = __cpu_to_le16(0);
1035 nd_label->nlabel = __cpu_to_le16(0xffff);
1036 nd_label->position = __cpu_to_le16(0xffff);
1038 nd_label->isetcookie = __cpu_to_le64(nd_set->cookie2);
1040 nd_label->nlabel = __cpu_to_le16(0); /* N/A */
1041 nd_label->position = __cpu_to_le16(0); /* N/A */
1042 nd_label->isetcookie = __cpu_to_le64(0); /* N/A */
1045 nd_label->dpa = __cpu_to_le64(res->start);
1046 nd_label->rawsize = __cpu_to_le64(resource_size(res));
1047 nd_label->lbasize = __cpu_to_le64(nsblk->lbasize);
1048 nd_label->slot = __cpu_to_le32(slot);
1050 guid_copy(&nd_label->type_guid, &nd_set->type_guid);
1052 guid_copy(&nd_label->abstraction_guid,
1054 &nd_label->abstraction_guid));
1059 nd_label->checksum = __cpu_to_le64(0);
1060 sum = nd_fletcher64(nd_label,
1062 nd_label->checksum = __cpu_to_le64(sum);
1066 offset = nd_label_offset(ndd, nd_label);
1067 rc = nvdimm_set_config_data(ndd, offset, nd_label,
1092 nd_label = label_ent->label;
1093 if (!nd_label)
1096 memcpy(uuid, nd_label->uuid, NSLABEL_UUID_LEN);
1126 nd_label = to_label(ndd, slot);
1127 memcpy(uuid, nd_label->uuid, NSLABEL_UUID_LEN);
1130 res = to_resource(ndd, nd_label);
1136 label_ent->label = nd_label;
1137 nd_label = NULL;
1140 if (nd_label)
1228 struct nd_namespace_label *nd_label = label_ent->label;
1230 if (!nd_label)
1233 memcpy(label_uuid, nd_label->uuid, NSLABEL_UUID_LEN);
1237 slot = to_slot(ndd, nd_label);