Lines Matching refs:label_id
269 struct nd_label_id label_id; in nd_namespace_blk_size() local
275 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL); in nd_namespace_blk_size()
277 if (strcmp(res->name, label_id.id) == 0) in nd_namespace_blk_size()
287 struct nd_label_id label_id; in __nd_namespace_blk_validate() local
295 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL); in __nd_namespace_blk_validate()
297 if (strcmp(res->name, label_id.id) != 0) in __nd_namespace_blk_validate()
417 struct nd_mapping *nd_mapping, struct nd_label_id *label_id, in scan_free() argument
420 bool is_blk = strncmp(label_id->id, "blk", 3) == 0; in scan_free()
430 if (strcmp(res->name, label_id->id) == 0) in scan_free()
475 struct nd_label_id *label_id, resource_size_t n) in shrink_dpa_allocation() argument
483 rc = scan_free(nd_region, nd_mapping, label_id, n); in shrink_dpa_allocation()
491 static resource_size_t init_dpa_allocation(struct nd_label_id *label_id, in init_dpa_allocation() argument
495 bool is_blk = strncmp(label_id->id, "blk", 3) == 0; in init_dpa_allocation()
508 res = nvdimm_allocate_dpa(ndd, label_id, first_dpa, n); in init_dpa_allocation()
517 struct nd_label_id *label_id, struct resource *res) in space_valid() argument
526 if (!res || strcmp(res->name, label_id->id) == 0) in space_valid()
536 struct nd_mapping *nd_mapping, struct nd_label_id *label_id, in scan_allocate() argument
540 bool is_reserve = strcmp(label_id->id, "pmem-reserve") == 0; in scan_allocate()
541 bool is_pmem = strncmp(label_id->id, "pmem", 4) == 0; in scan_allocate()
566 if (space_valid(is_pmem, is_reserve, label_id, NULL)) in scan_allocate()
574 if (space_valid(is_pmem, is_reserve, label_id, res) in scan_allocate()
585 if (space_valid(is_pmem, is_reserve, label_id, res) in scan_allocate()
597 if (strcmp(res->name, label_id->id) == 0) { in scan_allocate()
608 if (strcmp(next->name, label_id->id) == 0) { in scan_allocate()
617 } else if (strcmp(res->name, label_id->id) == 0) { in scan_allocate()
623 if (strcmp(res->name, label_id->id) == 0) in scan_allocate()
639 new_res = nvdimm_allocate_dpa(ndd, label_id, in scan_allocate()
680 return init_dpa_allocation(label_id, nd_region, nd_mapping, n); in scan_allocate()
685 struct nd_mapping *nd_mapping, struct nd_label_id *label_id) in merge_dpa() argument
690 if (strncmp("pmem", label_id->id, 4) == 0) in merge_dpa()
698 if (!next || strcmp(res->name, label_id->id) != 0 in merge_dpa()
699 || strcmp(next->name, label_id->id) != 0 in merge_dpa()
719 struct nd_label_id label_id; in __reserve_free_pmem() local
729 memset(&label_id, 0, sizeof(label_id)); in __reserve_free_pmem()
730 strcat(label_id.id, "pmem-reserve"); in __reserve_free_pmem()
741 rem = scan_allocate(nd_region, nd_mapping, &label_id, n); in __reserve_free_pmem()
790 struct nd_label_id *label_id, resource_size_t n) in grow_dpa_allocation() argument
793 bool is_pmem = strncmp(label_id->id, "pmem", 4) == 0; in grow_dpa_allocation()
814 label_id, rem); in grow_dpa_allocation()
830 rc = merge_dpa(nd_region, nd_mapping, label_id); in grow_dpa_allocation()
853 struct nd_label_id label_id; in __size_store() local
886 nd_label_gen_id(&label_id, uuid, flags); in __size_store()
898 allocated += nvdimm_allocated_dpa(ndd, &label_id); in __size_store()
911 rc = shrink_dpa_allocation(nd_region, &label_id, in __size_store()
914 rc = grow_dpa_allocation(nd_region, &label_id, val - allocated); in __size_store()
1215 struct nd_label_id label_id; in dpa_extents_show() local
1236 nd_label_gen_id(&label_id, uuid, flags); in dpa_extents_show()
1243 if (strcmp(res->name, label_id.id) == 0) in dpa_extents_show()
1686 struct nd_label_id label_id; in nsblk_add_resource() local
1689 nd_label_gen_id(&label_id, nsblk->uuid, NSLABEL_FLAG_LOCAL); in nsblk_add_resource()
1697 if (strcmp(res->name, label_id.id) == 0 in nsblk_add_resource()