diff options
author | Javier González <javier@javigon.com> | 2018-10-09 07:12:02 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-10-09 10:25:07 -0400 |
commit | 45dcf29b98377bbdc40aa4a23a79ade60295dbaf (patch) | |
tree | 2c21e73e66a009ba9ebfb22e425064e952b91571 /drivers/lightnvm/pblk.h | |
parent | 090ee26fd51270cc3bd54a0efbc716ede320ad27 (diff) |
lightnvm: pblk: encapsulate rqd dma allocations
dma allocations for ppa_list and meta_list in rqd are replicated in
several places across the pblk codebase. Make helpers to encapsulate
creation and deletion to simplify the code.
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk.h')
-rw-r--r-- | drivers/lightnvm/pblk.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h index d123cff82589..b06ab0edab69 100644 --- a/drivers/lightnvm/pblk.h +++ b/drivers/lightnvm/pblk.h | |||
@@ -778,6 +778,8 @@ ssize_t pblk_rb_sysfs(struct pblk_rb *rb, char *buf); | |||
778 | */ | 778 | */ |
779 | struct nvm_rq *pblk_alloc_rqd(struct pblk *pblk, int type); | 779 | struct nvm_rq *pblk_alloc_rqd(struct pblk *pblk, int type); |
780 | void pblk_free_rqd(struct pblk *pblk, struct nvm_rq *rqd, int type); | 780 | void pblk_free_rqd(struct pblk *pblk, struct nvm_rq *rqd, int type); |
781 | int pblk_alloc_rqd_meta(struct pblk *pblk, struct nvm_rq *rqd); | ||
782 | void pblk_free_rqd_meta(struct pblk *pblk, struct nvm_rq *rqd); | ||
781 | void pblk_set_sec_per_write(struct pblk *pblk, int sec_per_write); | 783 | void pblk_set_sec_per_write(struct pblk *pblk, int sec_per_write); |
782 | int pblk_setup_w_rec_rq(struct pblk *pblk, struct nvm_rq *rqd, | 784 | int pblk_setup_w_rec_rq(struct pblk *pblk, struct nvm_rq *rqd, |
783 | struct pblk_c_ctx *c_ctx); | 785 | struct pblk_c_ctx *c_ctx); |