Lines Matching refs:ndns
214 static int nd_blk_rw_bytes(struct nd_namespace_common *ndns, in nd_blk_rw_bytes() argument
217 struct nd_blk_device *blk_dev = dev_get_drvdata(ndns->claim); in nd_blk_rw_bytes()
225 dev_WARN_ONCE(&ndns->dev, 1, "request out of range\n"); in nd_blk_rw_bytes()
240 static int nd_blk_attach_disk(struct nd_namespace_common *ndns, in nd_blk_attach_disk() argument
266 disk->driverfs_dev = &ndns->dev; in nd_blk_attach_disk()
273 nvdimm_namespace_disk_name(ndns, disk->disk_name); in nd_blk_attach_disk()
295 struct nd_namespace_common *ndns; in nd_blk_probe() local
300 ndns = nvdimm_namespace_common_probe(dev); in nd_blk_probe()
301 if (IS_ERR(ndns)) in nd_blk_probe()
302 return PTR_ERR(ndns); in nd_blk_probe()
308 nsblk = to_nd_namespace_blk(&ndns->dev); in nd_blk_probe()
309 blk_dev->disk_size = nvdimm_namespace_capacity(ndns); in nd_blk_probe()
311 blk_dev->nsblk = to_nd_namespace_blk(&ndns->dev); in nd_blk_probe()
317 ndns->rw_bytes = nd_blk_rw_bytes; in nd_blk_probe()
319 rc = nvdimm_namespace_attach_btt(ndns); in nd_blk_probe()
320 else if (nd_btt_probe(ndns, blk_dev) == 0) { in nd_blk_probe()
324 rc = nd_blk_attach_disk(ndns, blk_dev); in nd_blk_probe()
342 nvdimm_namespace_detach_btt(to_nd_btt(dev)->ndns); in nd_blk_remove()