Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

lightnvm: reserved space calculation incorrect

The nvm_dev->max_pages_per_blk variable was removed in favor of the new
nvm->sec_per_blk variable. The ->max_pages_per_blk variable was still
used in rrpc_capacity, reporting the reserved capacity to zero. Replace
with ->sec_per_blk to calculate the reserved area again.

Signed-off-by: Javier González <javier@cnexlabs.com>
Updated patch description. Was "lightnvm: eliminate redundant variable"
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>

authored by

Javier González and committed by
Jens Axboe
116f7d4a 6d5be959

+1 -2
+1 -1
drivers/lightnvm/rrpc.c
··· 1264 1264 sector_t reserved, provisioned; 1265 1265 1266 1266 /* cur, gc, and two emergency blocks for each lun */ 1267 - reserved = rrpc->nr_luns * dev->max_pages_per_blk * 4; 1267 + reserved = rrpc->nr_luns * dev->sec_per_blk * 4; 1268 1268 provisioned = rrpc->nr_sects - reserved; 1269 1269 1270 1270 if (reserved > rrpc->nr_sects) {
-1
include/linux/lightnvm.h
··· 351 351 unsigned long total_blocks; 352 352 unsigned long total_secs; 353 353 int nr_luns; 354 - unsigned max_pages_per_blk; 355 354 356 355 unsigned long *lun_map; 357 356 void *dma_pool;