Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1338658
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] lightnvm: remove struct nvm_dev->total_blocks |
| Date | 2016-02-20 09:00 +0100 |
| Message-ID | <r4aCm-1NO-13@gated-at.bofh.it> (permalink) |
| References | <r4aCl-1NO-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The struct nvm_dev->total_blocks was only used for calculating total sectors. Remove and instead calculate total sectors from the number of luns and its sectors. Signed-off-by: Matias Bjørling <m@bjorling.me> --- drivers/lightnvm/core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 2f1e16c..0d1fb6b 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -463,11 +463,7 @@ static int nvm_core_init(struct nvm_dev *dev) dev->sec_per_lun = dev->sec_per_blk * dev->blks_per_lun; dev->nr_luns = dev->luns_per_chnl * dev->nr_chnls; - dev->total_blocks = dev->nr_planes * - dev->blks_per_lun * - dev->luns_per_chnl * - dev->nr_chnls; - dev->total_secs = dev->total_blocks * dev->sec_per_blk; + dev->total_secs = dev->nr_luns * dev->sec_per_lun; INIT_LIST_HEAD(&dev->online_targets); mutex_init(&dev->mlock); -- 2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/4] LightNVM patches for 4.5-rc Matias Bjørling <m@bjorling.me> - 2016-02-20 09:00 +0100 [PATCH 1/4] lightnvm: update closed list outside of intr context Matias Bjørling <m@bjorling.me> - 2016-02-20 09:00 +0100 [PATCH 3/4] lightnvm: remove struct nvm_dev->total_blocks Matias Bjørling <m@bjorling.me> - 2016-02-20 09:00 +0100
csiph-web