diff options
author | Javier González <jg@lightnvm.io> | 2017-06-26 16:27:13 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-26 16:27:13 -0600 |
commit | 084ec9ba07a00d5ee1218339aab4d52569e35c9b (patch) | |
tree | 61eb5590a861597da94196d7bd6dd7d27de0a237 /drivers/lightnvm/pblk-core.c | |
parent | d624f371d5c17a6e230ffed3f0371a4eb588bf45 (diff) | |
download | linux-084ec9ba07a00d5ee1218339aab4d52569e35c9b.tar.gz linux-084ec9ba07a00d5ee1218339aab4d52569e35c9b.tar.bz2 linux-084ec9ba07a00d5ee1218339aab4d52569e35c9b.zip |
lightnvm: pblk: rename read request pool
Read requests allocate some extra memory to store its per I/O context.
Instead of requiring yet another memory pool for other type of requests,
generalize this context allocation (and change naming accordingly).
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-core.c')
-rw-r--r-- | drivers/lightnvm/pblk-core.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index a1125547e638..6fa51eb9d681 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -62,7 +62,7 @@ static void pblk_end_io_erase(struct nvm_rq *rqd) struct pblk *pblk = rqd->private; __pblk_end_io_erase(pblk, rqd); - mempool_free(rqd, pblk->r_rq_pool); + mempool_free(rqd, pblk->g_rq_pool); } static void __pblk_map_invalidate(struct pblk *pblk, struct pblk_line *line, @@ -171,8 +171,8 @@ struct nvm_rq *pblk_alloc_rqd(struct pblk *pblk, int rw) pool = pblk->w_rq_pool; rq_size = pblk_w_rq_size; } else { - pool = pblk->r_rq_pool; - rq_size = pblk_r_rq_size; + pool = pblk->g_rq_pool; + rq_size = pblk_g_rq_size; } rqd = mempool_alloc(pool, GFP_KERNEL); @@ -188,7 +188,7 @@ void pblk_free_rqd(struct pblk *pblk, struct nvm_rq *rqd, int rw) if (rw == WRITE) pool = pblk->w_rq_pool; else - pool = pblk->r_rq_pool; + pool = pblk->g_rq_pool; mempool_free(rqd, pool); } @@ -1343,8 +1343,8 @@ int pblk_blk_erase_async(struct pblk *pblk, struct ppa_addr ppa) struct nvm_rq *rqd; int err; - rqd = mempool_alloc(pblk->r_rq_pool, GFP_KERNEL); - memset(rqd, 0, pblk_r_rq_size); + rqd = mempool_alloc(pblk->g_rq_pool, GFP_KERNEL); + memset(rqd, 0, pblk_g_rq_size); pblk_setup_e_rq(pblk, rqd, ppa); |