]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
lightnvm: remove unused lists from struct rrpc_block
authorMatias Bjørling <m@bjorling.me>
Thu, 7 Jul 2016 07:54:18 +0000 (09:54 +0200)
committerJens Axboe <axboe@fb.com>
Thu, 7 Jul 2016 14:51:52 +0000 (08:51 -0600)
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>
drivers/lightnvm/rrpc.c
drivers/lightnvm/rrpc.h

index c3a6f34d3b7c017e937693c5509d9f7369e9e665..10ed22b9875dbf6b63ba486178e76cb608d9681d 100644 (file)
@@ -205,7 +205,6 @@ static struct rrpc_block *rrpc_get_blk(struct rrpc *rrpc, struct rrpc_lun *rlun,
        }
 
        rblk = rrpc_get_rblk(rlun, blk->id);
-       list_add_tail(&rblk->list, &rlun->open_list);
        spin_unlock(&lun->lock);
 
        blk->priv = rblk;
@@ -224,7 +223,6 @@ static void rrpc_put_blk(struct rrpc *rrpc, struct rrpc_block *rblk)
 
        spin_lock(&lun->lock);
        nvm_put_blk_unlocked(rrpc->dev, rblk->parent);
-       list_del(&rblk->list);
        spin_unlock(&lun->lock);
 }
 
@@ -511,16 +509,11 @@ static void rrpc_gc_queue(struct work_struct *work)
        struct rrpc *rrpc = gcb->rrpc;
        struct rrpc_block *rblk = gcb->rblk;
        struct rrpc_lun *rlun = rblk->rlun;
-       struct nvm_lun *lun = rblk->parent->lun;
 
        spin_lock(&rlun->lock);
        list_add_tail(&rblk->prio, &rlun->prio_list);
        spin_unlock(&rlun->lock);
 
-       spin_lock(&lun->lock);
-       list_move_tail(&rblk->list, &rlun->closed_list);
-       spin_unlock(&lun->lock);
-
        mempool_free(gcb, rrpc->gcb_pool);
        pr_debug("nvm: block '%lu' is full, allow GC (sched)\n",
                                                        rblk->parent->id);
@@ -1194,8 +1187,6 @@ static int rrpc_luns_init(struct rrpc *rrpc, int lun_begin, int lun_end)
 
                rlun->rrpc = rrpc;
                INIT_LIST_HEAD(&rlun->prio_list);
-               INIT_LIST_HEAD(&rlun->open_list);
-               INIT_LIST_HEAD(&rlun->closed_list);
 
                INIT_WORK(&rlun->ws_gc, rrpc_lun_gc);
                spin_lock_init(&rlun->lock);
index 5797343c1b1374348e418b840498b70959c0dc1c..448e39a9c515345d9de49369948f8428e7df49e0 100644 (file)
@@ -56,7 +56,6 @@ struct rrpc_block {
        struct nvm_block *parent;
        struct rrpc_lun *rlun;
        struct list_head prio;
-       struct list_head list;
 
 #define MAX_INVALID_PAGES_STORAGE 8
        /* Bitmap for invalid page intries */
@@ -77,13 +76,6 @@ struct rrpc_lun {
        struct rrpc_block *blocks;      /* Reference to block allocation */
 
        struct list_head prio_list;     /* Blocks that may be GC'ed */
-       struct list_head open_list;     /* In-use open blocks. These are blocks
-                                        * that can be both written to and read
-                                        * from
-                                        */
-       struct list_head closed_list;   /* In-use closed blocks. These are
-                                        * blocks that can _only_ be read from
-                                        */
 
        struct work_struct ws_gc;