lightnvm: pblk: avoid deadlock on low LUN config
authorJavier González <javier@cnexlabs.com>
Fri, 13 Oct 2017 12:46:05 +0000 (14:46 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Oct 2017 14:34:57 +0000 (08:34 -0600)
commitda67e68fb9d37fb9072b20cc75d4337a73bc01b4
tree81f0a1b1872dfaf14959b8f8b730bafcf512c309
parente0e12a707f02fcde1b77a2417d9fb0ae1ce3b003
lightnvm: pblk: avoid deadlock on low LUN config

On low LUN configurations, make sure not to send bios that are bigger
than the buffer size.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
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-init.c
drivers/lightnvm/pblk-rl.c
drivers/lightnvm/pblk.h