Lines Matching refs:ndd

298 	struct nvdimm_drvdata *ndd = to_ndd(nd_mapping);  in nd_namespace_blk_size()  local
306 for_each_dpa_resource(ndd, res) in nd_namespace_blk_size()
316 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in __nd_namespace_blk_validate() local
321 if (!nsblk->uuid || !nsblk->lbasize || !ndd) in __nd_namespace_blk_validate()
326 for_each_dpa_resource(ndd, res) { in __nd_namespace_blk_validate()
345 for_each_dpa_resource(ndd, res) in __nd_namespace_blk_validate()
451 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_free() local
459 for_each_dpa_resource(ndd, res) in scan_free()
468 nd_dbg_dpa(nd_region, ndd, res, "delete %d\n", rc); in scan_free()
469 nvdimm_free_dpa(ndd, res); in scan_free()
486 nd_dbg_dpa(nd_region, ndd, res, "shrink %d\n", rc); in scan_free()
526 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_dpa_allocation() local
538 res = nvdimm_allocate_dpa(ndd, label_id, first_dpa, n); in init_dpa_allocation()
542 nd_dbg_dpa(nd_region, ndd, res, "init %d\n", rc); in init_dpa_allocation()
563 static void space_valid(struct nd_region *nd_region, struct nvdimm_drvdata *ndd, in space_valid() argument
620 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_allocate() local
625 for_each_dpa_resource(ndd, res) in scan_allocate()
634 for_each_dpa_resource(ndd, res) { in scan_allocate()
651 space_valid(nd_region, ndd, label_id, NULL, next, exist, in scan_allocate()
662 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
673 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
721 new_res = nvdimm_allocate_dpa(ndd, label_id, in scan_allocate()
736 nd_dbg_dpa(nd_region, ndd, new_res, "%s(%d) %d\n", in scan_allocate()
761 if ((is_pmem || !ndd->dpa.child) && n == to_allocate) in scan_allocate()
769 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in merge_dpa() local
775 for_each_dpa_resource(ndd, res) { in merge_dpa()
785 nvdimm_free_dpa(ndd, next); in merge_dpa()
787 nd_dbg_dpa(nd_region, ndd, res, "merge %d\n", rc); in merge_dpa()
837 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in release_free_pmem() local
840 for_each_dpa_resource_safe(ndd, res, _res) in release_free_pmem()
842 nvdimm_free_dpa(ndd, res); in release_free_pmem()
933 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_pmem_set_resource() local
937 if (!ndd) { in nd_namespace_pmem_set_resource()
945 for_each_dpa_resource(ndd, res) in nd_namespace_pmem_set_resource()
976 struct nvdimm_drvdata *ndd; in __size_store() local
1019 ndd = to_ndd(nd_mapping); in __size_store()
1025 if (!ndd) in __size_store()
1028 allocated += nvdimm_allocated_dpa(ndd, &label_id); in __size_store()
1241 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in namespace_update_uuid() local
1245 for_each_dpa_resource(ndd, res) in namespace_update_uuid()
1424 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in dpa_extents_show() local
1427 for_each_dpa_resource(ndd, res) in dpa_extents_show()
1445 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in btt_claim_class() local
1452 if (!ndd) { in btt_claim_class()
1457 nsindex = to_namespace_index(ndd, ndd->ns_current); in btt_claim_class()
1800 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in has_uuid_at_pos() local
1821 if (namespace_label_has(ndd, type_guid) in has_uuid_at_pos()
1824 dev_dbg(ndd->dev, "expect type_guid %pUb got %pUb\n", in has_uuid_at_pos()
1831 dev_dbg(ndd->dev, "duplicate entry for uuid\n"); in has_uuid_at_pos()
1857 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in select_pmem_id() local
1890 dev_name(ndd->dev), nd_label->uuid); in select_pmem_id()
1985 struct nvdimm_drvdata *ndd; in create_namespace_pmem() local
2006 ndd = to_ndd(nd_mapping); in create_namespace_pmem()
2007 if (namespace_label_has(ndd, abstraction_guid)) in create_namespace_pmem()
2038 struct nvdimm_drvdata *ndd, struct nd_namespace_blk *nsblk, in nsblk_add_resource() argument
2051 for_each_dpa_resource(ndd, res) in nsblk_add_resource()
2182 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in add_namespace_resource() local
2197 res = nsblk_add_resource(nd_region, ndd, in add_namespace_resource()
2202 nd_dbg_dpa(nd_region, ndd, res, "%d assign\n", count); in add_namespace_resource()
2221 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in create_namespace_blk() local
2227 if (namespace_label_has(ndd, type_guid)) { in create_namespace_blk()
2229 dev_dbg(ndd->dev, "expect type_guid %pUb got %pUb\n", in create_namespace_blk()
2236 dev_dbg(ndd->dev, "expect cookie %#llx got %#llx\n", in create_namespace_blk()
2253 if (namespace_label_has(ndd, abstraction_guid)) in create_namespace_blk()
2265 res = nsblk_add_resource(nd_region, ndd, nsblk, in create_namespace_blk()
2269 nd_dbg_dpa(nd_region, ndd, res, "%d: assign\n", count); in create_namespace_blk()
2344 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_labels() local
2347 nsindex = to_namespace_index(ndd, ndd->ns_current); in scan_labels()
2473 struct nvdimm_drvdata *ndd = nd_mapping->ndd; in deactivate_labels() local
2480 put_ndd(ndd); in deactivate_labels()
2481 nd_mapping->ndd = NULL; in deactivate_labels()
2482 if (ndd) in deactivate_labels()
2493 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_active_labels() local
2502 if (!ndd) { in init_active_labels()
2516 nd_mapping->ndd = ndd; in init_active_labels()
2518 get_ndd(ndd); in init_active_labels()
2520 count = nd_label_active_count(ndd); in init_active_labels()
2521 dev_dbg(ndd->dev, "count: %d\n", count); in init_active_labels()
2530 label = nd_label_active(ndd, j); in init_active_labels()