diff options
author | Matias Bjørling <mb@lightnvm.io> | 2018-10-09 14:11:37 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-10-09 17:25:06 +0300 |
commit | afdc23c91e085c56d1b0c119563c202b07255599 (patch) | |
tree | b6fb38867f5f5872cf67787b62daefff795f829c /drivers/lightnvm/pblk-init.c | |
parent | aff3fb18f957de93e629c7d3d2c4ef1f360aa511 (diff) | |
download | linux-afdc23c91e085c56d1b0c119563c202b07255599.tar.xz |
lightnvm: pblk: unify vector max req constants
Both NVM_MAX_VLBA and PBLK_MAX_REQ_ADDRS define how many LBAs that
are available in a vector command. pblk uses them interchangeably
in its implementation. Use NVM_MAX_VLBA as the main one and remove
usages of PBLK_MAX_REQ_ADDRS.
Also remove the power representation that only has one user, and
instead calculate it at runtime.
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-init.c')
-rw-r--r-- | drivers/lightnvm/pblk-init.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 53bd52114aee..9119c64d6f62 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -376,12 +376,6 @@ static int pblk_core_init(struct pblk *pblk) pblk->max_write_pgs = min_t(int, max_write_ppas, NVM_MAX_VLBA); pblk_set_sec_per_write(pblk, pblk->min_write_pgs); - if (pblk->max_write_pgs > PBLK_MAX_REQ_ADDRS) { - pblk_err(pblk, "vector list too big(%u > %u)\n", - pblk->max_write_pgs, PBLK_MAX_REQ_ADDRS); - return -EINVAL; - } - pblk->pad_dist = kcalloc(pblk->min_write_pgs - 1, sizeof(atomic64_t), GFP_KERNEL); if (!pblk->pad_dist) |