aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2016-07-07 03:54:18 -0400
committerJens Axboe <axboe@fb.com>2016-07-07 10:51:52 -0400
commit8c39eddbf2842861f6c7412bd498c9d880b1c9e8 (patch)
tree41652e6fd505281046fa5821163a65d719900002 /drivers/lightnvm
parent5cd907853d5b777c11ecbc8de4482ea5f51663bc (diff)
lightnvm: remove unused lists from struct rrpc_block
The ->list, ->open_list, and ->closed_list lists were previously used for statistics. However, their usage have been removed, and thus these can safely be removed. Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r--drivers/lightnvm/rrpc.c9
-rw-r--r--drivers/lightnvm/rrpc.h8
2 files changed, 0 insertions, 17 deletions
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index c3a6f34d3b7c..10ed22b9875d 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -205,7 +205,6 @@ static struct rrpc_block *rrpc_get_blk(struct rrpc *rrpc, struct rrpc_lun *rlun,
205 } 205 }
206 206
207 rblk = rrpc_get_rblk(rlun, blk->id); 207 rblk = rrpc_get_rblk(rlun, blk->id);
208 list_add_tail(&rblk->list, &rlun->open_list);
209 spin_unlock(&lun->lock); 208 spin_unlock(&lun->lock);
210 209
211 blk->priv = rblk; 210 blk->priv = rblk;
@@ -224,7 +223,6 @@ static void rrpc_put_blk(struct rrpc *rrpc, struct rrpc_block *rblk)
224 223
225 spin_lock(&lun->lock); 224 spin_lock(&lun->lock);
226 nvm_put_blk_unlocked(rrpc->dev, rblk->parent); 225 nvm_put_blk_unlocked(rrpc->dev, rblk->parent);
227 list_del(&rblk->list);
228 spin_unlock(&lun->lock); 226 spin_unlock(&lun->lock);
229} 227}
230 228
@@ -511,16 +509,11 @@ static void rrpc_gc_queue(struct work_struct *work)
511 struct rrpc *rrpc = gcb->rrpc; 509 struct rrpc *rrpc = gcb->rrpc;
512 struct rrpc_block *rblk = gcb->rblk; 510 struct rrpc_block *rblk = gcb->rblk;
513 struct rrpc_lun *rlun = rblk->rlun; 511 struct rrpc_lun *rlun = rblk->rlun;
514 struct nvm_lun *lun = rblk->parent->lun;
515 512
516 spin_lock(&rlun->lock); 513 spin_lock(&rlun->lock);
517 list_add_tail(&rblk->prio, &rlun->prio_list); 514 list_add_tail(&rblk->prio, &rlun->prio_list);
518 spin_unlock(&rlun->lock); 515 spin_unlock(&rlun->lock);
519 516
520 spin_lock(&lun->lock);
521 list_move_tail(&rblk->list, &rlun->closed_list);
522 spin_unlock(&lun->lock);
523
524 mempool_free(gcb, rrpc->gcb_pool); 517 mempool_free(gcb, rrpc->gcb_pool);
525 pr_debug("nvm: block '%lu' is full, allow GC (sched)\n", 518 pr_debug("nvm: block '%lu' is full, allow GC (sched)\n",
526 rblk->parent->id); 519 rblk->parent->id);
@@ -1194,8 +1187,6 @@ static int rrpc_luns_init(struct rrpc *rrpc, int lun_begin, int lun_end)
1194 1187
1195 rlun->rrpc = rrpc; 1188 rlun->rrpc = rrpc;
1196 INIT_LIST_HEAD(&rlun->prio_list); 1189 INIT_LIST_HEAD(&rlun->prio_list);
1197 INIT_LIST_HEAD(&rlun->open_list);
1198 INIT_LIST_HEAD(&rlun->closed_list);
1199 1190
1200 INIT_WORK(&rlun->ws_gc, rrpc_lun_gc); 1191 INIT_WORK(&rlun->ws_gc, rrpc_lun_gc);
1201 spin_lock_init(&rlun->lock); 1192 spin_lock_init(&rlun->lock);
diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h
index 5797343c1b13..448e39a9c515 100644
--- a/drivers/lightnvm/rrpc.h
+++ b/drivers/lightnvm/rrpc.h
@@ -56,7 +56,6 @@ struct rrpc_block {
56 struct nvm_block *parent; 56 struct nvm_block *parent;
57 struct rrpc_lun *rlun; 57 struct rrpc_lun *rlun;
58 struct list_head prio; 58 struct list_head prio;
59 struct list_head list;
60 59
61#define MAX_INVALID_PAGES_STORAGE 8 60#define MAX_INVALID_PAGES_STORAGE 8
62 /* Bitmap for invalid page intries */ 61 /* Bitmap for invalid page intries */
@@ -77,13 +76,6 @@ struct rrpc_lun {
77 struct rrpc_block *blocks; /* Reference to block allocation */ 76 struct rrpc_block *blocks; /* Reference to block allocation */
78 77
79 struct list_head prio_list; /* Blocks that may be GC'ed */ 78 struct list_head prio_list; /* Blocks that may be GC'ed */
80 struct list_head open_list; /* In-use open blocks. These are blocks
81 * that can be both written to and read
82 * from
83 */
84 struct list_head closed_list; /* In-use closed blocks. These are
85 * blocks that can _only_ be read from
86 */
87 79
88 struct work_struct ws_gc; 80 struct work_struct ws_gc;
89 81