libnvdimm/dimm: Add a no-BLK quirk based on NVDIMM family
As Dexuan reports the NVDIMM_FAMILY_HYPERV platform is incompatible with the existing Linux namespace implementation because it uses NSLABEL_FLAG_LOCAL for x1-width PMEM interleave sets. Quirk it as an platform / DIMM that does not provide BLK-aperture access. Allow the libnvdimm core to assume no potential for aliasing. In case other implementations make the same mistake, provide a "noblk" module parameter to force-enable the quirk. Link: https://lkml.kernel.org/r/PU1P153MB0169977604493B82B662A01CBF920@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM Reported-by: Dexuan Cui <decui@microsoft.com> Tested-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
@@ -1003,6 +1003,13 @@ static struct nd_region *nd_region_create(struct nvdimm_bus *nvdimm_bus,
|
||||
|
||||
if (test_bit(NDD_UNARMED, &nvdimm->flags))
|
||||
ro = 1;
|
||||
|
||||
if (test_bit(NDD_NOBLK, &nvdimm->flags)
|
||||
&& dev_type == &nd_blk_device_type) {
|
||||
dev_err(&nvdimm_bus->dev, "%s: %s mapping%d is not BLK capable\n",
|
||||
caller, dev_name(&nvdimm->dev), i);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (dev_type == &nd_blk_device_type) {
|
||||
|
Reference in New Issue
Block a user