Lines Matching refs:ndns

24 	nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns);  in nd_pfn_release()
174 rc = sprintf(buf, "%s\n", nd_pfn->ndns in namespace_show()
175 ? dev_name(&nd_pfn->ndns->dev) : ""); in namespace_show()
188 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); in namespace_store()
208 struct nd_namespace_common *ndns = nd_pfn->ndns; in resource_show() local
210 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show()
234 struct nd_namespace_common *ndns = nd_pfn->ndns; in size_show() local
237 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in size_show()
299 struct nd_namespace_common *ndns) in nd_pfn_devinit() argument
311 if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) { in nd_pfn_devinit()
312 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in nd_pfn_devinit()
313 dev_name(ndns->claim)); in nd_pfn_devinit()
367 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_clear_memmap_errors() local
377 nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_clear_memmap_errors()
385 devm_namespace_disable(&nd_pfn->dev, ndns); in nd_pfn_clear_memmap_errors()
386 rc = devm_namespace_enable(&nd_pfn->dev, ndns, le64_to_cpu(pfn_sb->dataoff)); in nd_pfn_clear_memmap_errors()
406 rc = nvdimm_write_bytes(ndns, nsoff, zero_page, in nd_pfn_clear_memmap_errors()
459 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_validate() local
460 const uuid_t *parent_uuid = nd_dev_to_uuid(&ndns->dev); in nd_pfn_validate()
462 if (!pfn_sb || !ndns) in nd_pfn_validate()
468 if (nvdimm_read_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0)) in nd_pfn_validate()
575 if (align > nvdimm_namespace_capacity(ndns)) { in nd_pfn_validate()
577 align, nvdimm_namespace_capacity(ndns)); in nd_pfn_validate()
587 nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_validate()
592 dev_name(&ndns->dev)); in nd_pfn_validate()
622 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns) in nd_pfn_probe() argument
628 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_pfn_probe()
630 if (ndns->force_raw) in nd_pfn_probe()
633 switch (ndns->claim_class) { in nd_pfn_probe()
641 nvdimm_bus_lock(&ndns->dev); in nd_pfn_probe()
643 pfn_dev = nd_pfn_devinit(nd_pfn, ndns); in nd_pfn_probe()
644 nvdimm_bus_unlock(&ndns->dev); in nd_pfn_probe()
653 nd_detach_ndns(pfn_dev, &nd_pfn->ndns); in nd_pfn_probe()
691 struct nd_namespace_common *ndns = nd_pfn->ndns; in __nvdimm_setup_pfn() local
692 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in __nvdimm_setup_pfn()
729 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_init() local
730 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_init()
780 dev_name(&ndns->dev), &start, in nd_pfn_init()
821 dev_name(&ndns->dev)); in nd_pfn_init()
831 memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16); in nd_pfn_init()
848 return nvdimm_write_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0); in nd_pfn_init()
859 if (!nd_pfn->uuid || !nd_pfn->ndns) in nvdimm_setup_pfn()