linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matias Bjørling" <m@bjorling.me>
To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Matias Bjørling" <m@bjorling.me>
Subject: [RFC PATCH 07/11] lightnvm: remove unused lists from struct rrpc_block
Date: Wed, 29 Jun 2016 16:41:52 +0200	[thread overview]
Message-ID: <1467211316-22373-8-git-send-email-m@bjorling.me> (raw)
In-Reply-To: <1467211316-22373-1-git-send-email-m@bjorling.me>

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>
---
 drivers/lightnvm/rrpc.c | 9 ---------
 drivers/lightnvm/rrpc.h | 8 --------
 2 files changed, 17 deletions(-)

diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index c3a6f34..10ed22b 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,
 	}
 
 	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);
diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h
index 5797343..448e39a 100644
--- a/drivers/lightnvm/rrpc.h
+++ b/drivers/lightnvm/rrpc.h
@@ -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;
 
-- 
2.1.4

  parent reply	other threads:[~2016-06-29 14:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 14:41 [RFC PATCH 00/11] Small fixes for LightNVM Matias Bjørling
2016-06-29 14:41 ` [RFC PATCH 01/11] lightnvm: remove checkpatch warning for unsigned ints Matias Bjørling
2016-06-29 14:41 ` [RFC PATCH 02/11] lightnvm: fix checkpatch terse errors Matias Bjørling
2016-06-29 14:41 ` [RFC PATCH 03/11] lightnvm: remove open/close statistics for gennvm Matias Bjørling
2016-06-29 14:41 ` [RFC PATCH 04/11] lightnvm: rename gennvm and update description Matias Bjørling
2016-06-29 14:41 ` [RFC PATCH 05/11] lightnvm: move target mgmt into media mgr Matias Bjørling
2016-06-29 14:41 ` [RFC PATCH 06/11] lightnvm: remove nested lock conflict with mm Matias Bjørling
2016-06-29 14:41 ` Matias Bjørling [this message]
2016-06-29 14:41 ` [RFC PATCH 08/11] lightnvm: remove _unlocked variant of [get/put]_blk Matias Bjørling
2016-06-29 14:41 ` [RFC PATCH 09/11] lightnvm: fix lun offset calculation for mark blk Matias Bjørling
2016-06-29 14:41 ` [RFC PATCH 10/11] lightnvm: make ppa_list const in nvm_set_rqd_list Matias Bjørling
2016-06-29 14:41 ` [RFC PATCH 11/11] lightnvm: make __nvm_submit_ppa static Matias Bjørling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467211316-22373-8-git-send-email-m@bjorling.me \
    --to=m@bjorling.me \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).