OpenCloudOS-Kernel/drivers/lightnvm
Igor Konopko a96de64a24 lightnvm: pblk: simplify partial read path
This patch changes the approach to handling partial read path.

In old approach merging of data from round buffer and drive was fully
made by drive. This had some disadvantages - code was complex and
relies on bio internals, so it was hard to maintain and was strongly
dependent on bio changes.

In new approach most of the handling is done mostly by block layer
functions such as bio_split(), bio_chain() and generic_make request()
and generally is less complex and easier to maintain. Below some more
details of the new approach.

When read bio arrives, it is cloned for pblk internal purposes. All
the L2P mapping, which includes copying data from round buffer to bio
and thus bio_advance() calls is done on the cloned bio, so the original
bio is untouched. If we found that we have partial read case, we
still have original bio untouched, so we can split it and continue to
process only first part of it in current context, when the rest will be
called as separate bio request which is passed to generic_make_request()
for further processing.

Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
Reviewed-by: Heiner Litz <hlitz@ucsc.edu>
Reviewed-by: Javier González <javier@javigon.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-05-06 10:19:19 -06:00
..
Kconfig lightnvm: remove dependencies on BLK_DEV_NVME and PCI 2018-10-09 08:25:05 -06:00
Makefile lightnvm: remove rrpc 2018-01-05 08:50:12 -07:00
core.c lightnvm: do not remove instance under global lock 2019-05-06 10:19:19 -06:00
pblk-cache.c lightnvm: pblk: IO path reorganization 2019-05-06 10:19:19 -06:00
pblk-core.c lightnvm: pblk: simplify partial read path 2019-05-06 10:19:19 -06:00
pblk-gc.c lightnvm: pblk: GC error handling 2019-05-06 10:19:18 -06:00
pblk-init.c lightnvm: pblk: IO path reorganization 2019-05-06 10:19:19 -06:00
pblk-map.c lightnvm: pblk: ensure that erase is chunk aligned 2019-05-06 10:19:17 -06:00
pblk-rb.c lightnvm: pblk: simplify partial read path 2019-05-06 10:19:19 -06:00
pblk-read.c lightnvm: pblk: simplify partial read path 2019-05-06 10:19:19 -06:00
pblk-recovery.c lightnvm: pblk: recover only written metadata 2019-05-06 10:19:19 -06:00
pblk-rl.c pblk: fix max_io calculation 2019-03-07 08:59:26 -07:00
pblk-sysfs.c lightnvm: pblk: support packed metadata 2018-12-11 12:22:35 -07:00
pblk-trace.h lightnvm: pblk: fix TRACE_INCLUDE_PATH 2019-02-11 08:18:07 -07:00
pblk-write.c lightnvm: pblk: kick writer on write recovery path 2019-05-06 10:19:18 -06:00
pblk.h lightnvm: pblk: simplify partial read path 2019-05-06 10:19:19 -06:00