summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-01-06 21:03:42 +0100
committerDan Williams <dan.j.williams@intel.com>2016-01-10 07:42:31 +0100
commit57f7f317abdd07954cb116280c88d18378afb33e (patch)
tree8f39a9ea74d7babfbccfd0bcafc01e0e284499f4 /drivers/nvdimm
parentpmem: fail io-requests to known bad blocks (diff)
downloadlinux-57f7f317abdd07954cb116280c88d18378afb33e.tar.xz
linux-57f7f317abdd07954cb116280c88d18378afb33e.zip
pmem, dax: disable dax in the presence of bad blocks
Longer term teach dax to punch "error" holes in mapping requests and deliver SIGBUS to applications that consume a bad pmem page. For now, simply disable the dax performance optimization in the presence of known errors. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r--drivers/nvdimm/pmem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index d00c659d1304..6a1832b3983c 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -233,6 +233,7 @@ static int pmem_attach_disk(struct device *dev,
return -ENOMEM;
nvdimm_namespace_add_poison(ndns, &pmem->bb, pmem->data_offset);
+ disk->bb = &pmem->bb;
add_disk(disk);
revalidate_disk(disk);