Lines Matching refs:label_id

304 	struct nd_label_id label_id;  in nd_namespace_blk_size()  local
310 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL); in nd_namespace_blk_size()
312 if (strcmp(res->name, label_id.id) == 0) in nd_namespace_blk_size()
322 struct nd_label_id label_id; in __nd_namespace_blk_validate() local
330 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL); in __nd_namespace_blk_validate()
332 if (strcmp(res->name, label_id.id) != 0) in __nd_namespace_blk_validate()
452 struct nd_mapping *nd_mapping, struct nd_label_id *label_id, in scan_free() argument
455 bool is_blk = strncmp(label_id->id, "blk", 3) == 0; in scan_free()
465 if (strcmp(res->name, label_id->id) == 0) in scan_free()
510 struct nd_label_id *label_id, resource_size_t n) in shrink_dpa_allocation() argument
518 rc = scan_free(nd_region, nd_mapping, label_id, n); in shrink_dpa_allocation()
526 static resource_size_t init_dpa_allocation(struct nd_label_id *label_id, in init_dpa_allocation() argument
530 bool is_blk = strncmp(label_id->id, "blk", 3) == 0; in init_dpa_allocation()
543 res = nvdimm_allocate_dpa(ndd, label_id, first_dpa, n); in init_dpa_allocation()
569 struct nd_label_id *label_id, struct resource *prev, in space_valid() argument
573 bool is_reserve = strcmp(label_id->id, "pmem-reserve") == 0; in space_valid()
574 bool is_pmem = strncmp(label_id->id, "pmem", 4) == 0; in space_valid()
620 struct nd_mapping *nd_mapping, struct nd_label_id *label_id, in scan_allocate() argument
624 bool is_pmem = strncmp(label_id->id, "pmem", 4) == 0; in scan_allocate()
631 if (strcmp(label_id->id, res->name) == 0) in scan_allocate()
656 space_valid(nd_region, ndd, label_id, NULL, next, exist, in scan_allocate()
667 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
678 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
690 if (strcmp(res->name, label_id->id) == 0) { in scan_allocate()
699 if (strcmp(next->name, label_id->id) == 0) { in scan_allocate()
706 } else if (strcmp(res->name, label_id->id) == 0) { in scan_allocate()
712 if (strcmp(res->name, label_id->id) == 0) in scan_allocate()
726 new_res = nvdimm_allocate_dpa(ndd, label_id, in scan_allocate()
767 return init_dpa_allocation(label_id, nd_region, nd_mapping, n); in scan_allocate()
772 struct nd_mapping *nd_mapping, struct nd_label_id *label_id) in merge_dpa() argument
777 if (strncmp("pmem", label_id->id, 4) == 0) in merge_dpa()
785 if (!next || strcmp(res->name, label_id->id) != 0 in merge_dpa()
786 || strcmp(next->name, label_id->id) != 0 in merge_dpa()
806 struct nd_label_id label_id; in __reserve_free_pmem() local
816 memset(&label_id, 0, sizeof(label_id)); in __reserve_free_pmem()
817 strcat(label_id.id, "pmem-reserve"); in __reserve_free_pmem()
828 rem = scan_allocate(nd_region, nd_mapping, &label_id, n); in __reserve_free_pmem()
877 struct nd_label_id *label_id, resource_size_t n) in grow_dpa_allocation() argument
880 bool is_pmem = strncmp(label_id->id, "pmem", 4) == 0; in grow_dpa_allocation()
901 label_id, rem); in grow_dpa_allocation()
917 rc = merge_dpa(nd_region, nd_mapping, label_id); in grow_dpa_allocation()
939 struct nd_label_id label_id; in nd_namespace_pmem_set_resource() local
947 nd_label_gen_id(&label_id, nspm->uuid, 0); in nd_namespace_pmem_set_resource()
951 if (strcmp(res->name, label_id.id) == 0) { in nd_namespace_pmem_set_resource()
982 struct nd_label_id label_id; in __size_store() local
1021 nd_label_gen_id(&label_id, uuid, flags); in __size_store()
1033 allocated += nvdimm_allocated_dpa(ndd, &label_id); in __size_store()
1046 rc = shrink_dpa_allocation(nd_region, &label_id, in __size_store()
1049 rc = grow_dpa_allocation(nd_region, &label_id, val - allocated); in __size_store()
1390 struct nd_label_id label_id; in dpa_extents_show() local
1411 nd_label_gen_id(&label_id, uuid, flags); in dpa_extents_show()
1418 if (strcmp(res->name, label_id.id) == 0) in dpa_extents_show()
2031 struct nd_label_id label_id; in nsblk_add_resource() local
2034 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL); in nsblk_add_resource()
2042 if (strcmp(res->name, label_id.id) == 0 in nsblk_add_resource()