diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-01-06 21:03:41 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-01-09 17:39:04 +0100 |
commit | e10624f8c09710b3b0740ea3847627ea02f55c39 (patch) | |
tree | ab59f8d9dbb5ca7e7d2771e0b5f8bf0cbf935553 /block/ioctl.c | |
parent | libnvdimm: convert to statically allocated badblocks (diff) | |
download | linux-e10624f8c09710b3b0740ea3847627ea02f55c39.tar.xz linux-e10624f8c09710b3b0740ea3847627ea02f55c39.zip |
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>
Diffstat (limited to 'block/ioctl.c')
0 files changed, 0 insertions, 0 deletions