diff options
author | Matias Bjørling <m@bjorling.me> | 2016-01-12 09:49:28 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-01-12 18:21:17 +0300 |
commit | 81e681d3f7424fc2f03b6269e15c63131473c98f (patch) | |
tree | 9ca8a01523dbc3775f2d89e7772dd1b2f4f34b00 /drivers/lightnvm/core.c | |
parent | 4b79beb4c36d697e940e9f70d72399c71230a418 (diff) | |
download | linux-81e681d3f7424fc2f03b6269e15c63131473c98f.tar.xz |
lightnvm: support multiple ppas in nvm_erase_ppa
Sometimes a user want to erase multiple PPAs at the same time. Extend
nvm_erase_ppa to take multiple ppas and number of ppas to be erased.
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm/core.c')
-rw-r--r-- | drivers/lightnvm/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 0c8f42fc5f01..cd674af3d17d 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -265,7 +265,7 @@ void nvm_free_rqd_ppalist(struct nvm_dev *dev, struct nvm_rq *rqd) } EXPORT_SYMBOL(nvm_free_rqd_ppalist); -int nvm_erase_ppa(struct nvm_dev *dev, struct ppa_addr ppa) +int nvm_erase_ppa(struct nvm_dev *dev, struct ppa_addr *ppas, int nr_ppas) { struct nvm_rq rqd; int ret; @@ -275,7 +275,7 @@ int nvm_erase_ppa(struct nvm_dev *dev, struct ppa_addr ppa) memset(&rqd, 0, sizeof(struct nvm_rq)); - ret = nvm_set_rqd_ppalist(dev, &rqd, &ppa, 1); + ret = nvm_set_rqd_ppalist(dev, &rqd, ppas, nr_ppas); if (ret) return ret; |