Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1307027 > unrolled thread
| Started by | Matias Bjørling <m@bjorling.me> |
|---|---|
| First post | 2016-01-12 08:00 +0100 |
| Last post | 2016-01-12 08:00 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 17/25] lightnvm: reference rrpc lun in rrpc block Matias Bjørling <m@bjorling.me> - 2016-01-12 08:00 +0100
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Date | 2016-01-12 08:00 +0100 |
| Subject | [PATCH 17/25] lightnvm: reference rrpc lun in rrpc block |
| Message-ID | <qQ15V-5F9-35@gated-at.bofh.it> |
From: Javier González <javier@javigon.com>
Currently, a rrpc block only points to its nvm_lun. If a user wants to
find the associated rrpc lun, it will have to calculate the index and
look it up manually. By referencing the rrpc lun directly, this step can
be omitted, at the cost of a larger memory footprint.
This is important for upcoming patches that implement write buffering in
rrpc.
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
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 9a5d940..280350c 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
Back to top | Article view | linux.kernel
csiph-web