summaryrefslogtreecommitdiff
path: root/drivers/nvdimm/dimm_devs.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-06-23 17:50:39 -0700
committerDan Williams <dan.j.williams@intel.com>2016-06-23 17:50:39 -0700
commit1ee6667cd8d183b2fed12f97285f184431d2caf9 (patch)
tree4982412cb9ffb7dfa82586d43f81b6c31bbf4831 /drivers/nvdimm/dimm_devs.c
parent33688abb2802ff3a230bd2441f765477b94cc89e (diff)
libnvdimm, pfn, dax: fix initialization vs autodetect for mode + alignment
The updated ndctl unit tests discovered that if a pfn configuration with a 4K alignment is read from the namespace, that alignment will be ignored in favor of the default 2M alignment. The result is that the configuration will fail initialization with a message like: dax6.1: bad offset: 0x22000 dax disabled align: 0x200000 Fix this by allowing the alignment read from the info block to override the default which is 2M not 0 in the autodetect path. This also fixes a similar problem with the mode and alignment settings silently being overwritten by the kernel when userspace has changed it. We now will either overwrite the info block if userspace changes the uuid or fail and warn if a live setting disagrees with the info block. Cc: <stable@vger.kernel.org> Cc: Micah Parrish <micah.parrish@hpe.com> Cc: Toshi Kani <toshi.kani@hpe.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/dimm_devs.c')
0 files changed, 0 insertions, 0 deletions