summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/btt_devs.c
diff options
context:
space:
mode:
authorVishal Verma <vishal.l.verma@intel.com>2017-05-10 23:01:30 +0200
committerDan Williams <dan.j.williams@intel.com>2017-05-11 06:46:22 +0200
commit3ae3d67ba705c754a3c91ac009f9ce73a0e7286a (patch)
tree0163a4ca204ab5f9601f12ee3c6fcfdb45a16459 /drivers/nvdimm/btt_devs.c
parentx86, pmem: Fix cache flushing for iovec write < 8 bytes (diff)
downloadlinux-3ae3d67ba705c754a3c91ac009f9ce73a0e7286a.tar.xz
linux-3ae3d67ba705c754a3c91ac009f9ce73a0e7286a.zip
libnvdimm: add an atomic vs process context flag to rw_bytes
nsio_rw_bytes can clear media errors, but this cannot be done while we are in an atomic context due to locking within ACPI. From the BTT, ->rw_bytes may be called either from atomic or process context depending on whether the calls happen during initialization or during IO. During init, we want to ensure error clearing happens, and the flag marking process context allows nsio_rw_bytes to do that. When called during IO, we're in atomic context, and error clearing can be skipped. Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/btt_devs.c')
-rw-r--r--drivers/nvdimm/btt_devs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/btt_devs.c b/drivers/nvdimm/btt_devs.c
index 4b76af2b8715..ae00dc0d9791 100644
--- a/drivers/nvdimm/btt_devs.c
+++ b/drivers/nvdimm/btt_devs.c
@@ -273,7 +273,7 @@ static int __nd_btt_probe(struct nd_btt *nd_btt,
if (!btt_sb || !ndns || !nd_btt)
return -ENODEV;
- if (nvdimm_read_bytes(ndns, SZ_4K, btt_sb, sizeof(*btt_sb)))
+ if (nvdimm_read_bytes(ndns, SZ_4K, btt_sb, sizeof(*btt_sb), 0))
return -ENXIO;
if (nvdimm_namespace_capacity(ndns) < SZ_16M)