Lines Matching defs:ndns
23 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns);
173 rc = sprintf(buf, "%s\n", nd_pfn->ndns
174 ? dev_name(&nd_pfn->ndns->dev) : "");
187 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len);
207 struct nd_namespace_common *ndns = nd_pfn->ndns;
209 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev);
233 struct nd_namespace_common *ndns = nd_pfn->ndns;
236 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev);
296 struct nd_namespace_common *ndns)
307 if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) {
308 dev_dbg(&ndns->dev, "failed, already claimed by %s\n",
309 dev_name(ndns->claim));
363 struct nd_namespace_common *ndns = nd_pfn->ndns;
373 nsio = to_nd_namespace_io(&ndns->dev);
381 devm_namespace_disable(&nd_pfn->dev, ndns);
382 rc = devm_namespace_enable(&nd_pfn->dev, ndns, le64_to_cpu(pfn_sb->dataoff));
402 rc = nvdimm_write_bytes(ndns, nsoff, zero_page,
454 struct nd_namespace_common *ndns = nd_pfn->ndns;
455 const u8 *parent_uuid = nd_dev_to_uuid(&ndns->dev);
457 if (!pfn_sb || !ndns)
463 if (nvdimm_read_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0))
569 if (align > nvdimm_namespace_capacity(ndns)) {
571 align, nvdimm_namespace_capacity(ndns));
581 nsio = to_nd_namespace_io(&ndns->dev);
585 dev_name(&ndns->dev));
613 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns)
619 struct nd_region *nd_region = to_nd_region(ndns->dev.parent);
621 if (ndns->force_raw)
624 switch (ndns->claim_class) {
632 nvdimm_bus_lock(&ndns->dev);
634 pfn_dev = nd_pfn_devinit(nd_pfn, ndns);
635 nvdimm_bus_unlock(&ndns->dev);
644 nd_detach_ndns(pfn_dev, &nd_pfn->ndns);
682 struct nd_namespace_common *ndns = nd_pfn->ndns;
683 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev);
720 struct nd_namespace_common *ndns = nd_pfn->ndns;
721 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev);
777 dev_name(&ndns->dev), &start,
804 dev_name(&ndns->dev));
814 memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16);
828 return nvdimm_write_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0);
839 if (!nd_pfn->uuid || !nd_pfn->ndns)