Lines Matching refs:ndd
273 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_blk_size() local
281 for_each_dpa_resource(ndd, res) in nd_namespace_blk_size()
291 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in __nd_namespace_blk_validate() local
296 if (!nsblk->uuid || !nsblk->lbasize || !ndd) in __nd_namespace_blk_validate()
301 for_each_dpa_resource(ndd, res) { in __nd_namespace_blk_validate()
320 for_each_dpa_resource(ndd, res) in __nd_namespace_blk_validate()
426 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_free() local
434 for_each_dpa_resource(ndd, res) in scan_free()
443 nd_dbg_dpa(nd_region, ndd, res, "delete %d\n", rc); in scan_free()
444 nvdimm_free_dpa(ndd, res); in scan_free()
461 nd_dbg_dpa(nd_region, ndd, res, "shrink %d\n", rc); in scan_free()
501 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_dpa_allocation() local
513 res = nvdimm_allocate_dpa(ndd, label_id, first_dpa, n); in init_dpa_allocation()
517 nd_dbg_dpa(nd_region, ndd, res, "init %d\n", rc); in init_dpa_allocation()
538 static void space_valid(struct nd_region *nd_region, struct nvdimm_drvdata *ndd, in space_valid() argument
600 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_allocate() local
605 for_each_dpa_resource(ndd, res) in scan_allocate()
614 for_each_dpa_resource(ndd, res) { in scan_allocate()
631 space_valid(nd_region, ndd, label_id, NULL, next, exist, in scan_allocate()
642 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
653 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
701 new_res = nvdimm_allocate_dpa(ndd, label_id, in scan_allocate()
716 nd_dbg_dpa(nd_region, ndd, new_res, "%s(%d) %d\n", in scan_allocate()
741 if ((is_pmem || !ndd->dpa.child) && n == to_allocate) in scan_allocate()
749 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in merge_dpa() local
755 for_each_dpa_resource(ndd, res) { in merge_dpa()
765 nvdimm_free_dpa(ndd, next); in merge_dpa()
767 nd_dbg_dpa(nd_region, ndd, res, "merge %d\n", rc); in merge_dpa()
817 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in release_free_pmem() local
820 for_each_dpa_resource_safe(ndd, res, _res) in release_free_pmem()
822 nvdimm_free_dpa(ndd, res); in release_free_pmem()
913 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_pmem_set_resource() local
917 if (!ndd) { in nd_namespace_pmem_set_resource()
925 for_each_dpa_resource(ndd, res) in nd_namespace_pmem_set_resource()
956 struct nvdimm_drvdata *ndd; in __size_store() local
999 ndd = to_ndd(nd_mapping); in __size_store()
1005 if (!ndd) in __size_store()
1008 allocated += nvdimm_allocated_dpa(ndd, &label_id); in __size_store()
1221 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in namespace_update_uuid() local
1225 for_each_dpa_resource(ndd, res) in namespace_update_uuid()
1404 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in dpa_extents_show() local
1407 for_each_dpa_resource(ndd, res) in dpa_extents_show()
1425 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in btt_claim_class() local
1432 if (!ndd) { in btt_claim_class()
1437 nsindex = to_namespace_index(ndd, ndd->ns_current); in btt_claim_class()
1843 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in has_uuid_at_pos() local
1864 if (namespace_label_has(ndd, type_guid) in has_uuid_at_pos()
1867 dev_dbg(ndd->dev, "expect type_guid %pUb got %pUb\n", in has_uuid_at_pos()
1874 dev_dbg(ndd->dev, "duplicate entry for uuid\n"); in has_uuid_at_pos()
1900 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in select_pmem_id() local
1933 dev_name(ndd->dev), nd_label->uuid); in select_pmem_id()
2028 struct nvdimm_drvdata *ndd; in create_namespace_pmem() local
2049 ndd = to_ndd(nd_mapping); in create_namespace_pmem()
2050 if (namespace_label_has(ndd, abstraction_guid)) in create_namespace_pmem()
2081 struct nvdimm_drvdata *ndd, struct nd_namespace_blk *nsblk, in nsblk_add_resource() argument
2094 for_each_dpa_resource(ndd, res) in nsblk_add_resource()
2223 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in add_namespace_resource() local
2238 res = nsblk_add_resource(nd_region, ndd, in add_namespace_resource()
2243 nd_dbg_dpa(nd_region, ndd, res, "%d assign\n", count); in add_namespace_resource()
2262 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in create_namespace_blk() local
2268 if (namespace_label_has(ndd, type_guid)) { in create_namespace_blk()
2270 dev_dbg(ndd->dev, "expect type_guid %pUb got %pUb\n", in create_namespace_blk()
2277 dev_dbg(ndd->dev, "expect cookie %#llx got %#llx\n", in create_namespace_blk()
2294 if (namespace_label_has(ndd, abstraction_guid)) in create_namespace_blk()
2306 res = nsblk_add_resource(nd_region, ndd, nsblk, in create_namespace_blk()
2310 nd_dbg_dpa(nd_region, ndd, res, "%d: assign\n", count); in create_namespace_blk()
2385 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_labels() local
2388 nsindex = to_namespace_index(ndd, ndd->ns_current); in scan_labels()
2514 struct nvdimm_drvdata *ndd = nd_mapping->ndd; in deactivate_labels() local
2521 put_ndd(ndd); in deactivate_labels()
2522 nd_mapping->ndd = NULL; in deactivate_labels()
2523 if (ndd) in deactivate_labels()
2534 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_active_labels() local
2543 if (!ndd) { in init_active_labels()
2558 nd_mapping->ndd = ndd; in init_active_labels()
2560 get_ndd(ndd); in init_active_labels()
2562 count = nd_label_active_count(ndd); in init_active_labels()
2563 dev_dbg(ndd->dev, "count: %d\n", count); in init_active_labels()
2572 label = nd_label_active(ndd, j); in init_active_labels()