]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm: add an atomic vs process context flag to rw_bytes
authorVishal Verma <vishal.l.verma@intel.com>
Wed, 10 May 2017 21:01:30 +0000 (15:01 -0600)
committerDan Williams <dan.j.williams@intel.com>
Thu, 11 May 2017 04:46:22 +0000 (21:46 -0700)
commit49023f2a3e4d3c1c60c231502753f8620a95f13b
tree0163a4ca204ab5f9601f12ee3c6fcfdb45a16459
parente3f5ea7787827ea2cade23b870c3403b52393ce8
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>
drivers/nvdimm/blk.c
drivers/nvdimm/btt.c
drivers/nvdimm/btt_devs.c
drivers/nvdimm/claim.c
drivers/nvdimm/nd.h
drivers/nvdimm/pfn_devs.c
include/linux/nd.h