linux-stable/drivers/lightnvm
Javier González 766c8ceb16 lightnvm: pblk: guarantee that backpointer is respected on writer stall
pblk's write buffer must guarantee that it respects the device's
constrains for reads (i.e., mw_cunits). This is done by maintaining a
backpointer that updates the L2P table as entries wrap up, making them
point to the media instead of pointing to the write buffer.

This mechanism can race in case that the write thread stalls, as the
write pointer will protect the last written entry, thus disregarding the
read constrains.

This patch adds an extra check on wrap up, making sure that the
threshold is respected at all times, preventing new entries to overwrite
committed data, also in case of write thread stall.

Reported-by: Heiner Litz <hlitz@ucsc.edu>
Signed-off-by: Javier González <javier@cnexlabs.com>
Reviewed-by: Heiner Litz <hlitz@ucsc.edu>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-10-09 08:25:08 -06:00
..
core.c lightnvm: introduce nvm_rq_to_ppa_list 2018-10-09 08:25:07 -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
pblk-cache.c lightnvm: pblk: add SPDX license tag 2018-10-09 08:25:08 -06:00
pblk-core.c lightnvm: pblk: fix race on sysfs line state 2018-10-09 08:25:08 -06:00
pblk-gc.c lightnvm: pblk: add SPDX license tag 2018-10-09 08:25:08 -06:00
pblk-init.c lightnvm: pblk: guarantee that backpointer is respected on writer stall 2018-10-09 08:25:08 -06:00
pblk-map.c lightnvm: pblk: add SPDX license tag 2018-10-09 08:25:08 -06:00
pblk-rb.c lightnvm: pblk: guarantee that backpointer is respected on writer stall 2018-10-09 08:25:08 -06:00
pblk-read.c lightnvm: pblk: add SPDX license tag 2018-10-09 08:25:08 -06:00
pblk-recovery.c lightnvm: pblk: add SPDX license tag 2018-10-09 08:25:08 -06:00
pblk-rl.c lightnvm: pblk: add SPDX license tag 2018-10-09 08:25:08 -06:00
pblk-sysfs.c lightnvm: pblk: fix race on sysfs line state 2018-10-09 08:25:08 -06:00
pblk-trace.h lightnvm: pblk: add tracing for chunk resets 2018-10-09 08:25:07 -06:00
pblk-write.c lightnvm: pblk: encapsulate rb pointer operations 2018-10-09 08:25:08 -06:00
pblk.h lightnvm: pblk: guarantee that backpointer is respected on writer stall 2018-10-09 08:25:08 -06:00