diff options
author | Javier González <javier@cnexlabs.com> | 2017-10-13 14:46:05 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-10-13 08:34:57 -0600 |
commit | da67e68fb9d37fb9072b20cc75d4337a73bc01b4 (patch) | |
tree | 81f0a1b1872dfaf14959b8f8b730bafcf512c309 /drivers/lightnvm/pblk-init.c | |
parent | e0e12a707f02fcde1b77a2417d9fb0ae1ce3b003 (diff) | |
download | op-kernel-dev-da67e68fb9d37fb9072b20cc75d4337a73bc01b4.zip op-kernel-dev-da67e68fb9d37fb9072b20cc75d4337a73bc01b4.tar.gz |
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>
Diffstat (limited to 'drivers/lightnvm/pblk-init.c')
-rw-r--r-- | drivers/lightnvm/pblk-init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 8344511..eee4eeb 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -46,7 +46,7 @@ static int pblk_rw_io(struct request_queue *q, struct pblk *pblk, * user I/Os. Unless stalled, the rate limiter leaves at least 256KB * available for user I/O. */ - if (unlikely(pblk_get_secs(bio) >= pblk_rl_sysfs_rate_show(&pblk->rl))) + if (pblk_get_secs(bio) > pblk_rl_max_io(&pblk->rl)) blk_queue_split(q, &bio); return pblk_write_to_cache(pblk, bio, PBLK_IOTYPE_USER); |