diff options
author | Matias Bjørling <m@bjorling.me> | 2016-05-06 21:03:07 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-05-06 21:51:10 +0300 |
commit | 5ebc7d9fe13ff9bd3622d0be3cd39c8751459be6 (patch) | |
tree | dfca4e0b1029af8fcf8fe52ce6de69a4eb7bcdb0 /drivers/lightnvm/sysblk.c | |
parent | 6659d4d80c6fc6b4b5bc2e99988f32b1b3865f1d (diff) | |
download | linux-5ebc7d9fe13ff9bd3622d0be3cd39c8751459be6.tar.xz |
lightnvm: make nvm_set_rqd_ppalist() aware of vblks
A virtual block enables a block to identify multiple physical blocks.
This is useful for metadata where a device media supports multiple
planes. In that case, a block, with multiple planes can be managed
as a single vblk. Reducing the metadata required by one forth.
nvm_set_rqd_ppalist() takes care of expanding a ppa_list with vblks
automatically. However, for some use-cases, where only a single physical
block is required, the ppa_list should not be expanded.
Therefore, add a vblk parameter to nvm_set_rqd_ppalist(), and only
expand the ppa_list if vblk is set.
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm/sysblk.c')
-rw-r--r-- | drivers/lightnvm/sysblk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lightnvm/sysblk.c b/drivers/lightnvm/sysblk.c index bca690248bd7..737fbc3c5cf1 100644 --- a/drivers/lightnvm/sysblk.c +++ b/drivers/lightnvm/sysblk.c @@ -277,7 +277,7 @@ static int nvm_set_bb_tbl(struct nvm_dev *dev, struct sysblk_scan *s, int type) memset(&rqd, 0, sizeof(struct nvm_rq)); - nvm_set_rqd_ppalist(dev, &rqd, s->ppas, s->nr_ppas); + nvm_set_rqd_ppalist(dev, &rqd, s->ppas, s->nr_ppas, 1); nvm_generic_to_addr_mode(dev, &rqd); ret = dev->ops->set_bb_tbl(dev, &rqd, type); |