linux/drivers/nvdimm
Dan Williams e10624f8c0 pmem: fail io-requests to known bad blocks
Check the sectors specified in a read bio to see if they hit a known bad
block, and return an error code pmem_do_bvec().

Note that the ->rw_page() is not in a position to return errors.  For
now, copy the same layering violation present in zram_rw_page() to avoid
crashes of the form:

 kernel BUG at mm/filemap.c:822!
 [..]
 Call Trace:
  [<ffffffff811c540e>] page_endio+0x1e/0x60
  [<ffffffff81290d29>] mpage_end_io+0x39/0x60
  [<ffffffff8141c4ef>] bio_endio+0x3f/0x60
  [<ffffffffa005c491>] pmem_make_request+0x111/0x230 [nd_pmem]

...i.e. unlock a page that was already unlocked via pmem_rw_page() =>
page_endio().

Reported-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2016-01-09 08:39:04 -08:00
..
blk.c block: change ->make_request_fn() and users to return a queue cookie 2015-11-07 10:40:46 -07:00
btt_devs.c libnvdimm: btt_devs: Fix locking in namespace_store 2015-09-17 11:37:16 -04:00
btt.c block: change ->make_request_fn() and users to return a queue cookie 2015-11-07 10:40:46 -07:00
btt.h libnvdimm, btt: consolidate arena validation 2015-08-14 13:43:04 -04:00
bus.c nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails 2015-06-30 14:30:34 -04:00
claim.c libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
core.c libnvdimm: convert to statically allocated badblocks 2016-01-09 08:39:04 -08:00
dimm_devs.c nvdimm: change to use generic kvfree() 2015-08-27 19:35:48 -04:00
dimm.c libnvdimm: pmem label sets and namespace instantiation. 2015-06-24 21:24:10 -04:00
e820.c libnvdimm, e820: fix numa node for e820-type-12 pmem ranges 2015-11-12 09:21:18 -08:00
Kconfig libnvdimm, pmem: 'struct page' for pmem 2015-08-28 23:40:04 -04:00
label.c libnvdimm: infrastructure for btt devices 2015-06-25 04:20:04 -04:00
label.h libnvdimm: write blk label set 2015-06-24 21:24:10 -04:00
Makefile libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
namespace_devs.c libnvdimm, pmem: direct map legacy pmem by default 2015-08-28 23:40:05 -04:00
nd-core.h libnvdimm, pmem: move definition of nvdimm_namespace_add_poison to nd.h 2016-01-09 08:39:03 -08:00
nd.h libnvdimm: convert to statically allocated badblocks 2016-01-09 08:39:04 -08:00
pfn_devs.c libnvdimm: pfn_devs: Fix locking in namespace_store 2015-09-17 11:47:50 -04:00
pfn.h libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
pmem.c pmem: fail io-requests to known bad blocks 2016-01-09 08:39:04 -08:00
region_devs.c libnvdimm, pmem: direct map legacy pmem by default 2015-08-28 23:40:05 -04:00
region.c libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00