libnvdimm, namespace: update label implementation for multi-pmem
authorDan Williams <dan.j.williams@intel.com>
Thu, 6 Oct 2016 04:13:23 +0000 (21:13 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 7 Oct 2016 16:22:53 +0000 (09:22 -0700)
commit16660eaea0ccc6d0692f173922cd365876eb288e
tree9a833933b28c11ee81bc5a7c4c52af59f443c210
parent012207334a26727369b2668716d84e55af1f1d22
libnvdimm, namespace: update label implementation for multi-pmem

Instead of assuming that there will only ever be one allocated range at
the start of the region, account for additional namespaces that might
start at an offset from the region base.

After this change pmem namespaces now have a reason to carry an array of
resources similar to blk.  Unifying the resource tracking infrastructure
in nd_namespace_common is a future cleanup candidate.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/label.c