libnvdimm, pfn, dax: limit namespace alignments to the supported set
authorDan Williams <dan.j.williams@intel.com>
Sat, 12 Aug 2017 00:54:48 +0000 (17:54 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 15 Aug 2017 16:32:12 +0000 (09:32 -0700)
commitf13d2b61e59cbdd813be7639eb85bfbf99593ac0
tree416d7bf862f4d926e4f399811274fcd99b908f5c
parent1fdadbebc4f617c1ee4a1465ad173cc9e524089d
libnvdimm, pfn, dax: limit namespace alignments to the supported set

Now that we properly advertise the supported pte, pmd, and pud sizes,
restrict the supported alignments that can be set on a namespace. This
assumes that userspace was not previously relying on the ability to set
odd alignments. At least ndctl only ever supported setting the namespace
alignment to 4K, 2M, or 1G.

Cc: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/pfn_devs.c