libnvdimm/pmem: Honor force_raw for legacy pmem regions
authorDan Williams <dan.j.williams@intel.com>
Fri, 25 Jan 2019 01:33:06 +0000 (17:33 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:09:53 +0000 (20:09 +0100)
commit696c37524beb991c600cf17b43cab2fce4a23113
treeeb26aacf46c046f254a2c16f3b2e47a89ed63a6d
parent6a89ed7aa14031a3ba3371e81293dcb5e16d92ec
libnvdimm/pmem: Honor force_raw for legacy pmem regions

commit fa7d2e639cd90442d868dfc6ca1d4cc9d8bf206e upstream.

For recovery, where non-dax access is needed to a given physical address
range, and testing, allow the 'force_raw' attribute to override the
default establishment of a dev_pagemap.

Otherwise without this capability it is possible to end up with a
namespace that can not be activated due to corrupted info-block, and one
that can not be repaired due to a section collision.

Cc: <stable@vger.kernel.org>
Fixes: 004f1afbe199 ("libnvdimm, pmem: direct map legacy pmem by default")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvdimm/namespace_devs.c