linux/drivers/nvdimm
Dan Williams 1ee6667cd8 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>
2016-06-23 17:50:39 -07:00
..
blk.c libnvdimm, pmem, pfn: make pmem_rw_bytes generic and refactor pfn setup 2016-04-22 12:26:23 -07:00
btt_devs.c libnvdimm, pmem, pfn: make pmem_rw_bytes generic and refactor pfn setup 2016-04-22 12:26:23 -07:00
btt.c Merge branch 'for-4.7/libnvdimm' into libnvdimm-for-next 2016-05-18 10:06:48 -07:00
btt.h libnvdimm, btt: consolidate arena validation 2015-08-14 13:43:04 -04:00
bus.c Merge branch 'for-4.7/dax' into libnvdimm-for-next 2016-05-21 12:33:04 -07:00
claim.c libnvdimm, dax: fix deletion 2016-05-21 12:22:41 -07:00
core.c Merge branch 'for-4.7/dax' into libnvdimm-for-next 2016-05-21 12:33:04 -07:00
dax_devs.c libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
dimm_devs.c Merge branch 'for-4.7/dax' into libnvdimm-for-next 2016-05-21 12:33:04 -07:00
dimm.c libnvdimm: pmem label sets and namespace instantiation. 2015-06-24 21:24:10 -04:00
e820.c x86, kexec, nvdimm: Use walk_iomem_res_desc() for iomem search 2016-01-30 09:49:59 +01:00
Kconfig libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
label.c libnvdimm: infrastructure for btt devices 2015-06-25 04:20:04 -04:00
label.h libnvdimm: write blk label set 2015-06-24 21:24:10 -04:00
Makefile libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
namespace_devs.c libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
nd-core.h Merge branch 'for-4.7/dax' into libnvdimm-for-next 2016-05-21 12:33:04 -07:00
nd.h libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
pfn_devs.c libnvdimm, pfn, dax: fix initialization vs autodetect for mode + alignment 2016-06-23 17:50:39 -07:00
pfn.h libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
pmem.c DAX error handling for 4.7 2016-05-26 19:34:26 -07:00
region_devs.c libnvdimm: release ida resources 2016-05-20 22:02:56 -07:00
region.c libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00