diff options
author | Tyler Hicks <tyhicks@linux.microsoft.com> | 2022-08-30 00:45:05 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2022-09-29 17:22:30 -0700 |
commit | 2e5021cc42ba26c98fe83b973d774a999fa4f219 (patch) | |
tree | 310ae959dcce5fc55537217d40dd5c44dd38541f /include/rv | |
parent | 23a2d0c5944896ce9123f36ab62d7ca64c8b25ff (diff) | |
download | linux-2e5021cc42ba26c98fe83b973d774a999fa4f219.tar.gz linux-2e5021cc42ba26c98fe83b973d774a999fa4f219.tar.bz2 linux-2e5021cc42ba26c98fe83b973d774a999fa4f219.zip |
libnvdimm/region: Allow setting align attribute on regions without mappings
The alignment constraint for namespace creation in a region was
increased, from 2M to 16M, for non-PowerPC architectures in v5.7 with
commit 2522afb86a8c ("libnvdimm/region: Introduce an 'align'
attribute"). The thought behind the change was that region alignment
should be uniform across all architectures and, since PowerPC had the
largest alignment constraint of 16M, all architectures should conform to
that alignment.
The change regressed namespace creation in pre-defined regions that
relied on 2M alignment but a workaround was provided in the form of a
sysfs attribute, named 'align', that could be adjusted to a non-default
alignment value.
However, the sysfs attribute's store function returned an error (-ENXIO)
when userspace attempted to change the alignment of a region that had no
mappings. This affected 2M aligned regions of volatile memory that were
defined in a device tree using "pmem-region" and created by the
of_pmem_region_driver, since those regions do not contain mappings
(ndr_mappings is 0).
Allow userspace to set the align attribute on pre-existing regions that
do not have mappings so that namespaces can still be within those
regions, despite not being aligned to 16M.
Link: https://lore.kernel.org/lkml/CA+CK2bDJ3hrWoE91L2wpAk+Yu0_=GtYw=4gLDDD7mxs321b_aA@mail.gmail.com
Fixes: 2522afb86a8c ("libnvdimm/region: Introduce an 'align' attribute")
Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Link: https://lore.kernel.org/r/20220830054505.1159488-1-tyhicks@linux.microsoft.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/rv')
0 files changed, 0 insertions, 0 deletions