Skip to content
Commit 766c8ceb authored by Javier González's avatar Javier González Committed by Jens Axboe
Browse files

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: default avatarHeiner Litz <hlitz@ucsc.edu>
Signed-off-by: default avatarJavier González <javier@cnexlabs.com>
Reviewed-by: default avatarHeiner Litz <hlitz@ucsc.edu>
Signed-off-by: default avatarMatias Bjørling <mb@lightnvm.io>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8a57fc38
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment