mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] lightnvm: let rrpc block know its rrpc lun
@ 2016-01-07 12:03 Javier González
  2016-01-07 12:03 ` [PATCH 2/2] lightnvm: manage open and closed blocks separately Javier González
  2016-01-07 12:51 ` [PATCH 1/2] lightnvm: let rrpc block know its rrpc lun Matias Bjørling
  0 siblings, 2 replies; 3+ messages in thread
From: Javier González @ 2016-01-07 12:03 UTC (permalink / raw)
  To: mb
  Cc: jg, linux-kernel, linux-block, Javier González,
	Javier González

Currently a rrpc block only points to the nvm_lun it belongs to.
Maintaining a reference to the rrpc lun allows to manage rrpc specific
behavior between an rrpc block and rrpc lun.

Signed-off-by: Javier González <javier@cnexlabs.com>
---
 drivers/lightnvm/rrpc.c | 1 +
 drivers/lightnvm/rrpc.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index ec7aacf..1bea346 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -1150,6 +1150,7 @@ static int rrpc_luns_init(struct rrpc *rrpc, int lun_begin, int lun_end)
 			struct nvm_block *blk = &lun->blocks[j];
 
 			rblk->parent = blk;
+			rblk->rlun = rlun;
 			INIT_LIST_HEAD(&rblk->prio);
 			spin_lock_init(&rblk->lock);
 		}
diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h
index a9696a0..7c5fa4d 100644
--- a/drivers/lightnvm/rrpc.h
+++ b/drivers/lightnvm/rrpc.h
@@ -54,6 +54,7 @@ struct rrpc_rq {
 
 struct rrpc_block {
 	struct nvm_block *parent;
+	struct rrpc_lun *rlun;
 	struct list_head prio;
 
 #define MAX_INVALID_PAGES_STORAGE 8
-- 
2.1.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-07 12:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07 12:03 [PATCH 1/2] lightnvm: let rrpc block know its rrpc lun Javier González
2016-01-07 12:03 ` [PATCH 2/2] lightnvm: manage open and closed blocks separately Javier González
2016-01-07 12:51 ` [PATCH 1/2] lightnvm: let rrpc block know its rrpc lun Matias Bjørling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome