mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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:
@@ -2492,6 +2492,12 @@ static int init_active_labels(struct nd_region *nd_region)
|
||||
if (!label_ent)
|
||||
break;
|
||||
label = nd_label_active(ndd, j);
|
||||
if (test_bit(NDD_NOBLK, &nvdimm->flags)) {
|
||||
u32 flags = __le32_to_cpu(label->flags);
|
||||
|
||||
flags &= ~NSLABEL_FLAG_LOCAL;
|
||||
label->flags = __cpu_to_le32(flags);
|
||||
}
|
||||
label_ent->label = label;
|
||||
|
||||
mutex_lock(&nd_mapping->lock);
|
||||
|
||||
Reference in New Issue
Block a user