lightnvm: remove open/close statistics for gennvm
The responsibility of the media manager is not to keep track of open/closed blocks. This is better maintained within a target, that already manages this information on writes. Remove the statistics and merge the states NVM_BLK_ST_OPEN and NVM_BLK_ST_CLOSED. Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

parent
12624af26e
commit
077d238999
@@ -512,17 +512,12 @@ static void rrpc_gc_queue(struct work_struct *work)
|
||||
struct rrpc_block *rblk = gcb->rblk;
|
||||
struct rrpc_lun *rlun = rblk->rlun;
|
||||
struct nvm_lun *lun = rblk->parent->lun;
|
||||
struct nvm_block *blk = rblk->parent;
|
||||
|
||||
spin_lock(&rlun->lock);
|
||||
list_add_tail(&rblk->prio, &rlun->prio_list);
|
||||
spin_unlock(&rlun->lock);
|
||||
|
||||
spin_lock(&lun->lock);
|
||||
lun->nr_open_blocks--;
|
||||
lun->nr_closed_blocks++;
|
||||
blk->state &= ~NVM_BLK_ST_OPEN;
|
||||
blk->state |= NVM_BLK_ST_CLOSED;
|
||||
list_move_tail(&rblk->list, &rlun->closed_list);
|
||||
spin_unlock(&lun->lock);
|
||||
|
||||
|
Reference in New Issue
Block a user