diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-06-17 23:14:46 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-06-25 03:24:10 +0200 |
commit | bf9bccc14c05dae8caba29df6187c731710f5380 (patch) | |
tree | cbf00a172bc70598748231748ca2ad14867063ad /drivers/nvdimm/bus.c | |
parent | libnvdimm: namespace indices: read and validate (diff) | |
download | linux-bf9bccc14c05dae8caba29df6187c731710f5380.tar.xz linux-bf9bccc14c05dae8caba29df6187c731710f5380.zip |
libnvdimm: pmem label sets and namespace instantiation.
A complete label set is a PMEM-label per-dimm per-interleave-set where
all the UUIDs match and the interleave set cookie matches the hosting
interleave set.
Present sysfs attributes for manipulation of a PMEM-namespace's
'alt_name', 'uuid', and 'size' attributes. A later patch will make
these settings persistent by writing back the label.
Note that PMEM allocations grow forwards from the start of an interleave
set (lowest dimm-physical-address (DPA)). BLK-namespaces that alias
with a PMEM interleave set will grow allocations backward from the
highest DPA.
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Neil Brown <neilb@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/bus.c')
-rw-r--r-- | drivers/nvdimm/bus.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index ffb43cada625..fddc3f2a8f80 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -97,6 +97,8 @@ static int nvdimm_bus_probe(struct device *dev) rc = nd_drv->probe(dev); if (rc == 0) nd_region_probe_success(nvdimm_bus, dev); + else + nd_region_disable(nvdimm_bus, dev); nvdimm_bus_probe_end(nvdimm_bus); dev_dbg(&nvdimm_bus->dev, "%s.probe(%s) = %d\n", dev->driver->name, @@ -381,8 +383,10 @@ u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd, } EXPORT_SYMBOL_GPL(nd_cmd_out_size); -static void wait_nvdimm_bus_probe_idle(struct nvdimm_bus *nvdimm_bus) +void wait_nvdimm_bus_probe_idle(struct device *dev) { + struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(dev); + do { if (nvdimm_bus->probe_active == 0) break; @@ -402,7 +406,7 @@ static int nd_cmd_clear_to_send(struct nvdimm *nvdimm, unsigned int cmd) return 0; nvdimm_bus = walk_to_nvdimm_bus(&nvdimm->dev); - wait_nvdimm_bus_probe_idle(nvdimm_bus); + wait_nvdimm_bus_probe_idle(&nvdimm_bus->dev); if (atomic_read(&nvdimm->busy)) return -EBUSY; |