]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
libnvdimm, pfn: fix nvdimm_namespace_add_poison() vs section alignment
authorDan Williams <dan.j.williams@intel.com>
Fri, 8 Apr 2016 03:02:06 +0000 (20:02 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 8 Apr 2016 03:02:06 +0000 (20:02 -0700)
commita390180291dd9a2392bbab4242cde712c326efc6
tree4faabbfd699f88c03cacbbed681c4aba66a080e6
parente5670563f588ed1c0603819350c0f02cec23f5c5
libnvdimm, pfn: fix nvdimm_namespace_add_poison() vs section alignment

When section alignment padding is in effect we need to shift / truncate
the range that is queried for poison by the 'start_pad' or 'end_trunc'
reservations.

It's easiest if we just pass in an adjusted resource range rather than
deriving it from the passed in namespace.  With the resource range
resolution pushed out to the caller we can also push the
namespace-to-region lookup to the caller and drop the implicit pmem-type
assumption about the passed in namespace object.

Cc: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/core.c
drivers/nvdimm/nd.h
drivers/nvdimm/pmem.c