]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: check lba sanity on read path
authorJavier González <javier@cnexlabs.com>
Fri, 13 Oct 2017 12:46:22 +0000 (14:46 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Oct 2017 14:34:57 +0000 (08:34 -0600)
commit040101731bc06072e338afe3fdc23750a15d74e3
tree6d0e2d6834b43dade6027d30f2fda792e00fe132
parent50814755d3e56deaaf47a4a2485412e691abdebd
lightnvm: pblk: check lba sanity on read path

As part of pblk's recovery scheme, we store the lba mapped to each
physical sector on the device's out-of-bound (OOB) area.

On the read path, we can use this information to validate that the data
being delivered to the upper layers corresponds to the lba being
requested. The cost of this check is an extra copy on the DMA region on
the device and an extra comparison in the host, given that (i) the OOB
area is being read together with the data in the media, and (ii) the DMA
region allocated for the ppa list can be reused for the metadata stored
on the OOB area.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-read.c
drivers/lightnvm/pblk.h