libnvdimm: write blk label set
After 'uuid', 'size', 'sector_size', and optionally 'alt_name' have been set to valid values the labels on the dimm can be updated. The difference with the pmem case is that blk namespaces are limited to one dimm and can cover discontiguous ranges in dpa space. Also, after allocating label slots, it is useful for userspace to know how many slots are left. Export this information in sysfs. 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>
This commit is contained in:
@@ -155,6 +155,10 @@ static void nd_async_device_unregister(void *d, async_cookie_t cookie)
|
||||
{
|
||||
struct device *dev = d;
|
||||
|
||||
/* flush bus operations before delete */
|
||||
nvdimm_bus_lock(dev);
|
||||
nvdimm_bus_unlock(dev);
|
||||
|
||||
device_unregister(dev);
|
||||
put_device(dev);
|
||||
}
|
||||
|
Referens i nytt ärende
Block a user