summaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/rrpc.c
diff options
context:
space:
mode:
authorJavier González <javier@javigon.com>2016-01-12 07:49:31 +0100
committerJens Axboe <axboe@fb.com>2016-01-12 16:21:17 +0100
commitd7a64d275b39e19c010cdfd8728cc64f14b59bda (patch)
treebece6f5ed3f8c70b3e1114d8d01d58ac913dba34 /drivers/lightnvm/rrpc.c
parentlightnvm: introduce nvm_submit_ppa (diff)
downloadlinux-d7a64d275b39e19c010cdfd8728cc64f14b59bda.tar.xz
linux-d7a64d275b39e19c010cdfd8728cc64f14b59bda.zip
lightnvm: reference rrpc lun in rrpc block
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> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm/rrpc.c')
-rw-r--r--drivers/lightnvm/rrpc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index 9a5d94007ec0..280350c24cec 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);
}