]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: keep track of block counts
authorJavier Gonzalez <javier@javigon.com>
Fri, 20 Nov 2015 12:47:56 +0000 (13:47 +0100)
committerJens Axboe <axboe@fb.com>
Fri, 20 Nov 2015 15:33:20 +0000 (08:33 -0700)
commit0ec2a78beeed04ee80e1c6bbe510a109c33a39b8
tree8cc6efa06ebc51e8fc15021c46821be456913f23
parent5924bf51f11f4e86e7a6553d74b7feaf90910955
lightnvm: keep track of block counts

Maintain number of in use blocks, free blocks, and bad blocks in a per
lun basis. This allows the upper layers to get information about the
state of each lun.

Also, account for blocks reserved to the device on the free block count.
nr_free_blocks matches now the actual number of blocks on the free list
when the device is booted.

Signed-off-by: Javier Gonzalez <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/gennvm.c
include/linux/lightnvm.h